Re: Promlem with date format on changing locale

2012-02-17 Thread cosmindumy
I solved it somehow. I used addOrReplace(component) so the date is again
replaced with the format of the new locale. It's not good solution. 
Anyway, I have DatePanel that has inside a DateTextField. There is no setter
for converter of Date Text Field. In my case date format is not changed when
I change locale. I have to click on date time picker and after the format is
changed.  
Thanks for reply. 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Problem-with-date-format-on-changing-locale-tp4383834p4397196.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Promlem with date format on changing locale

2012-02-17 Thread Jeremy Thomerson
On Mon, Feb 13, 2012 at 8:57 AM, cosmindumy  wrote:

> Hello again,
> I have the following problem. I have a customized DateTimePanel component,
> wich has a DateTextFiled. The problem is that when I change the locale and
> pressing submit the date is not valid anymore due to date format.
> For example I have set the locale de-DE, date looks 02.02.2012 I press
> submit, lets say the validation fails for other reason, when I change the
> locale to en-GB the date is still the german format. I have to choose again
> the date, and now it has the right format. If I don't press submit, when
> changing back to de-DE the date has the german format(even if before was
> english format). If I press the submit when locale is en-GB and the I
> change
> to de-DE the date has english format.
> I hope it is clear the situation, and maybe you have an answer for this.
> Thanks.
>

Please provide code so we can see your custom component and offer
assistance.  It seems like your component should pull the locale from the
session - perhaps in onBeforeRender - rather than requiring that it be set
on the component at construction.


-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


Promlem with date format on changing locale

2012-02-13 Thread cosmindumy
Hello again,
I have the following problem. I have a customized DateTimePanel component,
wich has a DateTextFiled. The problem is that when I change the locale and
pressing submit the date is not valid anymore due to date format. 
For example I have set the locale de-DE, date looks 02.02.2012 I press
submit, lets say the validation fails for other reason, when I change the
locale to en-GB the date is still the german format. I have to choose again
the date, and now it has the right format. If I don't press submit, when
changing back to de-DE the date has the german format(even if before was
english format). If I press the submit when locale is en-GB and the I change
to de-DE the date has english format. 
I hope it is clear the situation, and maybe you have an answer for this. 
Thanks.   

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Promlem-with-date-format-on-changing-locale-tp4383834p4383834.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org