Win a copy of Rust Web Development this week in the Other Languages forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Displaying html-el:messages

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have an application working on struts and we use tiles for validation. The validations are handled through validation.xml. I have a property file to store the error text.

In my UI screen I have 5 panels(open and collapsable). and when the UI form is submitted data in all the panels are submitted through the same form. If there are errors the error messages are printed in the page .(I use
<logic-el:messagesPresent>
<html-el:messages id="error" header="errors.header"footer="errors.footer">
<li><bean:write name="error" /></li>
</html-el:messages>
</logic-el:messagesPresent>

to display the error messages)

Everything works fine but , I have to categorise these error messages by the panels they belong to. I have the panel numbers in the error text. Is there a way to iterate through these error messages and read the text?

Current Display:
Errors.
Panel#1 error1
Panel#2 error2
Panel#3 error3
<Panel1 UI>
<Panel2 UI>
<Panel3 UI>
<Panel4 UI>
....


Desired Display :

Errors.
Panel#1 error1
Panel#2 error2
Panel#3 error3
<Panel1 UI>
Panel#1 error1
.....
<Panel2 UI>
Panel#2 error2
....
<Panel3 UI>
Panel#3 error3
....
<Panel4 UI>

Please Help.

Thanks
 
If somebody says you look familiar, tell them you are in porn. Or in these tiny ads:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic