This does not make sense to me.  If the person is editing the data, as
the questioner said, how is that going to be i18n-ed?  To do that you
would have to convert the submitted data on the fly to the languages. 
Either I don't understand what you guys are saying or it makes no
sense.



On 8/14/05, Eddie Bush <[EMAIL PROTECTED]> wrote:
> Hi Joe,
> 
> I'm not sure I understand your question, but ...
> 
> Here's what I do:
> I use form beans to tote data around.  My labels, OTOH, are externalized and
> use bundles to achieve i18n, and this is all fairly transparent on the page.
> 
> Here's what I think you want to do:
> If I understand you correctly, you want to apply i18n to data the same way
> that is commonly done to labels.
> 
> I don't like the idea of applying i18n data at the form-level, since that
> would require the form to make requests of the model.  Rather, my approach
> is to have a model with built-in i18n, where I then determine the locale and
> translate that to a code that I hand the model when requesting data.
> Consequently, I retrieve the data for the proper locale and populate the
> form -- lots cleaner, I think.
> 
> Is that clear as mud?  Did I even understand your question?
> 
> Hope so!
> 
> Eddie
> 
> ----- Original Message -----
> From: "Joe Hertz" <[EMAIL PROTECTED]>
> To: "'Struts Users Mailing List'" <user@struts.apache.org>
> Sent: Thursday, August 11, 2005 6:29 PM
> Subject: Locale Aware Form Objects?
> 
> 
> > It seems logical to do, but steadfastly avoided. So I'm wondering if this
> > is
> > a bad idea or not-
> >
> >
> >
> > Example:
> >
> >
> >
> > You have a series of i18N'd CRUD screens. On one of them, you allow the
> > user
> > to retrieve some data, edit it, and save it back.
> >
> >
> >
> > On this type of screen, it really makes life easier if you pass the data
> > into the screen on an instance of the FormBean that is going to be
> > submitted
> > back to you. The JSP properties will display it as is.
> >
> >
> >
> > This has gotten me in the habit of using FormBeans for display purposes.
> >
> >
> >
> > So now I'm thinking, why not add i18N functionality into the FormBean? It
> > seems to me to be a pretty good place to do it.
> >
> >
> >
> > If a field contains a code, you can copy that into the form into the
> > "widgetCode" property, confident that the getter for "widgetText" will
> > convert it for you to the right language.
> >
> >
> >
> > But to do this, you need an ActionForm Object that can store a Locale and
> > a
> > MessageResources bundle.
> >
> >
> >
> > Is there any reason not to? (Form Scoping issues? etc)
> >
> >
> >
> > TIA
> >
> >
> >
> > -Joe
> >
> >
> 
> 
> 
> ---
> avast! Antivirus: Outbound message clean.
> Virus Database (VPS): 0532-6, 08/13/2005
> Tested on: 8/14/2005 9:58:18 AM
> avast! - copyright (c) 2000-2004 ALWIL Software.
> http://www.avast.com
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
"You can lead a horse to water but you cannot make it float on its back."
~Dakota Jack~

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to