Class SkipValidators

  • All Implemented Interfaces:
    FaceletHandler

    public class SkipValidators
    extends TagHandler

    The <o:skipValidators> taghandler allows the developer to entirely skip validation when executing an UICommand or ClientBehaviorHolder action. This taghandler must be placed inside an UICommand or ClientBehaviorHolder component (client behavior holder components are those components supporting <f:ajax>).

    Usage

    For example, when adding a new row to the data table, you'd like to not immediately validate all empty rows.

     <h:form>
         <h:dataTable value="#{bean.items}" var="item">
             <h:column>
                 <h:inputText value="#{item.value}" required="true" />
             </h:column>
         </h:dataTable>
         <h:commandButton value="add new row" action="#{bean.add}">
             <o:skipValidators />
         </h:commandButton>
         <h:commandButton value="save all data" action="#{bean.save}" />
         <h:messages />
     </h:form>
     

    Note that converters will still run and that model values will still be updated. This behavior is by design.

    Since:
    2.3
    Author:
    Michele Mariotti, Bauke Scholtz