You Have x Message(s) On The Page


<xp:text escape="true" id="computedField1"
	rendered="#{javascript:facesContext.getMessages().hasNext();}">
	<xp:this.value><![CDATA[#{javascript:var msgs = facesContext.getMessages();
var count = 0;
while (msgs.hasNext()) {
	var obj = msgs.next();
	count++;
}
return "You have " + @Text(@Integer(count)) + " message(s) on the page";}]]></xp:this.value>
</xp:text>
All code submitted to OpenNTF XSnippets, whether submitted as a "Snippet" or in the body of a Comment, is provided under the Apache License Version 2.0. See Terms of Use for full details.
No comments yetLogin first to comment...