|
What you are asking for is an <arbitraryClass:write> tag. The <bean> taglib is
focussed on JavaBeans and their properties. A method which takes a parameter does not conform to the rules for JavaBean properties, and so is outside the scope of this taglib.
Don Brown made changes - 23/Apr/06 04:46 AM
Paul Benedict made changes - 04/Jul/07 05:29 AM
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
parameter. In your example, if the string argument is always literal, you would use this syntax:
<bean:write name="location" property="name(-347849847775344)" />
If you need to dynamically assign the parameter value, you can construct the value for property in
the page and then use a RT-expr to pass it to the bean:write tag:
<bean:define id="prop">name(<bean:write name="paramValue" />)</bean:define>
<bean:write name="location" property="<%= prop %>" />
It may not be glamorous or tidy, but it works. Personally, I'd be hesitant to add the attribute you
propose to the bean:write tag since the number of attributes for the various struts tags is already
large, and the names are sometimes already not terribly clear.