myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Myfaces Wiki] Update of "CreatingJSFPortlets" by StanSilvert
Date Wed, 22 Mar 2006 18:36:12 GMT
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 StanSilvert:
http://wiki.apache.org/myfaces/CreatingJSFPortlets

New page:
How to create a JSF Portlet using MyFaces:

1. Make sure your JSF MyFaces application runs as a stand-alone servlet.
2. Remove any redirects from your faces-config.xml.  Portlets can not handle these.
3. Create a Portlet WAR as per the instructions for your Portlet container.  Make sure it
contains everything that was included in step 1.
4. Update your portlet.xml file as follows:

<!-- You must use this Portlet impl class -->
<portlet-class>org.apache.myfaces.portlet.MyFacesGenericPortlet</portlet-class>

<!-- The "home page" of your JSF application -->
<!-- This is a required param.               -->
<init-param>
   <name>default-view</name>
   <value>/some_view_id_from_faces-config</value>
</init-param>

<!-- A class name that implements org.apache.myfaces.portlet.DefaultViewSelector -->
<!-- This optional param is used if your want to choose different default views  -->
<!-- based on some condition.  You still must specify default-view above, but    -->
<!-- this impl will take precedence.                                             -->
<init-param>
   <name>default-view-selector</name>
   <value>com.foo.MyViewSelector</value>
</init-param>

Mime
View raw message