jsf 2 - How to cancel form without validation phase in JSF? -


i have xhtml form 2 buttons: "ok" , "cancel". both buttons calls methods of @viewscoped managed bean (accept() , cancel(), example). moreover, xhtml has viewparam , validation.

in managedbean state controlled boolean variable edit. method cancel turns edit variable false.

the question is: how can call cancel() method of managedbean without validation step? say, pressed "new record" button , change mind. want cancel edit operation , when push "cancel" button - validation error appears, managedbean changes state browse (variable edit turns false). need - hide validation error message, or skip validation phase during post request. if use request, afraid viewparam lost, because view updated.

is way skip validation phase in jsf?

thank wasting time.

if use request, afraid viewparam lost, because view updated.

performing full page refresh using right way (provided you've @viewscoped bean). cover mentioned problem, tell <h:link> or <h:button> in question include view params.

<h:button value="cancel" includeviewparams="true" /> 

see also:


Comments

Popular posts from this blog

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -

YouTubePlayerFragment cannot be cast to android.support.v4.app.Fragment -