You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by JE...@thoughtworks.com on 2001/08/30 22:11:56 UTC
Use of replacement values with bean:message
Hi,
I am trying to render a message on my jsp that has a dynamic portion - a
contact number that is dependent on state of objects on the request. The
bean:message tag with a replacement value seems perfect, but the problem is
that the replacement value is variable. I have a property on my form bean
that contains the value I want, but how can I get it into the arg0
parameter of the bean:message tag without resorting to scriplets? May not
be possible.
Example message in bunde:
myMessage=Call me for a good time at {0}
in jsp
<bean:message key=myMessage arg0="want value of string property on form
bean here"/>
I could just give up on bean:message and have the form bean's property
provide me the entire content of the message, substitution based on state
already done, but seems a shame not to be able to use the replacement
values feature.
tia,
jim
Jim Weaver
Software Developer - ThoughtWorks