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

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -