You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Chris Trawick <ct...@cultured.net> on 2002/12/14 19:26:49 UTC

nested message resources

I apologize if this question has been answered before.  The archive appears
to be offline.

How do I nest message resources when rendering text?

For example, I have the title for a certain page defined in the application
resources:
userlist.title=List Users

Which is of course referenced in JSP:
<title><bean:message key="userlist.title"/></title>

Due to fickle marketing, names for several business concepts may change over
time.  Say they want to change "User" to "Client".  Users are referenced
several times across the application, so the term in turn appears several
times in the properties file.  For such possibly dynamic terms, it might
make sense to do somthing like this in the properties file:
label.users=Users
userlist.title=List {0}

And somehow use the label.users message as the userlist.title arg0.
However, I can't for the life of me figure out how to do that without having
a bitchy scriptlet in the arg0 attribute.  Is there a more "struts-pure"
way?

chris


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>