1 Reply Latest reply on Mar 3, 2010 11:50 AM by Ricardo Alba

    HtmlAjaxCommandButton Problem

    Ricardo Alba Newbie
      Building an HtmlAjaxCommandButton by code:

      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