• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Accessing Portlet Title in JSF

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
author and cow tipper
Posts: 5009
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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>
reply
    Bookmark Topic Watch Topic
  • New Topic