5 Replies Latest reply on Aug 15, 2007 10:52 AM by Ilya Shaikovsky

    Ajax FastFilter and validation

    Blue Newbie

      Hey,

      I'm trying to use the FastFiler instead of the regular ajax4jsf filter to get faster speed with my ajax application...It's working okay when a user inputs the data correctly but as soon as the user input something incorrectly and the validation executes it doesn't complete the rest of the html in that particular section...Here is the code in question:

      
      <a4j:outputPanel id="editNodeSection">
      
      <div id="editNode" style="display:none">
       <div id="editNodeHeader"><h1>Node Edit</h1></div>
       <div id="editNodeContent">
       <div id="entry">
       <label>Node Number:</label>
       <div class="input">
       <h:inputText id="txtNodeNumber" value="#{node.node}" disabled="true" /><br/>
       <span class="errors"><h:message for="txtNodeNumber" /></span>
       </div>
       </div>
      
       <div id="entry">
       <label>AT Ready Date:</label>
       <div class="input">
       <h:inputText id="txtAtReadyDate" value="#{node.atReadyDate}">
       <s:convertDateTime pattern="MM/dd/yy"/>
       <a4j:support event="onkeyup" focus="txtAtReadyDate" reRender="txtAtReadyDateErrors" />
       <s:validate/>
       </h:inputText>
       <s:selectDate for="txtAtReadyDate">
       <h:graphicImage url="img/dtpick.gif" style="margin-left:5px"/>
       </s:selectDate><br />
       <a4j:outputPanel id="txtAtReadyDateErrors">
       <span class="errors"><h:message id="dateError" for="txtAtReadyDate" /></span>
       <label class="message">** ENTER A DATE ABOVE ONLY IF NODE IS AT READY **</label>
       </a4j:outputPanel>
       </div>
       </div>
      
       <div id="entry">
       <h:outputLabel value="Enter Date:" rendered="#{node.enteredDate != null}" />
       <div class="input">
       <h:inputText id="txtEnterDate" value="#{node.enteredDate}" disabled="true" rendered="#{node.enteredDate != null}">
       <s:convertDateTime pattern="MM/dd/yy"/>
       </h:inputText>
       </div>
       </div>
      
       <div id="entrylastModifiedUser">
       <div class="input">
       <h:outputLabel id="txtModified" value="The Node was last modified by: #{node.lastModifiedUser} on #{node.lastModifiedDate}" rendered="#{node.lastModifiedUser != null}"/><br/>
       </div>
       </div>
      
      
       <div id="buttonSection">
       <a4j:outputPanel id="thoseButtons">
       <div class="button">
       <a4j:commandButton value="Cancel" action="#{theNewNodes.cancel}" rendered="#{theNewNodes.newNodeButtons}" reRender="nodeResults, topTenNodeSection, topNodeList, txtNodeSearch, nodeSearchResults" oncomplete="Effect.toggle('editNode','blind', {duration:.2})" />
       <a4j:commandButton value="Cancel" action="#{theSearchNode.cancel}" rendered="#{theSearchNode.searchNodeButtons}" reRender="nodeResults, topTenNodeSection, topNodeList, txtNodeSearch, nodeSearchResults" oncomplete="Effect.toggle('editNode','blind', {duration:.2})" />
       <a4j:commandButton value="Cancel" action="#{theTopTenNodes.cancel}" rendered="#{theTopTenNodes.topTenNodeButtons}" reRender="nodeResults, topTenNodeSection, topNodeList, txtNodeSearch, nodeSearchResults" oncomplete="Effect.toggle('editNode','blind', {duration:.2})" />
       </div>
       <div class="button">
       <a4j:commandButton value="Update" action="#{theNewNodes.selectNewNode}" rendered="#{theNewNodes.newNodeButtons}" reRender="nodeResults, topTenNodeSection, topNodeList, txtNodeSearch, nodeSearchResults" oncomplete="javascript:Effect.toggle('editNode','blind', {duration:.2})" />
       <a4j:commandButton value="Update" action="#{theSearchNode.selectSearchedNode}" rendered="#{theSearchNode.searchNodeButtons}" reRender="nodeResults, topTenNodeSection, topNodeList, txtNodeSearch, nodeSearchResults" oncomplete="javascript:Effect.toggle('editNode','blind', {duration:.2})" />
       <a4j:commandButton value="Update" action="#{theTopTenNodes.selectTopTenNode}" rendered="#{theTopTenNodes.topTenNodeButtons}" reRender="nodeResults, topTenNodeSection, topNodeList, txtNodeSearch, nodeSearchResults" oncomplete="javascript:Effect.toggle('editNode','blind', {duration:.2})" />
       </div>
       </a4j:outputPanel>
       </div>
       </div>
       <div id="editNodeFooter"> </div>
      
       </div>
      
       </a4j:outputPanel>
      


      So in the above code when it reRenders, the green part comes back and the part in the red does not come back...It just goes straight to the next section....Any ideas on why this is happening? Is there a problem with the way I have coded this section? Any help or direction on this would be helpful

      Thank You.