1 Reply Latest reply on Mar 3, 2010 11:50 AM by richardcc.ralbaa.dragosolutions.com

    HtmlAjaxCommandButton Problem

    richardcc.ralbaa.dragosolutions.com
      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