1 Reply Latest reply on Jan 6, 2009 6:54 AM by ilya_shaikovsky

    Dymanic actions with HtmlMenuItem`

    h.elmougy

      I have the following menu builder method, suppose it navigate to the to binding Expression
      but i did nothing, and there is no exception

      public void setMenu(HtmlDropDownMenu menu) {
      this.menu = menu;
      this.menu.getChildren().clear();
      HtmlMenuItem item;
      for(Object obj : menuList){
      item = new HtmlMenuItem();
      Application app = FacesContext.getCurrentInstance().getApplication();
      MethodExpression mBinding =
      app.getExpressionFactory().createMethodExpression(FacesContext.getCurrentInstance().getELContext(), "#{taskBarImpl.nav}",String.class ,new Class[]{ });
      item.setActionExpression(mBinding);
      item.addActionListener(new MethodExpressionActionListener(mBinding));

      addToMenu(item, obj.toString());

      }

      }



      need help