2 Replies Latest reply on Nov 17, 2008 10:50 AM by Chris Simons

    a4j:support clearing input values

    Chris Simons Expert

      All,

      Having upgraded to RichFaces 3.2.2.GA, it seems that dropdowns (particularly) that use a4j:support to "reRender" an entire form are also clearing the data that was entered in input fields.

      Also, having trouble getting a conditional ui:fragment to reRender from the a4j:support individually - hence the reason I'm reRendering the entire form.

      I am using s:decorate and Seam 2.0GA but this wasn't a problem before. Any ideas? Thanks.

      Sample code below...

      <tr>
      <s:decorate id="countryDecorate" template="/layout/forms/edit.xhtml">
      <ui:define name="label">Country:</ui:define>
      <ui:param name="colspan" value="1"/>
      <h:selectOneListbox id="country" size="1" required="false"
       value="#{cvEvent.address.country}">
       <a4j:support event="onchange" ajaxSingle="true" reRender="createEventForm"bypassUpdates="true"/>
      <s:selectItems var="value" label="#{value.description}"
       value="#{valueManager.values['Country']}" />
       <s:convertEntity />
      </h:selectOneListbox>
      </s:decorate>
      <s:decorate template="/layout/forms/emptyEdit.xhtml" />
      </tr>
      <ui:fragment id="uiDisplayState" rendered="#{cvAddress.country.name == 'US'}">
      
      <tr>
      <s:decorate id="stateDecorate" template="/layout/forms/edit.xhtml">
      <ui:define name="label">State:</ui:define>
      <ui:param name="colspan" value="1"/>
      <h:selectOneListbox id="state" size="1" required="false"
       value="#{cvEvent.address.state}">
      <s:selectItems var="value" label="#{value.description}"
       noSelectionLabel="#{messages['form.controls.noSelectionLabel']}"
       value="#{valueManager.values['State']}" />
       <s:convertEntity />
      </h:selectOneListbox>
      </s:decorate>
      <s:decorate template="/layout/forms/emptyEdit.xhtml" />
      </tr>
       </ui:fragment>