4 Replies Latest reply on Mar 4, 2010 5:44 AM by Ilya Shaikovsky

    HtmlAjaxCommandButton Problem

    Ricardo Alba Newbie
      Building an HtmlAjaxCommandButton by code in seam 2.2:

      MethodExpression meF = Utils.getExpressionFactory().
      createMethodExpression(FacesContext.getCurrentInstance().getELContext(),
          "#{"+this.action+".moveRMdBRW}", null, new Class[]{ActionEvent.class});
             
      HtmlAjaxCommandButton acb = new HtmlAjaxCommandButton();
      acb.setValue("HOLA");
      acb.addActionListener(new MethodExpressionActionListener(meF));
      pgo.getChildren().add(acb);
         
      I get an javascriot error and doesn't work.
             
             
      Any Idea
         
      Regards