8 Replies Latest reply on Apr 9, 2008 2:35 AM by srihari Prabaharan

    Example for PORTAL SUPPORT with Richfaces  3.2.0

    srihari Prabaharan Newbie

      is there any examples for Jboss portal 2.6.3 with richfaces 3.2.0?
      if so is there any links for the .war file?


        • 1. Re: Example for PORTAL SUPPORT with Richfaces  3.2.0
          Viggo Navarsete Expert

          I'm not sure, but have you tried looking in the svn repository? I know there is a Richfaces portlet example there, but I'm not aware of any updates to support 3.2.0. Have a look, and please tell if it's updated to use richfaces 3.2.0 :)

          • 2. Re: Example for PORTAL SUPPORT with Richfaces  3.2.0
            Antoine Herzog Master

            Hello,

            the live demo of RichFaces inside a portlet is running with the 3.2.0.
            (I guess it automatically takes the last released version... )

            it is on :
            http://livedemo.exadel.com/portal/portal/default/default

            the sources are in the svn repository :
            http://anonsvn.jboss.org/repos/portletbridge/trunk/examples/richfaces/

            all is not working perfectly : the upper tabs in each components view are not working.
            this was also with 3.1.4
            it is related to the jboss portlet bridge, (and richfaces).
            there is a jira about this, and I guess it will be solved.

            the JBoss PortletBridge is still in Beta 1 version...

            • 3. Re: Example for PORTAL SUPPORT with Richfaces  3.2.0
              srihari Prabaharan Newbie

              Thanks guys .. :)

              I have tried almost all the components in Jboss Portal.
              The Problem is i am constantly getting some java script errors in the page.
              Then what are all the list of jar files that has to be used..

              • 4. Re: Example for PORTAL SUPPORT with Richfaces  3.2.0
                Viggo Navarsete Expert

                javascript errors: Please post some code!

                Jars: Look in svn in pom.xml files, there you will find all dependencies with a version number.

                • 5. Re: Example for PORTAL SUPPORT with Richfaces  3.2.0
                  srihari Prabaharan Newbie

                  Thanks for the reply :)

                  I am not using Portal Bridge jar files. I am listing out the details of working configurations

                  Portal Server:
                  Jboss Portal Server 2.6.3

                  Jar Files Used
                  jsf-facelets-1.1.14
                  portlet-3.2.0-20071117.053348-27
                  richfaces-api-3.1.4.GA
                  richfaces-impl-3.1.4.GA
                  richfaces-ui-3.1.4.GA

                  Consfiguration Files

                  web.xml

                  <?xml version="1.0"?>
                  <web-app 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"
                   version="2.4">
                  
                   <description>SamplePortlet</description>
                  
                   <context-param>
                   <param-name>org.richfaces.SKIN</param-name>
                   <param-value>blueSky</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>
                   <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>
                  
                   <context-param>
                   <param-name>org.richfaces.LoadStyleStrategy</param-name>
                   <param-value>ALL</param-value>
                   </context-param>
                  
                  
                  
                  
                   <context-param>
                   <param-name>facelets.DEVELOPMENT</param-name>
                   <param-value>false</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>javax.faces.DEFAULT_SUFFIX</param-name>
                   <param-value>.xhtml</param-value>
                   </context-param>
                   <context-param>
                   <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
                   <param-value>server</param-value>
                   </context-param>
                  
                  
                   <listener>
                   <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
                   </listener>
                  
                   <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>
                  
                   <login-config>
                   <auth-method>BASIC</auth-method>
                   </login-config>
                  
                  
                  </web-app>


                  [b]Faces-config.xml


                  <!DOCTYPE faces-config PUBLIC
                   "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
                   "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
                  
                  <faces-config>
                  
                   <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>
                  
                  
                   <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>



                  portlet.xml


                  <portlet-app version="1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xsi:schemaLocation="http://java.sun.com/xml/ns/portlet"
                   xmlns="http://java.sun.com/xml/ns/portlet">
                   <portlet>
                   <portlet-name>SamplePortlet</portlet-name>
                   <portlet-class>
                   javax.portlet.faces.GenericFacesPortlet
                   </portlet-class>
                  
                   <init-param>
                   <name>javax.portlet.faces.defaultViewId.view</name>
                   <value>/jsf/Sample.xhtml</value>
                   </init-param>
                   <portlet-info>
                   <title>Enrollment Portlet</title>
                   </portlet-info>
                  
                   <supports>
                   <mime-type>text/html</mime-type>
                   <portlet-mode>VIEW</portlet-mode>
                   </supports>
                   </portlet>
                  </portlet-app>


                  Sample-Object.xml

                  <?xml version="1.0" encoding="UTF-8"?>
                  <deployments>
                   <deployment>
                   <if-exists>overwrite</if-exists>
                   <parent-ref>default.default</parent-ref>
                   <window>
                   <window-name>SamplePortletWindow</window-name>
                   <instance-ref>SamplePortletInstance</instance-ref>
                   <region>center</region>
                   <height>1</height>
                   </window>
                   </deployment>
                  </deployments>



                  portlet-instances.xml


                  <?xml version="1.0" standalone="yes"?>
                  <deployments>
                   <deployment>
                   <instance>
                   <instance-id>SamplePortletInstance</instance-id>
                   <portlet-ref>SamplePortlet</portlet-ref>
                   </instance>
                   </deployment>
                  </deployments>


                  • 6. Re: Example for PORTAL SUPPORT with Richfaces  3.2.0
                    srihari Prabaharan Newbie

                    Thanks for the reply :)

                    I am not using Portal Bridge jar files. I am listing out the details of working configurations

                    Portal Server:
                    Jboss Portal Server 2.6.3

                    Jar Files Used
                    jsf-facelets-1.1.14
                    portlet-3.2.0-20071117.053348-27
                    richfaces-api-3.1.4.GA
                    richfaces-impl-3.1.4.GA
                    richfaces-ui-3.1.4.GA

                    Consfiguration Files

                    web.xml

                    <?xml version="1.0"?>
                    <web-app 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"
                     version="2.4">
                    
                     <description>SamplePortlet</description>
                    
                     <context-param>
                     <param-name>org.richfaces.SKIN</param-name>
                     <param-value>blueSky</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>
                     <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>
                    
                     <context-param>
                     <param-name>org.richfaces.LoadStyleStrategy</param-name>
                     <param-value>ALL</param-value>
                     </context-param>
                    
                    
                    
                    
                     <context-param>
                     <param-name>facelets.DEVELOPMENT</param-name>
                     <param-value>false</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>javax.faces.DEFAULT_SUFFIX</param-name>
                     <param-value>.xhtml</param-value>
                     </context-param>
                     <context-param>
                     <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
                     <param-value>server</param-value>
                     </context-param>
                    
                    
                     <listener>
                     <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
                     </listener>
                    
                     <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>
                    
                     <login-config>
                     <auth-method>BASIC</auth-method>
                     </login-config>
                    
                    
                    </web-app>


                    [b]Faces-config.xml


                    <!DOCTYPE faces-config PUBLIC
                     "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
                     "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
                    
                    <faces-config>
                    
                     <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>
                    
                    
                     <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>



                    portlet.xml


                    <portlet-app version="1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                     xsi:schemaLocation="http://java.sun.com/xml/ns/portlet"
                     xmlns="http://java.sun.com/xml/ns/portlet">
                     <portlet>
                     <portlet-name>SamplePortlet</portlet-name>
                     <portlet-class>
                     javax.portlet.faces.GenericFacesPortlet
                     </portlet-class>
                    
                     <init-param>
                     <name>javax.portlet.faces.defaultViewId.view</name>
                     <value>/jsf/Sample.xhtml</value>
                     </init-param>
                     <portlet-info>
                     <title>Enrollment Portlet</title>
                     </portlet-info>
                    
                     <supports>
                     <mime-type>text/html</mime-type>
                     <portlet-mode>VIEW</portlet-mode>
                     </supports>
                     </portlet>
                    </portlet-app>


                    Sample-Object.xml

                    <?xml version="1.0" encoding="UTF-8"?>
                    <deployments>
                     <deployment>
                     <if-exists>overwrite</if-exists>
                     <parent-ref>default.default</parent-ref>
                     <window>
                     <window-name>SamplePortletWindow</window-name>
                     <instance-ref>SamplePortletInstance</instance-ref>
                     <region>center</region>
                     <height>1</height>
                     </window>
                     </deployment>
                    </deployments>



                    portlet-instances.xml


                    <?xml version="1.0" standalone="yes"?>
                    <deployments>
                     <deployment>
                     <instance>
                     <instance-id>SamplePortletInstance</instance-id>
                     <portlet-ref>SamplePortlet</portlet-ref>
                     </instance>
                     </deployment>
                    </deployments>


                    • 8. Re: Example for PORTAL SUPPORT with Richfaces  3.2.0
                      srihari Prabaharan Newbie

                      It says

                      "null" is not Null or not an object

                      and sometimes

                      documen.getElementById('loginIframe') has no properties