11 Replies Latest reply on Feb 21, 2008 4:13 AM by ayanul

    Page Navigation using PanelMenuItem - Can anyone please help

    aish

      Hi,

      I am using panelmenuitem to define the menu list and navigate based on the menu selection. My navigation jsp page is coded as

      === pagemenu.jsp ===

      <rich:panelMenu style="width:200px" mode="ajax"
      iconExpandedGroup="disc" iconCollapsedGroup="disc"
      iconExpandedTopGroup="chevronUp" iconGroupTopPosition="right"
      iconCollapsedTopGroup="chevronDown"
      selectedChild="#{UINavigation.activeItem}"
      expandSingle="true">

      <rich:panelMenuGroup label="Table Information" expanded="true"
      immediate="true" ignoreDupResponses="true" name="tables">

      <rich:panelMenuItem label="New Table" name="New"
      action="#{UINavigation.doNew}">
      </rich:panelMenuItem>
      </rich:panelMenuGroup>

      </rich:panelMenu>

      ===

      The corresponding backing bean is given as:

      public class UINavigation
      {
      private String tablename;
      private String activeItem;

      public void setActiveItem(String tmpActiveItem)
      {
      this.activeItem = tmpActiveItem;
      }
      public String getActiveItem()
      {
      return activeItem;
      }

      public String doNew()
      {
      activeItem="New";
      return "New";
      }
      ===
      In faces-config.xml, the navigation case is defined as

      <navigation-rule>
      <navigation-case>
      <from-outcome>New</from-outcome>
      <to-view-id>/goNew.jsp</to-view-id>
      </navigation-case>
      </navigation-rule>

      ===

      When I deploy this application and select the menu item, either
      1. It takes a very long time to display the information for this menu item or it does not display at all sometimes.

      2. Only, when I click the refresh button and then select the second menu item, then the information about the second item is displayed.

      3. I do see a message on the window status "downloading org.ajax4jsf... etc every time I select an menu item.

      I am learning JSF and richfaces now. I am not sure if the above method of implementing page navigation using panelmenuItem is correct or not..

      If you could help me to make this menu work, would be greatly appreciated.

      Please let me know your suggestions
      Thanks
      Aish