1 2 Previous Next 24 Replies Latest reply on Dec 4, 2011 6:25 PM by paul.dijou Go to original post
      • 15. Re: PrimeFaces and RichFaces compatibility issue
        jbalunas

        Hi Guys,

         

        One of the goals of JSF 2 was to make it easier for component libraries to interoperable, and as component libraries are being developed, work will be required by all libraries to make that really happen.

         

        The RichFaces team is focused on getting 4.0.0.Final out, but we are also looking at other issues like this.  I'm guessing to support this will be a mixture of solutions across both projects.  Not stepping on each others feet, and coordinating 3rd party libraries accross projects is very difficult.  We are going to have to discuss this with primefaces and others to see where the problems are.

         

        Please keep letting us know where you find issues and we'll try to address and review, although timing is tight given how close 4.0.0.Final release is.

         

        -Jay

        • 16. PrimeFaces and RichFaces compatibility issue
          pmeidl

          Jay Balunas wrote:

           

          One of the goals of JSF 2 was to make it easier for component libraries to interoperable, and as component libraries are being developed, work will be required by all libraries to make that really happen.

           

          to stress this important goal was exactly why I posted this issue. for me, making this happen would be the killer argument for choosing JSF over other Java web frameworks.

           

          The RichFaces team is focused on getting 4.0.0.Final out, but we are also looking at other issues like this.  I'm guessing to support this will be a mixture of solutions across both projects.  Not stepping on each others feet, and coordinating 3rd party libraries accross projects is very difficult.  We are going to have to discuss this with primefaces and others to see where the problems are.

           

          thanks Jay, I totally understand the difficulties, and I appreciate your efforts very much.

           

          Please keep letting us know where you find issues and we'll try to address and review, although timing is tight given how close 4.0.0.Final release is.

           

          will keep posting

           

          cheers, Patrick

          • 17. PrimeFaces and RichFaces compatibility issue
            jerarckill

            Understood!

            I'll keep testing your solutions and post my findings, as time allows of course.

             

            thank you for the hard work!  It's really appreciated.

             

            Jer

            • 18. Re: PrimeFaces and RichFaces compatibility issue
              stephane_

              Sorry for the delayed response.

               

              I created a test webapp with PrimeFaces 2.2 and RichFaces 4 M6 running on JBoss 6.

               

              http://localhost:8080/TestFaces/home.jsf

               

              1/ Click on the go link  , the menu is broken.

              2/ Remove calendar from home.xhtml still broken

              3/ Remove the fix from the default.xml  , it works

              4/ Put back the calendar (no fix) it is broken.

              • 19. PrimeFaces and RichFaces compatibility issue
                nbelaevski

                Thanks much, I'll take a look!

                • 20. PrimeFaces and RichFaces compatibility issue
                  artdaw

                  You can use the following workaround: place <rich:jQuery rendered="false" /> in the very beginning of <h:body>.

                  • 21. Re: PrimeFaces and RichFaces compatibility issue
                    jinalu

                    Hi,

                    I'm also having primefaces and richfaces compatibility problem. I'm using primefaces 2.2 and richfaces 4.1.0-SNAPSHOT. Everything works quite fine except when I primeface menu component button it looses its style for several seconds while redirecting from other page.

                    This happens only if I go from page which uses both libraries components.

                    Any suggestions? Thanks a lot for help.

                    Lu

                    • 22. Re: PrimeFaces and RichFaces compatibility issue
                      jbalunas

                      That is a strange one - what debugging have you done on this so far? 

                       

                      Can you isolate this into a small example that you can share?

                      • 23. Re: PrimeFaces and RichFaces compatibility issue
                        jinalu

                        Thanks for such quick reply Jay Balunas. I have created simple application for testing. Eclipse project attached.

                        Problem visible when you push menu button (when page reloads).

                         

                        Important: This problem is reprodusable only with firefox with IE it works well.

                         

                        Also I noticed that it happens then both primefaces and richfaces are used in the same page we are navigating from and richfaces components such as fileupload or calendar are used.

                        • 24. Re: PrimeFaces and RichFaces compatibility issue
                          paul.dijou

                          Hi there,

                           

                          Don't know if it is a good idea to resurect an old topic but since I am facing exactly the same problem as above, let's continue on it.

                           

                          I have an application using Primefaces 3, everything fine, cool toolbar with buttons, menu buttons, .. and looking like that (screenshot 1) :

                           

                          toolbar1.png

                           

                          Today, adding RichFaces 4.0.0.Final to the project, the Maven way, compile, all ok. Next, adding the two following line on the XHTML page :

                           

                          xmlns:a="http://richfaces.org/a4j"
                          xmlns:r="http://richfaces.org/rich"
                          

                           

                          Still everything fine. Now adding a basic RichFaces component like the Panel on the XHTML page. Ok, still working. Next adding a complex RichFaces component like the Calendar... KABOOOOOMMM !!! Here is the new look (screenshot 2) :

                           

                          toolbar2.png

                           

                          And it is not only about the style, some JavaScript features are also broken : menu buttons (like Locale, Theme and Debug) which normally show something onclick no longuer work. Wait... I have read somewhere (here) that RichFaces has an automatic skinning for main HTML tag (including buttons I guess). Let's disable it in the web.xml by adding :

                           

                          <context-param>
                                    <param-name>org.richfaces.enableControlSkinning</param-name>
                                    <param-value>false</param-value>
                          </context-param>
                          

                           

                          New look (screenshot 3) :

                           

                          toolbar3.png

                           

                          Ok, so no longuer RichFaces style, but same for the Primefaces style... and JavaScript still not working. Dammit. Trying the solution proposed by Nick and adding "<h:outputScript name="jquery.js" target="head" />" on the "<h:head>" tag. Everything looks fine when I load the page, great, but if I try to submit an action (change the locale which reload the page with ajax, loading a new messages.properties file for labels), KABOOOM again, back to screenshot 3.

                           

                          The problem is probably comming from one of the JS file included by the calendar, here are both the content of my head tag with and without the calendar component :

                           

                          heads.png

                           

                          Quite a difference.

                           

                          And here is my blocking point, don't know what to do next. I don't understand a few thing. Why is the automatic skinning only apply when the calendar is on the page and not when the panel is on it ? Shouldn't it apply on every pages by default ? And why does it still remove Primefaces classes and JavaScript events even after I have manually disable it in the web.xml ? See screenshot 3 : the ECSS file is no longuer included by adding the param on the web.xml but still the Primefaces classes are removed from button tags.

                           

                          Thanks for your help.

                           

                          In annex, a few lines of code : the "Locale" menu button on the toolbar. XHTML code :

                           

                          <p:menuButton value="Locale : #{userLocale}"
                                    model="#{localeSelector.menuModel}"></p:menuButton>
                          

                           

                          The HTML code rendered without the RichFaces calendar on the page :

                           

                          <button type="button" name="j_idt9:j_idt26_button" id="j_idt9:j_idt26_button" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-icon-primary" role="button" aria-disabled="false">
                                    <span class="ui-button-icon-primary ui-icon ui-icon-triangle-1-s"></span>
                                    <span class="ui-button-text">Locale : en_US</span>
                          </button>
                          

                           

                          And the HTML code rendered with the RichFaces calendar (notice the missing "class" attribute and other Primefaces attributes, also two "span" tag removed)  :

                           

                          <button type="button" name="j_idt8:j_idt25_button" id="j_idt8:j_idt25_button">Locale : en_US</button>
                          

                           

                          Hope this will help you to solve the problem. Can provide any other information if asked.

                          1 2 Previous Next