You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by "marco.behler" <mb...@coderwerk.com> on 2010/10/14 16:37:21 UTC
1.5 RequestMapper and Form submit
First of all, congratulations to the new request handling functionality. I've
been running into a tiny issue however.
Similarily to wicket-examples, I've got the following mapping:
root.add(new LocaleMapper(new MountedMapper("/myPage", MyPage.class)));
which let's me access the page via /de/myPage or /ch/myPage etc.
Now on that page I've got a form, which's onSubmit() is dependent on the
locale of the first url segment - but I'd like to "not" have to store the
locale in a hidden field when rendering the form.
Wicket naturally maps the form's action to /../wicket?jadajada....., leaving
out the locale, which messages up my onSubmit().
Any way around this?
Thank you!
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/1-5-RequestMapper-and-Form-submit-tp2995427p2995427.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: 1.5 RequestMapper and Form submit
Posted by "marco.behler" <mb...@coderwerk.com>.
Perfect. Thanks!
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/1-5-RequestMapper-and-Form-submit-tp2995427p2995530.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: 1.5 RequestMapper and Form submit
Posted by Igor Vaynberg <ig...@gmail.com>.
make locale mapper the root mapper, that way all url generation and
resolving will run through it
-igor
On Thu, Oct 14, 2010 at 7:53 AM, marco.behler <mb...@coderwerk.com> wrote:
>
> I tried to swap out a tiny part of one of our old legacy (struts)
> applications, which is "clustered" on several servers but is absolutely
> stateless, so no session replication, no sticky sessions, nada. The old
> application reads the locale from the url every time....
>
> Even though I'd love to store the locale in my session I'm trying to abuse
> Wicket this time for this particular tiny use case ;)
>
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/1-5-RequestMapper-and-Form-submit-tp2995427p2995484.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: 1.5 RequestMapper and Form submit
Posted by "marco.behler" <mb...@coderwerk.com>.
I tried to swap out a tiny part of one of our old legacy (struts)
applications, which is "clustered" on several servers but is absolutely
stateless, so no session replication, no sticky sessions, nada. The old
application reads the locale from the url every time....
Even though I'd love to store the locale in my session I'm trying to abuse
Wicket this time for this particular tiny use case ;)
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/1-5-RequestMapper-and-Form-submit-tp2995427p2995484.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: 1.5 RequestMapper and Form submit
Posted by Matej Knopp <ma...@inmethod.com>.
Why don't you store the locale in session every time it is in URL? Or
if you need more control store it in the page instance.
Kind regards,
Matej Knopp
InMethod
On Thu, Oct 14, 2010 at 4:37 PM, marco.behler <mb...@coderwerk.com> wrote:
>
> First of all, congratulations to the new request handling functionality. I've
> been running into a tiny issue however.
> Similarily to wicket-examples, I've got the following mapping:
>
> root.add(new LocaleMapper(new MountedMapper("/myPage", MyPage.class)));
>
> which let's me access the page via /de/myPage or /ch/myPage etc.
>
> Now on that page I've got a form, which's onSubmit() is dependent on the
> locale of the first url segment - but I'd like to "not" have to store the
> locale in a hidden field when rendering the form.
>
> Wicket naturally maps the form's action to /../wicket?jadajada....., leaving
> out the locale, which messages up my onSubmit().
>
> Any way around this?
>
> Thank you!
>
>
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/1-5-RequestMapper-and-Form-submit-tp2995427p2995427.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org