JSF 1.2 Validation Grup

JSF 2 de gelen validation group özelligi JSF 1.2 de bulunmuyordu. Bu ozelligin 1.2 de kullanilmasi asagidaki gibi bir yontemle saglanabilir. Bu durumda Temizle butonu validation a takilmazken diger butonlarda duruma gore validation kontrolu yapilir.

    <h:form prependId="false">
     <h: inputText id="ad" value="" required="#{param['validationGroup1']=='true'}" />
     <h: inputText id="soyad" value="" required="#{param['validationGroup2']=='true'}" />
     
     
     <h:commandButton value="Temizle" />
     <h:commandButton value="Kaydet">
      <f:param name="validationGroup1" value="true"></f:param>
      <f:param name="validationGroup2" value="true"></f:param>
     </h:commandButton>
     <h:commandButton value="Kopyala">
      <f:param name="validationGroup1" value="true"></f:param>
     </h:commandButton>
     
    <h:form>
No comments yet.

Leave a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>