Java Reference
In-Depth Information
Chapter 6
Customizing Stripes Messages
When displaying information messages to the user, you decide on the
text and show the messages with the <s:messages/> tag. Stripes has
a default way of displaying these messages.
For error messages, Stripes not only has a default display but also takes
care of constructing the text.
Although that's pretty good bang for your buck, you can also change
these defaults to display messages exactly like you want by doing the
following:
• Customizing the appearance of information and error messages
• Displaying error messages in a group or individually next to cor-
responding fields
• Customizing how fields that are in error are highlighted
• Changing the text of error messages
Let's start with the customization of information messages.
6.1
Customizing Information Messages
When you add the <s:messages/> tag to a JSP, Stripes follows these
steps to render information messages:
1. Display a header.
2. Render something before the message.
3. Write the message text.
4. Render something after the message.
5. Repeat steps 2 to 4 for each message.
6. Display a footer.
 
 
 
 
Search WWH ::




Custom Search