Issue Details (XML | Word | Printable)

Key: STR-1954
Type: Improvement Improvement
Status: Closed Closed
Resolution: Won't Fix
Priority: Minor Minor
Assignee: Struts Developers
Reporter: David Wong
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Struts 1

Possibility of allowing parameter(s) in struts tags property

Created: 28/Jan/04 07:29 AM   Updated: 04/Jul/07 05:29 AM
Return to search
Component/s: Tag Libraries
Affects Version/s: Nightly Build
Fix Version/s: None

Environment:
Operating System: All
Platform: All

Bugzilla Id: 26476


 Description  « Hide
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

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Don Brown made changes - 23/Apr/06 04:46 AM
Field Original Value New Value
issue.field.bugzillaimportkey 26476 27245
Paul Benedict made changes - 04/Jul/07 05:29 AM
Status Resolved [ 5 ] Closed [ 6 ]