I have the next url: http://host:port/page.xhtml?response=something
I want render a p:message if response==something
I have the next code:
<h:panelGroup rendered="#{param.response == 'something'}">
<h:outputText value="message" />
</h:panelGroup>
this render a <div>message</div>
I want render a <p:messages /> or <p:growl />
and its value "message" if response==something
please help me to code this, and something else:
- Do I need a bean managed to send value to p:messages or p:growl?
- Do I need to call p:messages or p:growl from a
<p:commandButton />
? - I can't use
<h:body onload="callFunction()">
'cause h:body is on template xhtml<ui:insert name="content"></ui:insert>
and my view is on<ui:composition ... <ui:define name="content" >
in other xhtml, and h:body is common to several views