0 Replies Latest reply on Apr 1, 2010 8:35 AM by Anandhi simon

    In rich:dropDownMenu i have used binding to set the menuItem. i need to get the value of dynamically renender menuItem on selecting the item

    Anandhi simon Newbie
      UI bindings:

      <rich:dropDownMenu direction="bottom-right" jointPoint="tr"
                            submitMode="server" binding="#{backing_activityCreate.menuComponent}">
                  <a4j:support event="onitemselect"  action="#{backing_activityCreate.changeActivityType}" >
                    <f:setPropertyActionListener  value="#{backing_activityCreate.activityTypesMenu}" target="#{backing_activityCreate.selectedActivityTypeCode}" />
                    </a4j:support>
                               </rich:dropDownMenu>
      Backing Bean:
      public void getDropDownMenuActivityTypes()
          {
              selectedActivityTypeCode = new AppComActivityType();
              activityTypesMenu = getActivityBaseEJB().getAllActivityTypesWhereParentActivityTypeIdIsNull(firmId);

       

              for (AppComActivityType menuItem : activityTypesMenu)
              {
                  HtmlMenuItem htmlMenuItem = new HtmlMenuItem();
                  HtmlMenuGroup htmlMenuGroup = new HtmlMenuGroup();

       

                  List<AppComActivityType> childActivity = getActivityBaseEJB().getAllActivityTypesByParentActivityTypeId(firmId, menuItem.getActivityTypeId());

       

                  for (AppComActivityType selectGroup : childActivity)
                  {
                      htmlMenuGroup.setValue(menuItem.getName());
                      HtmlMenuItem htmlMenuItemSub = new HtmlMenuItem();
                      htmlMenuItemSub.setValue(selectGroup.getName());
                      htmlMenuGroup.getChildren().add(htmlMenuItemSub);
                  }
                      htmlMenuItem.setValue(menuItem.getName());
                      menuComponent.getChildren().add(htmlMenuItem);
                }
          }
      I am not able to get the select menuItem value from the <f:setPropertyActionListener>