Ivan..

that is exactly what im looking for... cheers fella..

my only quetion is if the view is a data entry screen, and they have entered
data.. when the view is returned to the entered data is lost.. is there a
way round this.

We thought about subclassing ActionClass and adding code to the execute
method to check if the post was from the locale link or a 'proper' post..
then all Actions could subclass this. This would allow us to populate the
form with any entered data and hopefully avoid the headache of having to
re-enter everything. does this sound feasible??


"Ivan N. Zhidov" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I had a similar situation which I resolved the following way:
> LocalActionClass sets the locale to whatever comes in the language
parameter
> from the LocaleForm if it supports so you have multiple
ApplicationResources
> files for each of the languages you'd like to support. Then it forwards
the
> request back to the view it came from. Now the trick here was that I
wanted
> to describe this action only once in struts-config.xml
>     <!-- Locale Action from Device Confirmation View-->
>     <action
>       path="/locale"
>       type="LocaleAction"
>       name="localeForm"
>       scope="request"
>     >
>     </action>
>
> and I defined all the pages where the user can change the locale as global
> forwards
>   <global-forwards>
>     <forward name="home" path="/index.vm"/>
>     <forward name="rv" path="/registrationView.vm"/>
>     <forward name="cv" path="/confirmationView.vm"/>
>   </global-forwards>
>
> so your link to change a locale from index.vm would be <a
> href="/exp/locale.action?view=home&language=spanish"><img
> src="images/spanish.jpg" border=0></a>
>
> and from registrationView.vm     <a
> href="/exp/interface.action?view=rv&language=spanish"><img
> src="images/spanish.jpg" border=0></a>
>
> locale form has two parameters: view and language. Since I use global
> forwards instead of real view names, my user never sees them.
>
> Cheers,
> Ivan
> ----- Original Message -----
> From: "James" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, March 05, 2003 2:11 PM
> Subject: Localisation
>
>
> > I have a LocaleActionClass that sets the locale according to which wee
> flag
> > the user clicks, my question is how in the struts-config.xml do i
specify
> it
> > to forward to the page they changed locale on (i.e their original page).
> >
> > James
> >
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >




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

Reply via email to