If you use Struts-EL you can use <bean-el:message ...> and use
EL syntax for arg0, arg1, etc. The syntax in the .properties file
is still '{0}', etc. But I think that is best for flexibility
and robustness. Otherwise the property file has to assume a bean
with a certain name will exist and name changes would have to be
maintained in 2 places.
- Dan
> -----Original Message-----
> From: Nathan Coast [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, December 29, 2004 6:14 PM
> To: Struts Users Mailing List
> Subject: more message questions
>
> Hi,
>
> 1) parameter replacement.
> Is there any mechanism to have more complex parameter replacement in
> messages, e.g. using the commons-bean property syntax (or
> velocity syntax)
>
> user with username '{0}' successfully registered with id '{1}'
>
> user with username '${user.username}' successfully registered with id
> '${user.id}'
>
> I guess a single object param or a map of params could be passed.
>
>
>
> 2) message inheritance
> Is it possible for one message to derive from another? I may
> have many
> labels 'go' in my website. I'd like to declare 'go' in one place yet
> still have the flexibility to change some of them to a
> different label later
>
> foo.bar.view.label=go
> foo.bar.action.label=${foo.bar.view.label}
> foo.bar.submit.label=${foo.bar.view.label}
>
>
> cheers
> Nathan
> --
> Nathan Coast
> Managing Director
> Codeczar Ltd
> mob : (852) 9049 5581
> tel : (852) 2834 8733
> fax : (852) 2834 8755
> web : http://www.codeczar.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]