7 Replies Latest reply on Mar 22, 2011 4:31 AM by Ilya Shaikovsky

    Suggestion needed

    Ravi kiran Kuchika Newbie



           Am using Richfaces 4.0 and JSF 2.0.  I got a requirement where in its explained below.


      Requirement: I have a header, body,footer. In my header I have a menu, and on click of that menu I should show a page related to that menuitem without refreshing the complete page.


      Can any one of you suggest a solution..




      Ravi Kuchika

        • 1. Suggestion needed
          Ilya Shaikovsky Master


          <a:outputPanel layout="block" id="body">

          <ui:include src=#{controller.currentPage}/>



          change include then as needed in action and render the outputPanel with new include.

          • 2. Suggestion needed
            Nick Belaevski Master



            RichFaces 4 has drop down menu, use it in ajax mode.

            • 3. Suggestion needed
              Ravi kiran Kuchika Newbie

              Hi Ilya Shaikovsky,



                 If I keep on including the pages will it not effect the performance of the application. And more over my beans should be in keepalive state and I manually clear those beans from the map which I am not interested in it.



              Ravi Kuchika

              • 4. Suggestion needed
                Ravi kiran Kuchika Newbie

                Hi Nick,


                    I tried with Dropdownmenu using binding. Its not working and giving a javascript error "Richfaces not found". And my menu is not showing the menuitems.


                Please help me.


                Code snippet:


                UIDropDownMenu dropDownMenu = null;

                  for (int i = 0; i < 4; i++) {

                          dropDownMenu = new UIDropDownMenu();

                          dropDownMenu.setStyle("border:1px solid");




                        HtmlOutputText htmlOutputText = new HtmlOutputText();


                        dropDownMenu.getFacets().put("label", htmlOutputText);

                        UIMenuItem uiMenuItem = null;



                           for (int j = 0; j < 4; j++) {

                              uiMenuItem = new UIMenuItem();






                               dropDownMenu.getChildren().add(uiMenuItem);   }







                Xhtml code :

                <rich:toolbar binding="#{menuNavigationBean.uiToolbar}">



                Ravi Kuchika








                • 5. Suggestion needed
                  Ilya Shaikovsky Master

                       At first using Nick's suggestion you still have to render construct the body part from the menu. And really two ways there to construct it from java code (I do not think convinient/maintainable) or to use the same dynamic includes.


                       As for the problem with menu construction - http://community.jboss.org/message/594045#594045

                  • 6. Suggestion needed
                    Ravi kiran Kuchika Newbie

                    Thanks Ilya Shaikovsky


                    It solved the problem.But I don't think thats a nice solution. I got the same prob with tab panel also.

                    I tried the same solution by adding a tab with rendered false. In this case it didnt worked.


                    What am suppose to do?



                    Ravi Kuchika

                    • 7. Suggestion needed
                      Ilya Shaikovsky Master

                      actually should works. doublecheck that resources getting prerendered succesfully using firebug Net console.


                      About issues in general - should be adressed to JSF guys..