This content has been marked as final.
Show 5 replies
-
1. Re: <a4j:commandButton> request isn't fired when validate ja
ilya_shaikovsky Sep 29, 2008 8:13 AM (in response to prasad_k)just do not return nothing if you need request to be fired. and return false if not.
-
2. Re: <a4j:commandButton> request isn't fired when validate ja
prasad_k Sep 29, 2008 8:22 AM (in response to prasad_k)Thanks for quick reply,
I did try but In case if I'll return nothing the validation fails and action is called every time. Also the page view gets changed as I am doing show hide on some views on the basis of validation.
Is there any other option???
Thanks
Kp -
3. Re: <a4j:commandButton> request isn't fired when validate ja
ilya_shaikovsky Sep 29, 2008 8:31 AM (in response to prasad_k)I'm not sure that understand right why your validation failed without this return. But again.. if you will make return in any case - request will not be fired. And this is ok because Ajax submit performed via A4J.ajax.submit(...) call. And if you insert any return before this statement - why do you think it will be fired?
-
4. Re: <a4j:commandButton> request isn't fired when validate ja
prasad_k Sep 29, 2008 8:49 AM (in response to prasad_k)Actually what I am trying to do is
<a4j:commandButton value="Ok" action="#{bean.action()}" reRender="form" onclick="return validate();" oncomplete="showMyPage()"/>
So after validation if validation is true I need to call action and then I need to show the next view.
I can't use reRender as the view which I need to display is another page. -
5. Re: <a4j:commandButton> request isn't fired when validate ja
ilya_shaikovsky Sep 29, 2008 9:24 AM (in response to prasad_k)so just use h:commandButton instead of a4j one.