You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Ray Clough <ra...@allthisisthat.com> on 2007/06/29 21:16:13 UTC

[S2] Session Key for Locale

I have an application using S1, S2, and other component layers, all of which
use Locale.  At application startup, the InitializerFilter reads the user's
previously stored Locale preference from a cookie.  Then we are saving the
Locale in the session.  It works very well except for one glitch.  When the
Login page comes up (same Request cycle), we expected it to be Localized. 
The problem is that all pages EXCEPT the login page are Localized.  We are
saving it in the Session using the key
'I18nInterceptor.DEFAULT_SESSION_ATTRIBUTE', which has the value
"WW_TRANS_I18N_LOCALE".  Is this the correct key to be using? 

Any suggestions as to why the Login page might not be Localized?  Stepping
into the 'Text' tag code, the Locale is received from the Value Stack, not
the ActionContext.  Is some time or maybe one request cycle needed to
propagate the newly set value in the Session to the Value Stack?  If so, is
that considered a bug?

- Ray Clough
-- 
View this message in context: http://www.nabble.com/-S2--Session-Key-for-Locale-tf4001507.html#a11365685
Sent from the Struts - User mailing list archive at Nabble.com.


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


Re: [S2] Master Detail Form - needing a sample

Posted by Martin Gainty <mg...@hotmail.com>.
Complete example here
http://forums.opensymphony.com/thread.jspa?threadID=50841&tstart=0

M--
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.

----- Original Message ----- 
From: "Luciano Costa" <mo...@gmail.com>
To: "'Struts Users Mailing List'" <us...@struts.apache.org>
Sent: Friday, June 29, 2007 8:35 PM
Subject: [S2] Master Detail Form - needing a sample


> Hi,
>
> I'm trying to implement a "Poll" register form.
> The Poll object have "PollOption<List> pollOptions;" property.
>
> How should I show pollOptions in my form, in way that struts can bind the
> data with my PollAction.poll property?
>
> I've tried this, but it's not binding:
>
> <@s.textfield name="poll.name" />
> <@datepicker name="poll.startDate"/>
> <@datepicker name="poll.finishDate"/>
> <@s.textarea name="poll.question" rows="5"/>
>
> <@s.textfield name="poll.pollOptions[0].option" />
> <@s.textfield name="poll.pollOptions[1].option" />
> <@s.textfield name="poll.pollOptions[2].option" />
>
>
> Thanks,
>
> Luciano
>
> -----Mensagem original-----
> De: Ray Clough [mailto:ray@allthisisthat.com]
> Enviada em: sexta-feira, 29 de junho de 2007 12:16
> Para: user@struts.apache.org
> Assunto: [S2] Session Key for Locale
>
>
> I have an application using S1, S2, and other component layers, all of 
> which
> use Locale.  At application startup, the InitializerFilter reads the 
> user's
> previously stored Locale preference from a cookie.  Then we are saving the
> Locale in the session.  It works very well except for one glitch.  When 
> the
> Login page comes up (same Request cycle), we expected it to be Localized.
> The problem is that all pages EXCEPT the login page are Localized.  We are
> saving it in the Session using the key
> 'I18nInterceptor.DEFAULT_SESSION_ATTRIBUTE', which has the value
> "WW_TRANS_I18N_LOCALE".  Is this the correct key to be using?
>
> Any suggestions as to why the Login page might not be Localized?  Stepping
> into the 'Text' tag code, the Locale is received from the Value Stack, not
> the ActionContext.  Is some time or maybe one request cycle needed to
> propagate the newly set value in the Session to the Value Stack?  If so, 
> is
> that considered a bug?
>
> - Ray Clough
> -- 
> View this message in context:
> http://www.nabble.com/-S2--Session-Key-for-Locale-tf4001507.html#a11365685
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
> 


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


[S2] Master Detail Form - needing a sample

Posted by Luciano Costa <mo...@gmail.com>.
Hi,

I'm trying to implement a "Poll" register form.
The Poll object have "PollOption<List> pollOptions;" property.

How should I show pollOptions in my form, in way that struts can bind the
data with my PollAction.poll property?

I've tried this, but it's not binding:

<@s.textfield name="poll.name" />
<@datepicker name="poll.startDate"/>
<@datepicker name="poll.finishDate"/>
<@s.textarea name="poll.question" rows="5"/>

<@s.textfield name="poll.pollOptions[0].option" />
<@s.textfield name="poll.pollOptions[1].option" />
<@s.textfield name="poll.pollOptions[2].option" />


Thanks,

Luciano

-----Mensagem original-----
De: Ray Clough [mailto:ray@allthisisthat.com] 
Enviada em: sexta-feira, 29 de junho de 2007 12:16
Para: user@struts.apache.org
Assunto: [S2] Session Key for Locale


I have an application using S1, S2, and other component layers, all of which
use Locale.  At application startup, the InitializerFilter reads the user's
previously stored Locale preference from a cookie.  Then we are saving the
Locale in the session.  It works very well except for one glitch.  When the
Login page comes up (same Request cycle), we expected it to be Localized. 
The problem is that all pages EXCEPT the login page are Localized.  We are
saving it in the Session using the key
'I18nInterceptor.DEFAULT_SESSION_ATTRIBUTE', which has the value
"WW_TRANS_I18N_LOCALE".  Is this the correct key to be using? 

Any suggestions as to why the Login page might not be Localized?  Stepping
into the 'Text' tag code, the Locale is received from the Value Stack, not
the ActionContext.  Is some time or maybe one request cycle needed to
propagate the newly set value in the Session to the Value Stack?  If so, is
that considered a bug?

- Ray Clough
-- 
View this message in context:
http://www.nabble.com/-S2--Session-Key-for-Locale-tf4001507.html#a11365685
Sent from the Struts - User mailing list archive at Nabble.com.


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


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


Re: [S2] Session Key for Locale

Posted by Don Brown <do...@gmail.com>.
Well, at the least, it looks like it deserves a ticket.  Pretty
strange it only happens for one action though...

Don

On 6/30/07, Ray Clough <ra...@allthisisthat.com> wrote:
>
> I have an application using S1, S2, and other component layers, all of which
> use Locale.  At application startup, the InitializerFilter reads the user's
> previously stored Locale preference from a cookie.  Then we are saving the
> Locale in the session.  It works very well except for one glitch.  When the
> Login page comes up (same Request cycle), we expected it to be Localized.
> The problem is that all pages EXCEPT the login page are Localized.  We are
> saving it in the Session using the key
> 'I18nInterceptor.DEFAULT_SESSION_ATTRIBUTE', which has the value
> "WW_TRANS_I18N_LOCALE".  Is this the correct key to be using?
>
> Any suggestions as to why the Login page might not be Localized?  Stepping
> into the 'Text' tag code, the Locale is received from the Value Stack, not
> the ActionContext.  Is some time or maybe one request cycle needed to
> propagate the newly set value in the Session to the Value Stack?  If so, is
> that considered a bug?
>
> - Ray Clough
> --
> View this message in context: http://www.nabble.com/-S2--Session-Key-for-Locale-tf4001507.html#a11365685
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

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