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" />
Comments
Post a Comment