<h:panelGroup rendered="#{Account.Status eq 'FAILED' }">
<h:outputText value="# {msg['account/failed']}" escape="false" />
</h:panelGroup>
<h:panelGroup rendered="#{Account.Status eq 'SUCCESS' }">
<h:outputText value="# {msg['account/success']}" escape="false" />
</h:panelGroup>
...more panelgroup messages like this for all different Status types,
and different messages to be shown..
On my glassfish Jee6 application, I show my messages depending of the status of the account, I keep my strings in a text file and reach from JSF page as above {msg['account/failed']}
Now these if-else Status conditions are getting more for different types of messages, and make the JSF page a mess, how can I do the same thing from the Java code?
I can set the value of the message and put the if else condition in my Java code but then how I will access to my text file where I keep my strings? or any other clean JSF way to do this?