-
1. Re: Problem using Richfaces.hideModalPanel
nbelaevski May 28, 2009 4:50 AM (in response to coolrb)Hi,
Do not use a4j:commandButton just to close panel, use common HTML button tag -
2. Re: Problem using Richfaces.hideModalPanel
coolrb May 28, 2009 5:10 AM (in response to coolrb)Thanks.
I changed it to <h:commandLink value="Close" style="cursor:pointer" onclick="Richfaces.hideModalPanel('metadata-inprogress')" /> -
3. Re: Problem using Richfaces.hideModalPanel
coolrb May 28, 2009 5:16 AM (in response to coolrb)Is it possible to fire a javascript function when messages are displayed as part of <rich:messages/> something like
<rich:messages>
{function to be called}
</rich:messages> -
4. Re: Problem using Richfaces.hideModalPanel
ilya_shaikovsky May 28, 2009 5:24 AM (in response to coolrb)
Thanks.
I changed it to <h:commandLink value="Close" style="cursor:pointer" onclick="Richfaces.hideModalPanel('metadata-inprogress')" />
do you really need a submit after modal closure? If no add return false; after hide statement.
Is it possible to fire a javascript function when messages are displayed as part of <rich:messages/> something like
you could check in request control oncomplete if the messages were risen and execute the js you need in this case. or you could add some script in conditionally rendered (rendered if messages present) outputPanel so it will be evaluated only if messages persent. -
5. Re: Problem using Richfaces.hideModalPanel
coolrb May 28, 2009 5:47 AM (in response to coolrb)Thanks and it worked.
Again, just trying to know how can I reset form fields to blank value. I am using following code but it does not work.<h:commandLink styleClass="medText" value="Reset" style="cursor:pointer"> <a4j:support event="onclick" reRender="panel" onsubmit="if(!confirm('Are you sure to change the values?')) {form.reset(); return false;}" oncomplete="alert('Value succesfully reset')"/> </h:commandLink>
Sorry for too much qs -
6. Re: Problem using Richfaces.hideModalPanel
ilya_shaikovsky May 28, 2009 5:56 AM (in response to coolrb)form reset could not works for our rich components because it isn not just simple inputs and form has no idea about what should be reseted.. So you have two options:
1) manually reset our inputs like calendar or combo or inplace to the value you need.
2) use ajax request to clear the value bindings and reREder the inputs area.