7 Replies Latest reply on Jul 5, 2009 4:15 PM by nbelaevski

    a working RichFaces tree project

      Hi,

      since i am new to all this jsf, richfaces and facelets technologies i have a lot of problems in writing even simple applications with rich faces.

      I want to make a jsf project with eclipse using the richfaces tree component. and i have found also the components page http://livedemo.exadel.com/richfaces-demo/richfaces/tree.jsf?tab=model&cid=1253467 where this is explained but i find that explanation very poor for me. I dont know what do i have to do with web.xml and faces-config.xml.
      i don't even know if the source code of the first file (where the component is) should be copied as it is or pasted inside another file with html and jsf tags. after all in that file there is no html title and body tag.
      i added the jsf-facelets.jar file in WEB-INF/lib folder but eventhough i can't see the facelets taglib in the Tag Libraries folder in eclipse. It would be great from RichFaces team not to post only code snippets but also full working projects for us beginners:)

      So the question now: Can anyone please upload a hole eclipse jsf-project (as zip archive)that uses the Richfaces tree component and the codes on the components page from where i can get started and learn how it works?

      Thanks for the help.

        • 1. Re: a working RichFaces tree project
          nbelaevski

          Hi,

          You can import .WAR file into Eclipse: http://repository.jboss.org/maven2/org/richfaces/samples/richfaces-demo/3.3.1.GA/ or checkout livedemo sources
          http://anonsvn.jboss.org/repos/richfaces/tags/3.3.1.GA/samples/richfaces-demo/ and import into Eclipse using m2eclipse plugin or create Eclipse project files by running "mvn eclipse:eclipse" Maven goal.

          • 2. Re: a working RichFaces tree project

            ok i tried to get those files you said me. i tried to download three different versions of the .war files and import them in eclipse. i tried to import them just as .war files and also as jsf projects from.war files but nothing works. all the 3 different files i got are with errors.
            these are the files i tried:
            1. richfaces-demo-3.3.1.GA.war
            2. richfaces-demo-3.3.1.GA-jee5.war
            3. richfaces-demo-3.3.1.GA-tomcat6.war

            and these are some of the problems

            Description Resource Path Location Type
            Start tag (<h:panelGrid>) not closed. reRender2.xhtml /Richfaces-demo-3.3.1.GA/WebContent/richfaces/calendar/examples line 4 HTML Problem
            

            Description Resource Path Location Type
            The markup in the document following the root element must be well-formed. beans.xml /Richfaces-demo-3.3.1.GA/WebContent/richfaces/stateAPI/snippets line 11 XML Problem
            

            Description Resource Path Location Type
            The markup in the document following the root element must be well-formed. cfg.xml /Richfaces-demo-3.3.1.GA/WebContent/richfaces/stateAPI/snippets line 6 XML Problem
            


            i tried then importing with maven form the second link you gave me and even that has problems.

            so again: Can anyone please upload an eclipse jsf-project (as zip archive)that uses the Richfaces tree component and the codes on the components page from where i can get started and learn how it works?

            Thanks for the help.

            please try to give me something that works. i don't like to lose anymore time in installing plugins and downloading things and not to have done even a small step forward. Thanks again

            • 3. Re: a working RichFaces tree project
              nbelaevski

              For the first step - I've successfully imported and launched richfaces-demo on Tomcat 6. You should try to run it either - problems in validating code snippets can be ignored.

              For the second step - importing Maven projects is a usual procedure we use for environment setup - it's very easy.

              • 4. Re: a working RichFaces tree project

                ok this are the steps i did

                1.downloaded the richfaces-demo-3.3.1.GA.war file
                2.imported it in eclipse
                3.run as -> run on server and choosed tomcat 6

                this is the way they should work isn't it?

                if not please let me know how to do it.

                the error i got doing it that way was:

                --------------------------------------------------------------------------------
                
                type Status report
                
                message /Richfaces-demo-3.3.1.GA/
                
                description The requested resource (/Richfaces-demo-3.3.1.GA/) is not available.
                
                


                • 5. Re: a working RichFaces tree project
                  nbelaevski

                  The sequence is ok, but you should use richfaces-demo-3.3.1.GA-tomcat6.war for Tomcat 6.

                  • 6. Re: a working RichFaces tree project

                    finally it works thank you nbelaevski for your help and time. i will just go through the codes and study them a little bit

                    • 7. Re: a working RichFaces tree project
                      nbelaevski

                      You welcome. BTW, in the imported project Java source files are here: richfaces-demo\src\main\webapp\WEB-INF\src.