3 Replies Latest reply on Sep 21, 2007 6:59 AM by Ilya Shaikovsky

    dataTable + status + jsf-validation

    Roel De Nijs Newbie

      Hello all,

      I want to do this:
      - i have a datatable where each item contains a quantity data member
      - if user changes the quantity i want to use ajax to update the property of the correct item (and only that item has to be sent to the server)
      - after the input-box there has to be the status of the ajax-request
      - if a user enters a non-valid value (e.g. alfa-numeric) the jsf validation error has to appear after the input-field with the wrong value

      this is wat i have so far:

      <t:dataTable
       var="item"
       value="#{entity.orderItems}"
       preserveDataModel="false"
       rowIndexVar="rowIndex"
       style="width: 100%;">
      <h:column>
       <t:div style="padding:3px 0px 3px 0px;" >
      
       <a4j:region id="region">
       <t:panelGrid columns="4">
       <h:column>
       <t:outputLabel value="#{msg['workorder_overview_captions_quantity']}" />
       </h:column>
       <h:column>
       <t:inputText id="qty" value="#{item.quantity}" required="true" size="5" >
       <a4j:support event="onchange" reRender="region" ajaxSingle="true" />
       </t:inputText>
       </h:column>
       <h:column><a4j:status for="region" startText="saving" stopText="" /></h:column>
       <h:column><h:messages /></h:column>
       </t:panelGrid>
       </a4j:region>
       </t:div>
      </h:column>
      </t:dataTable>
      

      the main-problems are:
      - don't get jsf validation errors on screen
      - and i keep getting this error: Target pointed Attribute for of AjaxStatus component with id _id64 not is AjaxContainer

      any help on this issues is highly appreciated, because it's driving me nuts for the past few days