Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Accessing Portlet Title in JSF  RSS feed

 
Radha Bajwa
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Everyone,

I have a question on retrieving the portlet title.

1) I need to retrieve the portlet title in the backend bean. Here is the code
PortletRequest request =(PortletRequest)getFacesContext().getExternalContext().getRequest();
String portletTitle= request.getPreferences().getValue("title",null);

However, the title for the portlet returns a null in the faces java file. I have an error page with a back button which is used across 3 portlets. I want to take the user to a different page once the back button is clicked based on which portlet is displaying th error page.

Is there any other way to do this ?

Thank you,
Any comments will be welcome.

Radha.
 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which portal are you using? It's working for me in WebSphere.

-Cameron McKenzie
 
Radha Bajwa
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using the IBM's websphere portal. Also, I am trying to retrieve the title in one of the JSF action menthods for a button. Here is a snippet of my portlet.xml


<portlet>
<portlet-name>EventTypePortlet</portlet-name>
<display-name>EventTypePortlet</display-name>
<portlet-class>com.ables.portlets.EventTypePortlet</portlet-class>
<init-param>
<name>com.ibm.faces.portlet.page.view</name>
<value>/eventtype/EventTypeSearch.jsp</value>
</init-param>
<supports>
<mime-type>text/html</mime-type>
<portlet-mode>view</portlet-mode>
</supports>
<portlet-info>
<title>Event Type Mapping</title>
</portlet-info>
</portlet>
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!