-
1. Re: Richfaces messages
ssamayoagt May 16, 2011 4:37 PM (in response to fbarboza)Something like this?
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets">
<h:head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="-1" />
<script type="javascript">
function timeOut() {
var m = document.getElementById("f1:ms");
m.style.cssText = "display:none;"
}
function startTimer() {
var t = setTimeout("timeOut()", 5000);
}
</script>
</h:head>
<h:body>
<rich:panel>
<h:form id="f1">
<a4j:commandButton value="Save" action="#{test2.save()}" oncomplete="startTimer();" />
<rich:messages id="ms" globalOnly="true" />
</h:form>
</rich:panel>
</h:body>
</html>
@Named
@SessionScoped
public class Test2 implements Serializable {
public void save() {
FacesContext.getCurrentInstance().addMessage(null,
new FacesMessage(FacesMessage.SEVERITY_INFO, "Saved", "Saved"));
}
}
-
2. Re: Richfaces messages
fbarboza May 16, 2011 5:26 PM (in response to ssamayoagt)Exactly!
Thank you very much my friend!
-
3. Re: Richfaces messages
ssamayoagt May 16, 2011 5:36 PM (in response to fbarboza)You wellcome.
Note that I just tested in IE 8 and didn't work, it complained about some RF or JSF js code.
Regards.
-
4. Richfaces messages
blabno May 17, 2011 7:36 AM (in response to fbarboza)There is sandbox component called notify:
http://bernard.labno.pl/notify-sample/
More info here: http://community.jboss.org/wiki/40SandboxComponents
-
5. Richfaces messages
ssamayoagt May 17, 2011 9:12 AM (in response to blabno)Very nice!
Thanks for the info.
Regards.