Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

MessageResource and place holders

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello:
There is a limitation in java.text.MessageFormat class that it can format only 10 placeholders in a message. As I understand, struts lives with that limitation and I could not find anything in the MessageResources class that overcomes that limitation.
Is there anything I am missing here? My requirement is to construct a formatted message from a list of | separated values. I am successfully doing that for upto 10 values.
Eg. values are 1|2|3|4|5|6|7|8|9|10|11|12|13|14
and the formatted message is
{0} and {2} and {3} and ... and so on.
Please suggest a solution.
Thanks in advance.
Y
 
Ranch Hand
Posts: 2713
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Yogi Bear",
Thanks for joining JavaRanch!
I really loved you in that Christmas Special! Unfortunately, we have this pesky naming policy which forces us to choose normal sounding names, but nice try anyways. You can update your display name by editing your profile here.
And don't go running off to change your name to Smoky D. either... because I'll be watchin.
 
author and iconoclast
Posts: 24203
43
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Yogesh,
OK, that's a bit better than "Yogi Bear," but please do read the naming policy; it requires you to use both a first and last name. Your real name would be just fine -- that's what most folks around here use.
    Bookmark Topic Watch Topic
  • New Topic