0 Replies Latest reply on Jul 23, 2007 2:04 PM by Bailey Peng

    Component does not

    Bailey Peng Newbie

      Hi,

      I've seen this problem posted, but never a solution for it. If there is a solution, please kindly reply and direct me to it. The problem is as follows:

      InputText component is tied to inputTextarea component with ajax4jsf as follows:

      <h:form>
      <a4j:outputPanel>
      <t:messages/>
      </a4j:outputPanel>
      </h:form>

      <h:form>

      <a4j:region renderRegionOnly="false">
      <t:inputText id="testCaseDescriptionInput" size="20" value="#{BackingBean.description}">
      <a4j:support reRender="inputDisplay" ajaxSingle="true" event="onkeyup"/>
      </t:inputText>
      </a4j:region>

      <t:inputTextarea id="inputDisplay" value="#{BackingBean.testCaseString}" validator="#{BackingBean.validateInput}"/>

      <a4j:commandButton value="#{BackingBean.addTestCase}"/>

      </h:form>

      testCaseString has both a setter and a getter defined because inputTextarea is used both as a display panel and an editable textarea.

      As you can tell, as inputs are being entered in the inputText component, the inputTextarea component is being updated simultaneously (on "onkeyup" event). It functions perfectly, until the commandButton is clicked on, the input validator method throws a ValidatorException due to bad input, and the error message is displayed on the JSP. Then the problem occurs - entering input into the inputText component no longer updates the inputTextarea component.

      I tried the following with no luck:
      - surround inputTextarea component with the <a4j:OutputPanel> tag and reRender the OutputPanel instead of the inputTextarea.
      - update to ajax4jsf 1.1.1 from 1.1.0.

      I've also put in some print statements into the description setter method and testCaseString getter method. And I discovered that after input validation fails and the problem occurs, the getter of testCaseString is no longer being called as it should be!

      Does anyone have a solution to this problem?

      This is an urgent request. Please HELP!

      Bailey