jsf 2 - Richfaces 4: Rendering issue for mixed client / ajax fall-back validation -


i use mixed client-side validation (csv) jsr-303 bean validation constraints , ajax-fallback validation h:inputtext tag.

but if csv passes , ajax fall-back validation fails results in flickering validation messages. assume because first client side removes message , later ajax call adds message again. in particular annoying if validation triggered <rich:validator event="keyup" />.

if 1 type of validation implemented, message displayed nicely without flickering.

i guess ajax queuing problem, <a4j:queue ignoredupresponses="true"/> didn't solve problem.

any ideas? thanks.


in detail:

for client-side validation added annotation

@pattern(regexp = "^[\\w\\-]([\\.\\w])+[\\w]+@([\\w\\-]+\\.)+[a-za-z]{2,4}$", message = "bad email") private string email;  

in validation bean.

for ajax fall-back (server side) part added bean method

public void validateemail(facescontext context, uicomponent tovalidate, object value) {     ... // check if email taken   } 

the tag looks like

<h:inputtext  id="registerfullname" value="#{registerpanelbean.email}" validator="#{registerpanelbean.validateemail}">    <rich:validator event="keyup"  /> </h:inputtext> <rich:message for="registerfullname"> </rich:message> 


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -