[jboss-user] [JBoss Portal] - PortletBridge: Facelets not working
ebephil
do-not-reply at jboss.com
Thu Jan 10 10:02:16 EST 2008
Hi,
I thought I'd give the new RichFaces JSR-301 PortletBridge a try to finally have proper support for RichFaces components in my portlets, but it seems like my Facelets CompositionComponents aren't displayed anymore. No error, it just shows nothing in the portlet. It used to work when using the AjaxFacesPortlet class directly.
Anyone experiencing the same behavior? It might easily be a configuration error, took me quite a while to get this far. Or isn't it implemented yet (still in beta as far as I know anyway). The ajaxPortlet sample that comes with the richfaces-source also doesn't seem to be using Facelets.
I am using the JBoss Portal 2.6.3.GA bundle with the included JBoss 4.2.2GA, the latest Facelets jar (1.1.3) and self compiled richfaces and portletbrige jars (built from the richfaces-ui-3.1.3.GA source zip).
My web.xml (with the FaceletPortletViewHandler set):
| <web-app >
|
| <display-name>FooPortlets</display-name>
| <description>Foo Portlets</description>
|
| <context-param>
| <param-name>com.sun.faces.validateXml</param-name>
| <param-value>true</param-value>
| </context-param>
| <context-param>
| <param-name>com.sun.faces.verifyObjects</param-name>
| <param-value>true</param-value>
| </context-param>
|
| <context-param>
| <param-name>facelets.DEVELOPMENT</param-name>
| <param-value>true</param-value>
| </context-param>
| <context-param>
| <param-name>facelets.SKIP_COMMENTS</param-name>
| <param-value>true</param-value>
| </context-param>
| <context-param>
| <param-name>facelets.VIEW_MAPPINGS</param-name>
| <param-value>*.xhtml</param-value>
| </context-param>
|
| <context-param>
| <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
| <param-value>
| org.ajax4jsf.portlet.application.FaceletPortletViewHandler
| </param-value>
| </context-param>
|
| <context-param>
| <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
| <param-value>server</param-value>
| </context-param>
| <context-param>
| <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
| <param-value>.xhtml</param-value>
| </context-param>
|
| <filter>
| <display-name>Ajax4jsf Filter</display-name>
| <filter-name>ajax4jsf</filter-name>
| <filter-class>org.ajax4jsf.Filter</filter-class>
| </filter>
| <filter-mapping>
| <filter-name>ajax4jsf</filter-name>
| <servlet-name>FacesServlet</servlet-name>
| <dispatcher>FORWARD</dispatcher>
| <dispatcher>REQUEST</dispatcher>
| <dispatcher>INCLUDE</dispatcher>
| </filter-mapping>
|
| <servlet>
| <servlet-name>FacesServlet</servlet-name>
| <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
| <load-on-startup>1</load-on-startup>
| </servlet>
| <servlet-mapping>
| <servlet-name>FacesServlet</servlet-name>
| <url-pattern>/faces/*</url-pattern>
| </servlet-mapping>
|
| </web-app>
|
My faces-config.xml (with the viewhandler, statemanager and contextfactory set):
| <faces-config>
|
| <!-- Richfaces configuration -->
| <application>
| <view-handler>
| org.ajax4jsf.portlet.application.PortletViewHandler
| </view-handler>
| <state-manager>
| org.ajax4jsf.portlet.application.PortalStateManager
| </state-manager>
| </application>
| <factory>
| <faces-context-factory>
| org.ajax4jsf.portlet.context.FacesContextFactoryImpl
| </faces-context-factory>
| </factory>
| ...
| </faces-config>
|
And finally my portlet.xml:
| <portlet>
| <portlet-name>AlarmPortlet</portlet-name>
| <display-name>Alarm Portlet</display-name>
|
| <portlet-class>
| javax.portlet.faces.GenericFacesPortlet
| </portlet-class>
| <init-param>
| <name>javax.portlet.faces.defaultViewId.view</name>
| <value>/jsf/alarm/view.xhtml</value>
| </init-param>
| <init-param>
| <name>javax.portlet.faces.defaultViewId.help</name>
| <value>/jsf/alarm/help.xhtml</value>
| </init-param>
| <!-- disable portlet caching -->
| <expiration-cache>-1</expiration-cache>
| <supports>
| <mime-type>text/html</mime-type>
| <portlet-mode>VIEW</portlet-mode>
| </supports>
| <supported-locale>en</supported-locale>
| <supported-locale>de</supported-locale>
| <resource-bundle>AlarmResourceBundle</resource-bundle>
| <security-role-ref>
| <role-name>Admin</role-name>
| <role-link>Admin</role-link>
| </security-role-ref>
| <security-role-ref>
| <role-name>User</role-name>
| <role-link>User</role-link>
| </security-role-ref>
| </portlet>
|
Any help is appreciated :-)
Thanks in advance
Cheers
Phil
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4118693#4118693
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4118693
More information about the jboss-user
mailing list