-
1. Re: Get a error message with <rich:message style="color:red" for="" id="" />
nbelaevski Mar 29, 2010 6:35 AM (in response to phanthang1988)This forum space is to discuss development of the RichFaces project only. I'll move this thread to users' space.
-
2. Re: Get a error message with <rich:message style="color:red" for="" id="" />
ilya_shaikovsky Mar 29, 2010 8:35 AM (in response to phanthang1988)So, you do not see the message after action called?
which component has the errUserName id?
B.t.w. addMessage should get clientId as a parameter (considering naming containers e.g. form:input)
-
3. Re: Get a error message with <rich:message style="color:red" for="" id="" />
phanthang1988 Mar 29, 2010 9:42 AM (in response to ilya_shaikovsky)Yes!
I could not get a error message after called a action!
Can you help me to fix that problem?
Thank you very much!
Thang!
-
4. Re: Get a error message with <rich:message style="color:red" for="" id="" />
ilya_shaikovsky Mar 29, 2010 11:00 AM (in response to phanthang1988)pay attention to the part of my quesiton related to clientId,.
E.g.:
<a4j:form id="form"> <rich:message for="input"/>" <h:inputText id="input"/> <a4j:commandButton action="#{userBean.action1}"/> <a4j:commandButton action="#{userBean.action2}"/> </a4j:form>
public void action1() { FacesContext.getCurrentInstance().addMessage("input", new FacesMessage("New message 1!")); } public void action2() { FacesContext.getCurrentInstance().addMessage("form:input", new FacesMessage("New message 2!")); }
Only second button will works fine. And that works as it should according to JSF API.
-
6. Re: Get a error message with <rich:message style="color:red" for="" id="" />
nbelaevski Mar 29, 2010 6:22 PM (in response to phanthang1988)Client IDs may differ from Ilya's example if you are running in portlet environment. Check that you are using correct client ID when you are adding messages.
P.S. Try adding global message and check if it works.
Message was edited by: Nick Belaevski
-
7. Re: Get a error message with <rich:message style="color:red" for="" id="" />
phanthang1988 Mar 29, 2010 7:58 PM (in response to nbelaevski)I have cheked Ilya's example!
But I did not run it successfully!
I think that Client IDs in Ilya's example did not have any different!
You can show me a different Client IDs in Ilya's example, can not you?
Can you give me a code demo about it?
Thank you very much!
ThangPhan!
-
8. Re: Get a error message with <rich:message style="color:red" for="" id="" />
nbelaevski Mar 30, 2010 9:34 AM (in response to phanthang1988)I'm sorry, but I didn't understand the question. Can you please explain it more?