10 Replies Latest reply on Nov 12, 2007 1:14 PM by nfeybesse

    RichFaces and login-required="true" in pages.xml

    j99976

      Hi,

      There seems to be an issue where if you set login-required="true" against view-id="*" in pages.xml, the colours of the RichFaces components fail to render. There is no error.

      Its easy to replicate, use seam-gen to generate a new project, then go to the url. It looks ok. Then modify the first in pages.xml to add login-required="true":
      <page view-id="*" login-required="true">

      <rule if-outcome="home">
      <redirect view-id="/home.xhtml"/>




      When you reload the app ( I even tried rebuilding), the RichFaces skin has disappeared. You may need to refresh to see this. When you remove the login-required attribute, the skin is back when you reload.

      I found this in Seam 2.0 CR2, and its in CR3 as well. Maybe its a RichFaces issue?

      Do I need to submit a JIRA ticket in Seam or Richfaces?

      Thanks

        • 1. Re: RichFaces and login-required=
          franciscoacb

          Hi!

          Please, look at:
          http://www.jboss.com/index.html?module=bb&op=viewtopic&t=119251

          Maybe it can help you.

          Cheers,
          Francisco Antônio
          "Although nobody can come back and make a new start, anyone can start now and make a new end."

          • 2. Re: RichFaces and login-required=
            j99976

            Hi Francisco,

            Thanks for that, I did see it, but I think its a different issue. My problem doesn't have an error, and this issue doesn't mention losing the richfaces display graphics. Maybe it is related.

            Should I update this JIRA issue, or create a new one?

            Or maybe I'm configuring pages.xml wrong?

            Thanks again

            • 3. Re: RichFaces and login-required=
              pmuir

              Version of RichFaces?

              • 4. Re: RichFaces and login-required=
                j99976

                The one that came packaged with Seam CR2 and CR3 each. 3.1.1 for CR3. I didn't change any component libraries.

                I reproduced it on a clean install with JBoss 4.2.0. I used seam-gen to make a new project, and updating pages.xml, and the problem happens either straight away, or after some usage. On CR2 it happened straight away.

                Thanks for taking a look Pete.

                • 5. Re: RichFaces and login-required=
                  pmuir

                  CR3 came with RichFaces 3.1.2.GA - please try using that as it included a number of lifecycle related fixes (which this points at).

                  • 6. Re: RichFaces and login-required=
                    j99976

                    Hi Pete,

                    I have replicated the problem using CR3 and RichFaces 3.1.2.

                    I created a project using seam-gen, then I created a couple of CRUD screens via generate-entities. I set login-required="true" as above.

                    I acessed the url, and I logged in. I flicked around a few of the generated screens (which, I have to say is very beautiful with RichFaces out of the box. I think it beats Rails in a few ways).

                    Then, I logged out. I tried to go to one of the generated CRUD List screens. Some cached page appeared, it did not direct to the login screen as normal. However, I refreshed this screen, ad it directed to the login screen, but without the RichFaces skin.

                    Flicking around the screen, some of the Richfaces components have a skin, such as the calendar, and some tabs But the main menu skin is gone (rich:toolbar), and main content (rich:panel)

                    Thanks for your help. Let me know if you think I should take it up on the RichFaces forum, or create a ticket.

                    • 7. Re: RichFaces and login-required=
                      pmuir

                      If you can create a reproducible example, please create a jira issue in the Seam jira and attach it.

                      • 8. Re: RichFaces and login-required=
                        j99976

                        Thanks Pete, I'll do that

                        • 9. Re: RichFaces and login-required=
                          j99976

                          Hi Pete, I created JBSEAM-2186. I hope its ok, first ticket I created.

                          Thanks

                          • 10. Re: RichFaces and login-required=
                            nfeybesse

                            I have the same problem with a redirect in page action method :
                            I loose the CSS of all my simpleTogglePanels...

                            Pages.xml :

                            <page view-id="/templates/template.xhtml"
                             action="#{genericSystemAction.genericAction}">
                             Application
                             </page>


                            GenericSystemAction.java :

                            public void genericAction(){
                             if(!Identity.instance().isLoggedIn())
                             if(!autoLogin())
                             Pages.instance().redirectToLoginView();
                            ...