1 Reply Latest reply on May 29, 2008 1:59 PM by Sergey Smirnov

    submit only some fields

    Leo - Newbie

      hello!
      I am working with richfaces 3.2.0.GA.

      I have one page with one form. The form has several fields to store in my bean when I click the mainButton. But inside the form there are one specificField that I use to build with ajax a dynamicList, so when I click in in a ajaxLink then I put a new item in the dynamicList.

      Here is my code:


      <a4j:form id="myForm">
      .....................
      .... form fields ....
      .....................
      
       <h:inputText id="specificField" value="#{myBean.specificField}" />
      
      
       <a4j:commandLink id="ajaxLink"
       action="#{myBean.addItem}"
       reRender="dynamicList">
       <s:conversationId />
       </a4j:commandLink>
      
       <a4j:outputPanel id="myOutputPanel" ajaxRendered="true" >
       <rich:orderingList id="dynamicList" value="#{myBean.list}" var="r">
       <rich:column>
       <f:facet name="header">
       <h:outputText value="HEADER"/>
       </f:facet>
       <h:outputText value="#{r.property}"/>
       </rich:column>
       </rich:orderingList>
       </a4j:outputPanel>
      
      ..........................
      .... more form fields ....
      ..................... .....
       <a4j:commandButton id="mainButton"
       action="#{myBean.saveMyForm}">
       <s:conversationId/>
       </a4j:commandButton>
      </a4j:form>
      



      The problem is that validation errors of other fields (except specificField ) cause not to rerender the list correctly. If no validation errors the list rerenders fine. So I have two question for you?


      1. Is posible to submit only a few values with a4j:commandLink, or similar component?
      2. If not, is possible to force rerender of dynamicList even if fails validation of other fields?



      Thanks in Advance