1 Reply Latest reply on Apr 11, 2011 12:03 PM by Pavol Pitonak

    Richfaces 4 not kicking in my samples

    paul brocelli Newbie

      Hello again,

      I've just solved the issue to build and deploy the richfaces-showcase and thought to use this .war  for testing RF 4.

      So I've tried adding to the showcase an hello.xhtml page :

       

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

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

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

                xmlns:f="http://java.sun.com/jsf/core"

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

                xmlns:a4j="http://richfaces.org/a4j"

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

       

                <rich:panel header="Panel with default Look-n-feel">

       

                          <h:graphicImage value="/images/icons/common/rf.png"

                                    style="float:right" />

                          RichFaces Example

        </rich:panel>

       

      </ui:composition>

       

      Now invoking http://localhost:8080/richfaces-showcase/hello.jsf

      does not render the rich panel. Only plain HTML is displayed, so Richfaces does not kick in.

      How can it be that the same example from the showcase works and mine not does not render RF ?

      Thanks a lot again

      Paul

        • 1. Re: Richfaces 4 not kicking in my samples
          Pavol Pitonak Master

          Hi,

           

          Showcase application uses quite complex templating mechanism. If you want to add a sample to the Showcase, do the following:

          1. create a new directory src/main/webapp/richfaces/hello

          2. create file src/main/webapp/richfaces/hello/hello.xhtml

           

          <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
          <ui:composition xmlns="http://www.w3.org/1999/xhtml"
                          xmlns:h="http://java.sun.com/jsf/html"
                          xmlns:f="http://java.sun.com/jsf/core"
                          xmlns:ui="http://java.sun.com/jsf/facelets"
                          xmlns:a4j="http://richfaces.org/a4j"
                          xmlns:rich="http://richfaces.org/rich">
              <rich:panel header="Panel with default Look-n-feel">
          
          
                  <h:graphicImage value="/images/icons/common/rf.png" />
          
          
              </rich:panel>
          </ui:composition>
          
          

           

          3. add following to the file src/main/resources/org/richfaces/demo/data/common/navigation.xml

           

          <group>
                  <name>Ajax Action</name>
                  <demos>
                      <demo>
                          <id>hello</id>
                          <name>hello</name>
                          <samples>
                              <sample>
                                  <id>hello</id>
                                  <name>Simple sample</name>
                              </sample>
                          </samples>
                      </demo>
                      <demo>
                          <id>ajax</id>
          
          ...
          

          4. deploy application and open http://localhost:8080/richfaces-showcase/richfaces/component-sample.jsf?demo=hello&skin=blueSky