Anuradha S.Athreya wrote:
I have about 5 messages which will be passed on from my Action -> View
(JSP) using ActionMessage. But at any time only one of these five messages
will be displayed in the View.

To accommodate every message in the JSP, Do I have to include this piece
of code repeatedly .
<html:messages id="message" message='true'
property="<%=AllMessages.FirstMessage%>"  message='true'>
<bean:write name="message"/>
</html:messages>

<html:messages id="message" message='true'
property="<%=AllMessages.SecondMessage%>"  message='true'>
<bean:write name="message"/>
</html:messages>

<html:messages id="message" message='true'
property="<%=AllMessages.ThirdMessage%>"  message='true'>
<bean:write name="message"/>
</html:messages>

Or can I include some logic where in the 'property' will be populated
based on the message sent by the Action?

Just leave out the 'property' attribute entirely. The <html:messages/> tag will loop through all available messages, rendering the tag body once for each message.

L.


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

Reply via email to