1 Reply Latest reply on Aug 12, 2011 5:52 AM by orkin

    Problem for navigation JSF 2 & Richfaces 4

    orkin Newbie

      I sorry for my bad english, I'm french.

       

      I have à problem with commandLink component to change my mainArea of my web application.

       

      I use mojarra 2.1.2  implementation of JSF 2 and Richfaces 4.0.0.FINAL, tomcat 6 or 7.

       

      I'll try to explain as precisely as possible my problem.

       

      I use a template to cut out my web application.
      - In my template I have a header that contains the login form and my banner.
      - I have a left menu and a menu at the top (just below the banner)
      - I have the body of the site which is on the right and the left menu in the top menu. I would like this body to cool down in ajax site as is the case of the "mainArea" in the sample RichFaces photoalbum
      - I have a footer

       

      So I have a rather traditional web architecture.

       

      My problem comes at the time, because when I click on a link to change the page it works fairly well, at least I go well in my bean and navigation although I assign to my component <ui: include sr = "myBean.mainArea "/> the correct value. The problem come when refreshing in ajax.

       

      I'll take the example of my page that contains the "FileUpload" ("/include/ajoutPhoto.xhtml"), it displays correctly but the component does not have CSS so I have a component that works but very ugly. If I press the F5 key to refresh the page (my bean navigation is stored in session, I find the same page containing the component) or if I click on the link again, I have the CSS is taken into account, I have a wonderful component and all is well in the brave new world.
      I would like to know if there is a solution to make a clean and refreshing to have the first try without having to click again or having to refresh the page. I said that so far I have no error in the component <a4j:log /> or in eclipse.

      This is the first problem. The second should be related to the first (at least I guess).

      In case I click on the link and I do not refresh the page if I click on another link, for example to return to the home page (I use the same navigation for my bean <ui: include ... /> but with a different value like "/include/index.xhtml" I get an error and I have absolutely reload the page with F5. This error occurs only in the component <a4j:log />.

      I do not remember unfortunately the error returned to me (so I edit this post when I was back home). I hope to start it will help you identify the problem. I've done some research and I could see that this problem was common but I have not found any solutions.


      Finally last thing I tried to switch to JSF 1.2 RichFaces 3.3.3.FINAL and to see if the problem exists on these versions and obviously I have the same concerns (I can deduce that the problem could come from me). On my return to previous versions of JSF I had great difficulty finding a maven 2 repository allowing me to get the libraries and tutorials to configure the various XML files.

      Thank you for taking the time to read. I hope this is understandable.

      Sincerely Orkin