This content has been marked as final.
Show 4 replies
-
1. Re: some questions about rich:notifymessags
michpetrov Jul 17, 2013 10:32 AM (in response to liuliu)- the button appears when you hover over the message, have you tried that?
- there is not, but if you have control over the FacesMessage you could send it to a specific id with set stayTime
-
2. Re: some questions about rich:notifymessags
liuliu Jul 17, 2013 10:53 AM (in response to michpetrov)1. i tried. rich:notify has a default close button, but not rich:notifymessage(s).
2 i dont understand. could your give me more detail?
-
3. Re: some questions about rich:notifymessags
michpetrov Jul 18, 2013 5:41 AM (in response to liuliu)1 of 1 people found this helpful1.
weird, the button does not show when the message is non-blocking, but it should show otherwise, and if you can see the button on rich:notify it means the image is there, have you tried another browser?
2.
I mean something like this:
<h:inputHidden id="error" binding="#{bean.error}"/> <h:inputHidden id="warning" binding="#{bean.warning}"/> <h:inputHidden id="info" binding="#{bean.info}"/> <rich:notifyStack id="stack" position="topLeft"> <rich:notifyMessage for="error" detail="Detail" satyTime="500" /> <rich:notifyMessage for="warning" stack="stack" stayTime="5000"/> <rich:notifyMessage for="info" stack="stack" stayTime="2000" /> </rich:notifyStack> <a4j:commandButton actionListener="#{bean.message}" value="Send messages" execute="@this"/>
private UIComponent error; private UIComponent warning; private UIComponent info; // with setters and getters public void message() { FacesContext fc = FacesContext.getCurrentInstance(); fc.addMessage(error.getClientId(fc), new FacesMessage(FacesMessage.SEVERITY_ERROR, "Error message", "and message detail")); fc.addMessage(warning.getClientId(fc), new FacesMessage(FacesMessage.SEVERITY_WARN, "Warning message", "and message detail")); fc.addMessage(info.getClientId(fc), new FacesMessage(FacesMessage.SEVERITY_INFO, "Info message", "and message detail")); }
Then you can send error messages to id "error" and so on.
-
4. Re: some questions about rich:notifymessags
liuliu Jul 18, 2013 11:04 AM (in response to michpetrov)1.there is not the close button neither in IE.
2 your solution is useful. but in my case, i want it works with the other normal jsf error message(validation,required etc) too.