sorting validation
jigar_k_parekh May 26, 2009 9:22 AMI have created datatable with spinner control for quantity based on quantity i am updating total column and footer.
on spinner i have range validator to validate value which is working fine but when i click on sorting icon on datatable all validation messages getting fired any solution to this ?
<a4j:outputPanel id="errorPanel" ajaxRendered="true"> <h:messages showSummary="true" showDetail="false" style="color: red; font-weight: bold;" tooltip="true" /> </a4j:outputPanel> <a4j:form id="helloForm"> <rich:spacer height="10px"> </rich:spacer> <rich:dataTable value="#{listProductBean.productList}" var="product" id="myDataTable" sortMode="single" rows="5"> <rich:column sortable="true" sortBy="#{product.productId}"> <f:facet name="header"> <h:outputText value="Product Id" /> </f:facet> <h:outputText value="#{product.productId}" /> </rich:column> <rich:column sortable="true" sortBy="#{product.name}"> <f:facet name="header"> <h:outputText value="Product Name" /> </f:facet> <h:outputText value="#{product.name}" /> </rich:column> <rich:column sortable="true" sortBy="#{product.category}"> <f:facet name="header"> <h:outputText value="Category" /> </f:facet> <h:outputText value="#{product.category}" /> </rich:column> <rich:column sortable="true" sortBy="#{product.pricePerUnit}"> <f:facet name="header"> <h:outputText value="Price Per Unit" /> </f:facet> <h:outputText value="#{product.pricePerUnit}" /> </rich:column> <rich:column sortable="true" sortBy="#{product.qty}"> <f:facet name="header"> <h:outputText value="Quantity" /> </f:facet> <rich:inputNumberSpinner value="#{product.qty}" tabindex="1" id="qtySpinner" validatorMessage="Invalid Quantity Value" immediate="true"> <a4j:support event="onchange" reRender="grandTotal" ajaxSingle="true"> </a4j:support> <f:validateLongRange minimum="1" maximum="1000" /> </rich:inputNumberSpinner> </rich:column> <rich:column sortable="true" sortBy="#{product.total}"> <f:facet name="header"> <h:outputText value="Total" /> </f:facet> <a4j:outputPanel ajaxRendered="true"> <h:outputText value="#{product.total}" id="total" /> </a4j:outputPanel> </rich:column> <f:facet name="footer"> <rich:columnGroup> <rich:column colspan="3"> </rich:column> <rich:column> <h:outputText value="Total : " /> </rich:column> <rich:column> <h:outputText value="#{listProductBean.total}" id="grandTotal" /> </rich:column> <rich:column> </rich:column> </rich:columnGroup> </f:facet> </rich:dataTable> <rich:spacer height="10px"> </rich:spacer> <rich:datascroller for="myDataTable" renderIfSinglePage="true" oncomplete="#{rich:component('qtySpinner')}.focus();"> </rich:datascroller> <a4j:log hotkey="d" level="ALL" popup="true"> </a4j:log> </a4j:form>