validation - Show previous valid value of h:selectOneListbox when invalid selection is made -
i have problem validation of selectonelistbox. works fine , message displayed, when input false. dropdown keeps selected value dropdown value. want display old value if validation fails. how can that?
i tried this:
<h:selectonelistbox id="intfrom" value="#{searchbean.intfrom}" size="1" immediate="true" class="intselectbox1"> <f:ajax render=":menuform :searchform:searchbutton" listener="#{menubean.focus(menubean.mysearch)}" /> <f:ajax listener="#{searchbean.count()}" render="int1" /> <f:ajax execute="intfrom" render="intfrom" /> <f:selectitems value="#{searchbean.intrangefrom}" /> <f:validator validatorid="project.intfromvalidator" /> </h:selectonelistbox> <h:message id="int1" for="intfrom" style="color: red" />
but after new value being displayed not old one.
Comments
Post a Comment