You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by jb...@aiusa.org on 2003/05/02 00:02:40 UTC
Custom Tag/Internationalization question
I'm trying to create a custom tag that will let a user choose from a list
of actions, and then get redirected to the selected action. The action
descriptions need to be internationalized. I'm trying to figure out the
best design approach. I'm guessing there is something a lot cleaner than
what I'm coming up with.
Here is my current approach.
1) The map of actions and associated keys to the resource bundle are
stored in a Map in the servlet context using the init method in a plugin.
2) The tag builds a little form with a select box. The doEndTag method
calls routines to start the select tag, and then to add the options. The
routine to add the options then accesses the appropriate resource bundle
and looks up the key values in the bundle as it writes out the options.
The associated actions are the select value.
3) When an entry is selected, the form is submitted to an action that just
pulls the requested action out of the request and does a redirect (I don't
need to save any info, and do want the URL to change to the new action).
Any suggestions for doing this in a simpler/cleaner way?
Thanks,
Joe Baker
Director of Internet Communications
Amnesty International USA
600 Pennsylvania Ave SE 5th Floor
Washington, DC 20003
202-544-0200 x285
http://www.amnestyusa.org
jbaker@aiusa.org