1 Reply Latest reply on Oct 24, 2007 9:33 AM by Mike K

    RF 3.1.1 and JBP 2.6

    Dmitriy Slokva Newbie

      Hi all!
      Maybe anybody using RichFaces 3.1.1 components with JBoss portal 2.6 (JB 4.2, EAR deploying)?
      After configuring by examples i see page with clean portlet window (like in minimized state), no one component.
      In log file there is no errors(!)

      Who can say what versions of libraries I must use?

      Now i use:
      - Rihfaces ui-inpl-api = 3.1.1
      - a4j-portlet-bridge = 3.2.0-SNAPSHOT
      - jsf-facelets = 1.1.12

      my JSP test Page (menu.jsp): (one button and one tree for test)

      <%@ page contentType="text/html" %>
      <%@ page pageEncoding="UTF-8" %>
      <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
      <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
      <%@ taglib uri="http://richfaces.ajax4jsf.org/rich" prefix="rich" %>
      <%@ taglib uri="https://ajax4jsf.dev.java.net/ajax" prefix="a4j" %>
      <html><head>
       <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
      </head><body>
      <a4j:portlet>
       <f:view>
       <f:loadBundle basename="accpersonal" var="bundle"/>
       <h:form>
       <h:commandButton action="sopAccMenu" value="123"/>
       <rich:tree showConnectingLines="true" switchType="client" style="width:300px" value="#{library.data}"
       var="item" nodeFace="#{item.type}">
       <rich:treeNode type="author">
       <h:outputText value="#{item.name}"/>
       </rich:treeNode>
       <rich:treeNode type="book">
       <h:outputText value="#{item.title}"/>
       </rich:treeNode>
       </rich:tree>
       </h:form>
       </f:view>
      </a4j:portlet>
      </body>
      </html>
      


      Some config files:
      web.xml
      <?xml version="1.0" encoding="UTF-8"?>
      <web-app version="2.4"
       xmlns="http://java.sun.com/xml/ns/j2ee"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
      
       <context-param>
       <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
       <param-value>server</param-value>
       </context-param>
      
       <context-param>
       <param-name>org.richfaces.SKIN</param-name>
       <param-value>blueSky</param-value>
       </context-param>
      
       <filter>
       <display-name>Ajax4jsf Filter</display-name>
       <filter-name>ajax4jsf</filter-name>
       <filter-class>org.ajax4jsf.Filter</filter-class>
       </filter>
      
       <context-param>
       <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
       <param-value>org.ajax4jsf.portlet.application.FaceletPortletViewHandler</param-value>
       </context-param>
      
       <filter-mapping>
       <filter-name>ajax4jsf</filter-name>
       <servlet-name>Faces Servlet</servlet-name>
       <dispatcher>REQUEST</dispatcher>
       <dispatcher>FORWARD</dispatcher>
       <dispatcher>INCLUDE</dispatcher>
       </filter-mapping>
      
       <listener>
       <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
       </listener>
      
       <context-param>
       <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
       <param-value>.jsp</param-value>
       </context-param>
      
       <servlet>
       <servlet-name>Faces Servlet</servlet-name>
       <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
       <load-on-startup>1</load-on-startup>
       </servlet>
      
       <servlet-mapping>
       <servlet-name>Faces Servlet</servlet-name>
       <url-pattern>/faces/*</url-pattern>
       </servlet-mapping>
      
       <servlet-mapping>
       <servlet-name>Faces Servlet</servlet-name>
       <url-pattern>*.faces</url-pattern>
       </servlet-mapping>
      
       <servlet-mapping>
       <servlet-name>Faces Servlet</servlet-name>
       <url-pattern>*.jsp</url-pattern>
       </servlet-mapping>
      
       <servlet-mapping>
       <servlet-name>Faces Servlet</servlet-name>
       <url-pattern>*.jsf</url-pattern>
       </servlet-mapping>
      </web-app>
      
      


      portlet.xml
      <?xml version="1.0" encoding="UTF-8"?>
      <portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
       version="1.0">
      
       <portlet>
       <portlet-name>SOPAccMenu</portlet-name>
       <portlet-class>org.ajax4jsf.portlet.AjaxFacesPortlet</portlet-class>
      
       <init-param>
       <name>default-view</name>
       <value>/WEB-INF/accpersonal/jsp/menu.jsp</value>
       </init-param>
      
       <supports>
       <mime-type>text/html</mime-type>
       <portlet-mode>VIEW</portlet-mode>
       </supports>
      
       <supported-locale>en</supported-locale>
       <supported-locale>ru</supported-locale>
       <supported-locale>kz</supported-locale>
       <resource-bundle>accpersonal</resource-bundle>
      
       <portlet-info>
       <title>SOP Accounting personal</title>
       <short-title>SOP_AP</short-title>
       </portlet-info>
      
       </portlet>
      </portlet-app>
      
      


      faces-config.xml
      <?xml version="1.0"?>
      <!DOCTYPE faces-config PUBLIC
       "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
       "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
      <faces-config>
      
       <managed-bean>
       <managed-bean-name>ajaxContext</managed-bean-name>
       <managed-bean-class>org.ajax4jsf.portlet.PortletAjaxContext</managed-bean-class>
       <managed-bean-scope>request</managed-bean-scope>
       </managed-bean>
      
       <managed-bean>
       <description>Accounting manager bean</description>
       <managed-bean-name>manager</managed-bean-name>
       <managed-bean-class>kz.nat.sop.accpersonal.manager.AccountingManager</managed-bean-class>
       <managed-bean-scope>session</managed-bean-scope>
       </managed-bean>
      
       <navigation-rule>
       <from-view-id>*</from-view-id>
       <navigation-case>
       <from-outcome>sopAccMenu</from-outcome>
       <to-view-id>/WEB-INF/accpersonal/jsp/menu.jsp</to-view-id>
       </navigation-case>
       </navigation-rule>
      
       <application>
       <locale-config>
       <default-locale>ru</default-locale>
       <supported-locale>en</supported-locale>
       <supported-locale>ru</supported-locale>
       <supported-locale>kz</supported-locale>
       </locale-config>
       </application>
      
       <factory>
       <faces-context-factory>org.ajax4jsf.portlet.context.FacesContextFactoryImpl</faces-context-factory>
       </factory>
      
       <application>
       <view-handler>org.ajax4jsf.portlet.application.PortletViewHandler</view-handler>
       <state-manager>org.ajax4jsf.portlet.application.PortalStateManager</state-manager>
       </application>
      
       <render-kit>
       <renderer>
       <description>override the viewroot</description>
       <component-family>javax.faces.ViewRoot</component-family>
       <renderer-type>javax.faces.ViewRoot</renderer-type>
       <renderer-class>org.ajax4jsf.portlet.renderkit.portlet.PortletAjaxViewRootRenderer</renderer-class>
       </renderer>
       </render-kit>
      </faces-config>