I have been using struts for about 3 years and I have being always wish to be
able to access bean/form getter methods that takes parameters. This is
particularly useful when working on multi-lingual support project.
For example to display the name of a location one would use the following,
<bean:write name="location" property="name" />
translate to calling the getName() method in the location bean.
Now, if location name have translation in many difference language the above
tag usage will not be able to display the location name in a particular
language.
However, if we could have the ability to supply a parameter to a method through
the tag we could pick which language to the name in. That is, the tag usage
would becomes
and this is translated to calling the getName(String languageId) method ==>
getName("-347849847775344").
I am happy to build the extension to support the feature proposed if it have
not been built.
Cheers,
David
Description
I have been using struts for about 3 years and I have being always wish to be
able to access bean/form getter methods that takes parameters. This is
particularly useful when working on multi-lingual support project.
For example to display the name of a location one would use the following,
<bean:write name="location" property="name" />
translate to calling the getName() method in the location bean.
Now, if location name have translation in many difference language the above
tag usage will not be able to display the location name in a particular
language.
However, if we could have the ability to supply a parameter to a method through
the tag we could pick which language to the name in. That is, the tag usage
would becomes
<bean:write name="location" property="name" parameter="-347849847775344" />
and this is translated to calling the getName(String languageId) method ==>
getName("-347849847775344").
I am happy to build the extension to support the feature proposed if it have
not been built.
Cheers,
David