You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Joe Hertz <jh...@patriot.net> on 2003/12/05 12:29:23 UTC

Stupid Bean tricks

Probably a very basic question, and infinitely dealable....I hope.

I have a User object, which itself contains a Set of UserData objects
(the UserData is stuff that needs to be multilingual. Each instance has
the part of the user's data that would vary when presented in each
language).

So, in my JSP, how do I get to a specific instance of UserData? I can
write a getter than could take a locale or even just a language code,
but since it's not a numeric, the taglib chokes on it, or at least it
appears to



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: Stupid Bean tricks

Posted by Martin Cooper <ma...@apache.org>.
Why not convert your Set into a Map keyed by language / locale? Then
get(locale) is effectively provided for you.

--
Martin Cooper


"Joe Hertz" <jh...@patriot.net> wrote in message
news:F70CBA8E10F7414BBEC18D902FBCA6D603CF40@napalm.drachenschloss.local...
> Probably a very basic question, and infinitely dealable....I hope.
>
> I have a User object, which itself contains a Set of UserData objects
> (the UserData is stuff that needs to be multilingual. Each instance has
> the part of the user's data that would vary when presented in each
> language).
>
> So, in my JSP, how do I get to a specific instance of UserData? I can
> write a getter than could take a locale or even just a language code,
> but since it's not a numeric, the taglib chokes on it, or at least it
> appears to




---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org