0 Replies Latest reply on Jun 4, 2007 11:13 AM by juja76

    EvaluationException for MethodBinding (creation of UICompone

    juja76

      hello,

      my server setup:
      JBoss [Zion] 4.0.5.GA (build: CVSTag=Branch_4_0 date=200610162339)
      JBoss Seam - Version 1.2.1.GA

      no changes have been done to the libraries supplied with JBoss server and Seam.

      Following code works perfectly in my page:
      <s:link view="/help.xhtml" action="#{menuManager.selectFirstLevel('HELP')}" value="Help"/>

      But when I'm trying to build one of the components <rich:toolBarGroup binding="#{firstToolBarGroup}"/> within the same page dynamicaly using Java code:
      HtmlLink link = new HtmlLink();
      MethodBinding actionBinding = FacesContext.getCurrentInstance().getApplication().createMethodBinding("#{menuManager.selectFirstLevel('" + object.get("key") + "')}",new Class[] {String.class});
      link.setAction(actionBinding);

      during the page rendering the server throws follwing exception:
      javax.faces.el.EvaluationException: /layout/menu.xhtml @8,56 binding="#{firstToolBarGroup}": Invalid expression: '${menuManager.selectFirstLevel('SALES')}'
      at com.sun.facelets.el.LegacyValueBinding.getValue(LegacyValueBinding.java:60) ...

      Not sure what I'm doing wrong, could you please help me.