Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 13. Reusable logic with portlet ... > Setting the portlet title with the p...

13.4. Setting the portlet title with the portlet filter

Before you create a filter, you need to first identify the filter interface or interfaces that you must implement to create the filter class. The filter interfaces that you implement will depend on the portlet lifecycle phases to which your filter applies.

For instance, to set the title of a portlet dynamically, your filter must invoke the setTitle method on the RenderResponse object returned by the portlet’s render method. This means your filter class must implement the RenderFilter interface. On the other hand, if you need to check for the existence of the javax.portlet.action request parameter in the action request and display a warning message if it’s not present, you’ll need to implement the ActionFilter interface (to check for the javax.portlet.action parameter) and also the RenderFilter interface (to write the warning message).


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free 10-Day Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint