3 Replies Latest reply on Apr 5, 2010 3:29 AM by Ilya Shaikovsky

    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()
          {
              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 selcted menuItem value from <f:setPropertyActionListener