-
1. Re: Closing modal Panel when facesMessages
binnyg May 18, 2009 1:27 PM (in response to ambrish_kumar)In your modal panel user this. Pay attention to the data attribute.
<a4j:commandButton id="save" value="#{messages['save']}" action="#{entityHome.addCountry}" data="#{facesContext.maximumSeverity.ordinal ge 2}" oncomplete="if(data == false) Richfaces.hideModalPanel('CountryEditPanel');" reRender="nameField, addCountryErrorField" />
In your entity home
FacesMessages.instance().addFromResourceBundle(Severity.ERROR, "duplicate_country_add", countryName);
-
2. Re: Closing modal Panel when facesMessages
ambrish_kumar May 19, 2009 8:59 AM (in response to ambrish_kumar)Hi Binesh,
Thanks for your reply.
Case : 1
My problem is that I have to close the modal panel only when the form submitted successfully and after closing it , a message will display likeRecord added successfully
. I am adding this message in my bean.Case 2:
Next scenario is that if form submission fail then all validation related message should display on modal panel and it remains open. I am adding some validation messages from my bean.Using your code , everything goes fine for case:1 but in case:2 modal panel hides and validation messages are displaying on modal panel.
Thanks
Ambrish.
-
3. Re: Closing modal Panel when facesMessages
binnyg May 19, 2009 1:44 PM (in response to ambrish_kumar)How are you adding your validation messages in your bean? Please paste the code. Make sure you add the right severity since we are checking ordinal greater than or equal to 2.
-
4. Re: Closing modal Panel when facesMessages
ambrish_kumar May 20, 2009 2:52 PM (in response to ambrish_kumar)Hi Binesh,
My problem is solved yesterday.
I forget to reply you.
Thanks
Ambrish
-
5. Re: Closing modal Panel when facesMessages
odl39 Jul 4, 2009 6:39 PM (in response to ambrish_kumar)Hi Ambrish,
Can you share how do you solved de problem?
Im whit somthing like that..thanks.
-
6. Re: Closing modal Panel when facesMessages
msantana Jul 8, 2009 4:24 AM (in response to ambrish_kumar)Ambrish can you share with us, how did you solved the problem??? We are with the same problem.
Thank you guy!