9 Replies Latest reply on Dec 2, 2012 11:26 PM by Luis Eduardo Agudelo González

    Problem with updating values, a4j:commandButton

    Andrey Iskrich Newbie



      I have a problem with receiving updated value from a backing bean using actionListener or action attribute in a4j:commandButton.


      That's the point:

      part of my xhtml page:


      <h:form prependId="false" styleClass="style1">            
          <table cellpadding="0" cellspacing="2" border="2" bgcolor="#adff2f" align="center">
              <tr align="justify" valign="baseline">
                  <td colspan="5">
                      <h:inputText id="txtExpression" value="#{calcBean.expression}" ajaxRendered="true"/>
              <tr align="center" valign="middle">
                      <a4j:commandButton value="1" action="#{calcBean.add1}" reRender="txtExpression"/>


      the code of the event processor is:



      @ManagedBean(name = "calcBean")
      public class CalcBean {
           protected String expression = "2 + 3";
           /* Getters and setters */
           /* Action processors */
           public Object add1(){
              return null;


      So. After pushing button '1', i'm expecting to see "2+31" in my textArea, but it still showing 2+3.

      How can i fix it?