5 Replies Latest reply on Nov 26, 2009 9:26 AM by tc1st910437

    Binding HtmlMenuItem to MenuItem problem

      Hello, I'm trying to binding a web ui component, but can not success.

      There is "CREATE HtmlMenuItem OK!!!" message show in eclipse console without error,
      but no "888" menu item in the drop down menu.

      The project was create by eclipse -> New -> Seam Web Project,
      and I copy "richfaces-impl.jar", "richfaces-ui.jar" to project-ear/EarContent/lib in eclipse.

      Should I need other setting or configuration??

      Who can tell me what is the problem, please.

      @Name("testBean")
      public class TestBean {
      
       private HtmlMenuItem hmi;
      
       public HtmlMenuItem getMenuItem() {
       if (hmi == null) {
       hmi = new HtmlMenuItem();
       }
       hmi.setSubmitMode("none");
       hmi.setValue("888");
       System.out.println("CREATE HtmlMenuItem OK!!!");
       return hmi;
       }
      
       public void setMenuItem(HtmlMenuItem hmi) {
       this.hmi = hmi;
       }
      }

       <h:form>
       <rich:toolBar>
       <rich:dropDownMenu submitMode="none" value="OXOX">
       <rich:menuItem submitMode="none" value="777">
       </rich:menuItem>
       <rich:menuItem binding="#{testBean.menuItem}">
       </rich:menuItem>
       <rich:menuItem submitMode="none" value="999">
       </rich:menuItem>
       </rich:dropDownMenu>
       </rich:toolBar>
       </h:form>
      


      My develope tools:
      eclipse j2ee 3.5.1
      jboss tools 3.1.0 milestone 4
      jboss 5.1.0 ga
      jboss-seam 2.2.0 ga