You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by Apache Wiki <wi...@apache.org> on 2005/08/29 16:38:30 UTC

[Myfaces Wiki] Trivial Update of "UsingPortletModes" by StephanStrittmatter

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Myfaces Wiki" for change notification.

The following page has been changed by StephanStrittmatter:
http://wiki.apache.org/myfaces/UsingPortletModes

------------------------------------------------------------------------------
  ##language:en
  == How to extend MyFaces portlets to use modes ==
- While JSF has good support for portlets, the JSF 1.2 spec does not address the use of portlet modes in a JSF application.  The JSR-168 portlet spec specifies that a portlet container (a portal) must at least support VIEW, EDIT, and HELP modes.  By defualt, modes are ignored in MyFaces and all requests are treated the same regardeless of the current mode.
+ While JSF has good support for portlets, the JSF 1.2 spec does not address the use of portlet modes in a JSF application.  The JSR-168 portlet spec specifies that a portlet container (a portal) must at least support VIEW, EDIT, and HELP modes.  By default, modes are ignored in MyFaces and all requests are treated the same regardeless of the current mode.
  
  At its lowest level, the only difference in the modes is in what is returned when someone calls PortletRequest.getPortletMode().  javax.portlet.GenericPortlet provides a concrete Portlet class that dispatches to different render methods based on which mode is active.  These methods are doView(), doEdit(), and doHelp().  Because MyFacesGenericPortlet extends javax.portlet.GenericPortlet, these three methods can be overridden to provide custom rendering behavior depending on the current mode.