• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Writtin errors.header in Struts properties !! ???

 
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
i'd like to show my validation errors in a table, instead of a simple list with "ul" and "li", for example.

Something like
errors.header=<table bgcolor="yellow" width="50%" align="center" cellspacing="3"><thead align="left"><tr><th><b><em>ERROR HAPPENED!</em></b></th></tr></thead><tbody><ul>

But if i break lines (with enter) on the text for errors.header, Struts only takes the first line and ignore the other ones, why???
 
pie sneak
Posts: 4727
Mac VI Editor Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It thinks the align[=] is another .properties key.
 
Leandro Melo
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
But if i don't break the line (write the whole table stuff in only one long line) it works perfectly!
 
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Leandro Melo:
Hi,
i'd like to show my validation errors in a table, instead of a simple list with "ul" and "li", for example.
-------8<8<-------------
But if i break lines (with enter) on the text for errors.header, Struts only takes the first line and ignore the other ones, why???


How about putting \r\n into the HTML table code wherever you require a new line? You should even be able to put \t in case you require indented code.

Thanks and Regards,
Kinjal Sonpal
[ June 05, 2004: Message edited by: Kinjal Sonpal ]
 
Sheriff
Posts: 17644
300
Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To break a property value between multiple lines, you need to use the continuation character (\)

Eg.

correct.property=this text \
is broken over \
multiple lines in the properties file

incorrect.property=only one line will take for
this because continuation character was not used!


see the Properties.load() JavaDocs
 
Leandro Melo
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks guys.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic