At 12:47 PM -0700 6/7/06, Chris Cheshire wrote:
In my actions I have messages stored in the session either under
ActionMessages.GLOBAL_MESSAGE, or my own key (eg 'search').

In my jsp I have a section to display the search specific messages.
<logic:messagesPresent message="true" property="search">
....
</logic:messagesPresent>

I also need to display the global messages at the top of the page,
however this displays everything, including the search messages:

<logic:messagesPresent message="true">
...
</logic:messagesPresent>

What do I set for the property to ONLY display the messages keyed by
ActionMessages.GLOBAL_MESSAGE?

technically, you would use

<logic:messagesPresent message="true" property="org.apache.struts.action.GLOBAL_MESSAGE">
....
</logic:messagesPresent>

It has been observed that this is kind of cumbersome. A nice enhancement (that just about any willing volunteer could do, hint hint :-) ) would be to enhance the logic:messagesPresent, logic:messagesNotPresent, and html:messages and html:errors tags to have another attribute, "global" which if it had the value"true" would save you from needing to know that verbose property name.

Joe

--
Joe Germuska
[EMAIL PROTECTED] * http://blog.germuska.com
"You really can't burn anything out by trying something new, and
even if you can burn it out, it can be fixed.  Try something new."
        -- Robert Moog

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to