8 Replies Latest reply on Aug 3, 2007 4:00 AM by harpritt

    Ajax + Seam Advice

    harpritt

      Hello lads and ladies

      My seam project is coming allong really well, its been a bit of a slog but well worth it.

      Ive come to the point where i need to add some Ajax functionality and have a choice between IceFaces and Ajax4JSF.

      Ive spent about 4 hours trying to get ICEfaces to work with my project and failed miserably.... so have decided to give AJAX4jsf a shot.

      Before i start configuration i was wonding what the users of this board think of ICEFaces and Ajax4JSF... ps im using seam 1.2.

      Ive noticed a few people have compained about the navigation cocking up when they have attemped to use ICEfaces... ?

      anyway ... your advice and thougts are as allways greatly appreciated.

        • 1. Re: Ajax + Seam Advice
          damianharvey

          I'm using Ajax4JSF+Richfaces and think that they work well. I particularly like how ajax4jsf can be added to most components to allow for all sorts of ajax interaction. Very little config required as well especially if using projects structure generated by SeamGen.

          • 2. Re: Ajax + Seam Advice
            harpritt

            Nice one Damien

            I was hoping that there would be less config, i followed the ICEFaces config as detailed in the Seam book by Yuan and co but all i got was

            16:15:18,093 INFO [Lifecycle] starting up: org.jboss.seam.security.identity
            16:15:18,171 WARN [SessionDispatcher] java.lang.ExceptionInInitializerError
            16:15:18,171 ERROR [ExceptionFilter] uncaught exception
            javax.servlet.ServletException: javax.servlet.ServletException: Session expired
             at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:89)


            and some poor saps in the same boat at

            http://www.icefaces.org/JForum/rss/topicPosts/5108.page

            ... My project is based on the Ticketing example.

            I dont know what richFaces is so i will look it up.

            I really wanted to use ICEFaces but i guess that will have to wait for Seam 2.

            i have to demo this app next week and the last thing i want is for it to cock up on some ajax..

            ..... i cant wait for ajax 2..... bring it on baby!

            • 3. Re: Ajax + Seam Advice
              harpritt

              Cool

              I googled around and learnt that the "Booking" example uses Ajax4Jsf...

              nice one Gavin and Todd Smart - examples save me again

              anyone thats interested can find another exampe in JIRA
              http://jira.jboss.com/jira/browse/JBSEAM-388

              .......lets see if i can get this nut cracked by 11pm....

              Harpritt

              • 4. Re: Ajax + Seam Advice
                damianharvey

                Richfaces is done by the same guys (and gals?) as Ajax4JSF. They are being merged into one project.
                http://livedemo.exadel.com/richfaces-demo/

                If you create a SeamGen project and use "seam generate-entities" to create some pages, they will already have both richfaces and ajax4jsf in them. Easy to expand into what you want.

                Cheers,

                Damian

                • 5. Re: Ajax + Seam Advice
                  harpritt

                  Damienn

                  i think ive sorted it... 30 min not bad aye


                  add this to my web.xml

                   <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>
                   <url-pattern>*.seam</url-pattern>
                   </filter-mapping>
                  
                   <context-param>
                   <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
                   <param-value>org.jboss.seam.ui.facelet.SeamFaceletViewHandler</param-value>
                   </context-param>
                  
                   <context-param>
                   <param-name>org.ajax4jsf.SKIN</param-name>
                   <param-value>blueSky</param-value>
                   </context-param>
                  



                  Disabled the faceletview handler in the faces config

                  <!--view-handler>org.jboss.seam.ui.facelet.SeamFaceletViewHandler</view-handler-->


                  and added the Ajax4jsf and RichFaces jars to my WAR, and add also added oscache for fun...

                  and that was it... is it that simple?



                  • 6. Re: Ajax + Seam Advice
                    damianharvey

                    If you are using Seam 2.0.0 Beta then I don't think you even need that config - it's even easier.

                    • 7. Re: Ajax + Seam Advice
                      tony.herstell1

                      I have been using ICEfaces with great success however I moved to Seam 2 and this has totally broken ICEfaces!

                      The ICEfaces team are working on it as fast as they can but it made your experience of ICEfaces very unpleasant.

                      ICEfaces have provided a icefaces-seam-gen to the Seam team, which may be merged with seam-gen to allow you to easily create an ICEfaces project.

                      It really was very easy to work with ICEfaces with Seam in the past.

                      All the confusion of JSF1.1 Vs 1.2, MyFaces vs SUNRI, RichFaces, ICEfaces, AJAX4JSF etc. has made configuring projects a bit of an art!...

                      • 8. Re: Ajax + Seam Advice
                        harpritt

                        Hi Gents

                        .... Lol Damian that sound good to me.... when SEAM 2 goes GA ill be there !

                        Cheers for the reply Tony, i havent given up on ICEFaces just put it on the back burner until i have some more time to mess about with configuration - the experience was not unpleasant its all learning at the end of the day.

                        "All the confusion of JSF1.1 Vs 1.2, MyFaces vs SUNRI, RichFaces, ICEfaces, AJAX4JSF etc. has made configuring projects a bit of an art!... "

                        ...... agreed.....

                        I took a break from coding for about 1.5 years and coming back to find Seam, JSF, ICEFases, Ajax4JSF is brilliant i dont know where to look what to try...... really really reall cool stuff.