1 2 Previous Next 18 Replies Latest reply on Mar 18, 2011 2:12 PM by Nick Belaevski

    xhtml does not show the interface RichFaces

    Victor Augusto Zago Menegusso Newbie

      Hello,

      I'm having the following problem, when  i try do this:

       


      <ui:composition xmlns="http://www.w3.org/1999/xhtml"
          xmlns:ui="http://java.sun.com/jsf/facelets"
          xmlns:h="http://java.sun.com/jsf/html"
          xmlns:f="http://java.sun.com/jsf/core"
          xmlns:a4j="http://richfaces.org/a4j"
          xmlns:rich="http://richfaces.org/rich">
      
          <f:view>
                    <h:form>
                              <rich:tabPanel switchType="client">
                                  <rich:tab label="First11">
                                      Here is tab #1 teste1
                                  </rich:tab>
                                  <rich:tab label="Second22">
                                      Here is tab #2 teste2
                                  </rich:tab>
                                  <rich:tab label="Third33">
                                      Here is tab #3 teste3
                                  </rich:tab>
                              </rich:tabPanel>
                    </h:form>
          </f:view>
      
      
      </ui:composition>
      
      

       

       

       

      result:

      richfacesprobl.jpg

       

      I'm using:

      JSF 2 + Richfaces 4CR1 + Liferay + TomCat

        • 1. Re: xhtml does not show the interface RichFaces
          codo Newbie

          Hello,

           

          I tried your example and it works for me. But in rich:tab I couldn't find attribute "label" so I used attribute "name" (for tab names).

          I'm using

          JSF 2 + Richfaces 4CR1 + NetBeans + GlassFish

           

          Is this the only richfaces component which doesn't work for you?

          • 2. xhtml does not show the interface RichFaces
            Victor Augusto Zago Menegusso Newbie

            Hello, codo

             

            any RichFaces component work, i try using  rich:panel and  not work ,

             

            I put the jars on the lib folder

            richfaces-components-api-4.0.0.20110227-CR1.jar

            richfaces-components-ui-4.0.0.20110227-CR1.jar

            richfaces-core-api-4.0.0.20110227-CR1.jar

            richfaces-core-impl-4.0.0.20110227-CR1.jar

             

             


            • 3. xhtml does not show the interface RichFaces
              codo Newbie

              Btw are you trying to use facelets? If so I think you don't do it right. When I copy/paste all of your code and start it I had similar result as yours.

              • 4. Re: xhtml does not show the interface RichFaces
                Victor Augusto Zago Menegusso Newbie

                how should I do?

                in my portlet.xml:

                 

                <?xml version="1.0"?>
                
                
                <portlet-app
                          version="2.0"
                          xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
                          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                          xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
                >
                          <portlet>
                                    <portlet-name>OperadorJSF</portlet-name>
                                    <display-name>OperadorJSF</display-name>
                                    <portlet-class>org.portletfaces.bridge.GenericFacesPortlet</portlet-class>
                                    <init-param>
                                              <name>javax.portlet.faces.defaultViewId.view</name>
                                              <value>/xhtml/portletViewMode.xhtml</value>
                                    </init-param>
                                         ........
                        </portlet>
                </portlet-app>
                
                

                 

                my web.xml:


                <?xml version="1.0"?>
                
                
                <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
                
                          <context-param>
                                    <param-name>com.sun.faces.expressionFactory</param-name>
                                    <param-value>org.jboss.el.ExpressionFactoryImpl</param-value>
                          </context-param>
                          <context-param>
                                    <param-name>org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL</param-name>
                                    <param-value>true</param-value>
                          </context-param>
                
                          <context-param>
                                    <param-name>org.richfaces.skin</param-name>
                                    <param-value>blueSky</param-value>
                          </context-param>
                
                          <context-param>
                                    <param-name>org.richfaces.CONTROL_SKINNING</param-name>
                                    <param-value>enable</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>
                
                
                </web-app>
                
                

                 

                 

                faces-config:


                <?xml version="1.0"?>
                
                
                <faces-config
                    version="2.0"
                    xmlns="http://java.sun.com/xml/ns/javaee"
                    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
                >
                
                
                
                
                          <managed-bean>
                                    <managed-bean-name>Teste</managed-bean-name>
                                    <managed-bean-class>alive.Teste</managed-bean-class>
                                    <managed-bean-scope>session</managed-bean-scope>
                          </managed-bean>
                
                </faces-config>
                
                

                 

                 

                xhtml:

                 

                <ui:composition xmlns="http://www.w3.org/1999/xhtml"
                    xmlns:ui="http://java.sun.com/jsf/facelets"
                    xmlns:h="http://java.sun.com/jsf/html"
                    xmlns:f="http://java.sun.com/jsf/core"
                    xmlns:a4j="http://richfaces.org/a4j"
                    xmlns:rich="http://richfaces.org/rich">
                
                    <f:view>
                              <rich:panel header="Olá RichFaces" style="width: 300px" id="teste">
                                              <h:outputText value="Seu nome: " />
                                              <a4j:commandButton value="Dizer oláaaa"
                                              reRender="olaPainel"/>
                                              <h:panelGroup id="olaPainel" layout="block">
                                              </h:panelGroup>
                                    </rich:panel>
                    </f:view>
                
                
                </ui:composition>
                
                

                 

                I do not have a lot of practice with JSF + richfaces

                • 5. xhtml does not show the interface RichFaces
                  Nick Belaevski Master

                  Hi,

                   

                  We haven't tested portlets compatibility yet. Does the script part work for you (i.e. tabs are switchable or no)?

                  • 6. xhtml does not show the interface RichFaces
                    Victor Augusto Zago Menegusso Newbie

                    Hi Nick

                     

                    I do not understand what you mean

                    • 7. Re: xhtml does not show the interface RichFaces
                      codo Newbie

                      Hey Victor,

                       

                      I'm not so familiar with portlets, but if you want you can try this and check if it works. So you need to create new xhtml, called for example "sceleton.xhtml" with this source:

                      <?xml version='1.0' encoding='UTF-8' ?>

                      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

                      <html xmlns="http://www.w3.org/1999/xhtml"

                            xmlns:ui="http://java.sun.com/jsf/facelets"

                            xmlns:h="http://java.sun.com/jsf/html">

                          <h:head>

                              <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

                          </h:head>

                          <h:body>

                              <ui:insert name="content">Content</ui:insert>

                          </h:body>

                      </html>

                       

                      and another one (this is yours, modified):

                       

                      <?xml version='1.0' encoding='UTF-8' ?>

                      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

                      <html xmlns="http://www.w3.org/1999/xhtml"

                            xmlns:h="http://java.sun.com/jsf/html"

                            xmlns:ui="http://java.sun.com/jsf/facelets"

                            xmlns:rich="http://richfaces.org/rich">

                       

                       

                          <h:body>

                              <ui:composition template="./skeleton.xhtml">

                                  <ui:define name="head">

                                  </ui:define>

                                  <ui:define name="top">

                                  </ui:define>

                                  <ui:define name="content">

                                      <h:form>

                                          <rich:tabPanel switchType="client">

                                              <rich:tab name="First11">

                                                  Here is tab #1 teste1

                                              </rich:tab>

                                              <rich:tab name="Second22">

                                                  Here is tab #2 teste2

                                              </rich:tab>

                                              <rich:tab name="Third33">

                                                  Here is tab #3 teste3

                                              </rich:tab>

                                          </rich:tabPanel>

                                      </h:form>

                                  </ui:define>

                              </ui:composition>

                          </h:body>

                      </html>

                       

                      They have to be in same directory because the second xhtml is using relative path to the first one.

                      Try it and I hope this help.

                       

                      Greetings

                      • 8. xhtml does not show the interface RichFaces
                        Nick Belaevski Master

                        Looking at the screenshot once again I see that there is nothing to click tab is not rendered correctly. What portlet bridge do you use? Will you be able to provide example project for investigation?

                        • 9. Re: xhtml does not show the interface RichFaces
                          Victor Augusto Zago Menegusso Newbie

                          Sorry for the delay Nick,

                           


                          The first screenshot is for the first code, I changed the code to try another component

                           

                          for this code:


                          <ui:composition xmlns="http://www.w3.org/1999/xhtml"
                              xmlns:ui="http://java.sun.com/jsf/facelets"
                              xmlns:h="http://java.sun.com/jsf/html"
                              xmlns:f="http://java.sun.com/jsf/core"
                              xmlns:a4j="http://richfaces.org/a4j"
                              xmlns:rich="http://richfaces.org/rich">
                          
                              <f:view>
                                        <rich:panel header="Olá RichFaces" style="width: 300px" id="teste">
                                                        <h:outputText value="Seu nome: " />
                                                        <a4j:commandButton value="Dizer oláaaa"
                                                        reRender="olaPainel"/>
                                                        <h:panelGroup id="olaPainel" layout="block">
                                                        </h:panelGroup>
                                              </rich:panel>
                          
                          
                              </f:view>
                          
                          
                          </ui:composition>
                          

                           

                           

                          i have this:

                          operadorprobl2.jpg

                           

                          I using the portletfaces-bridge-2.0.0-BETA2.jar.

                           

                          thanks

                          • 10. Re: xhtml does not show the interface RichFaces
                            Victor Augusto Zago Menegusso Newbie

                            Sorry for delay codo,

                            I tried what you gave me, and the result was as follows:

                             

                            operadorproblema.jpg

                             

                            thanks


                            • 12. xhtml does not show the interface RichFaces
                              Victor Augusto Zago Menegusso Newbie

                              I am more than a week trying to do that, I'm thinking it's missing some jar, do not showerrors on the server or the IDE

                              • 13. xhtml does not show the interface RichFaces
                                Alexander Smirnov Master

                                In portals, you should use JSF 2 portlet bridge. There are no releases yet, try to build it from source ( svn repository is https://svn.jboss.org/repos/portletbridge/branches/3.0.X ).

                                • 14. xhtml does not show the interface RichFaces
                                  Victor Augusto Zago Menegusso Newbie

                                  Hi Alexander Smirnov

                                   

                                  I was using the portletfaces-bridge-2.0.0-BETA2

                                  and I try with the portletbridge-api-2.1.0.FINAL.jar, portletbridge-impl-2.1.0.FINAL.jar

                                  and also did not work

                                   


                                  1 2 Previous Next