You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by dmalescot <d....@gmail.com> on 2013/01/08 12:04:38 UTC

ChoiceFiltrer autoSubmit

Hi,

In Wicket 6.4.0 i have a problem with ChoiceFilter in my AbstractToolbar.

When I check render HTML i have :

<select
id="form:blocListe:filter-form:lignes:radioGroup:table:topToolbars:toolbars:7:filters:8:filter:filter"
onfocus="_filter_focus(this, 'form:blocListe:filter-formfocus');"
onchange="this.form.submit();"
name="blocListe:filter-form:lignes:radioGroup:table:topToolbars:toolbars:7:filters:8:filter:filter">

So when I change the value, my form is submit.

In Wicket 1.5.8, i don't have this behaviour. Could you tell me what's wrong
in 6.4 ?

Best regards,
Damien



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/ChoiceFiltrer-autoSubmit-tp4655198.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: ChoiceFiltrer autoSubmit

Posted by dmalescot <d....@gmail.com>.
Ok i will try.

I've just check in 1.5.8 and you right, there is a behavior in
"renderComponentTag" which create *onchange=this.form.submIt(); *But after,
there is another behavior which overwrite the onchange attribut with
something like *onchange="var
wcall=wicketAjaxPost('?wicket:interface=....bind(this));"*
So that's why the form doesn't submit.

In 6.4.0 all events are managed with jQuery and not with inline attributes,
so the onchange=this.form.submIt(); isn't replaced and my form is submit.



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/ChoiceFiltrer-autoSubmit-tp4655198p4655204.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: ChoiceFiltrer autoSubmit

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

ChoiceFilter has option 'autoSubmit' which does:

if (autoSubmit)
{
choice.add(AttributeModifier.replace("onchange", "this.form.submit();"));
 }

It seems you need to pass 'false'.

This code is the same in 1.5.x. I'm not sure why you see different behavior.


On Tue, Jan 8, 2013 at 1:04 PM, dmalescot <d....@gmail.com> wrote:

> Hi,
>
> In Wicket 6.4.0 i have a problem with ChoiceFilter in my AbstractToolbar.
>
> When I check render HTML i have :
>
> <select
>
> id="form:blocListe:filter-form:lignes:radioGroup:table:topToolbars:toolbars:7:filters:8:filter:filter"
> onfocus="_filter_focus(this, 'form:blocListe:filter-formfocus');"
> onchange="this.form.submit();"
>
> name="blocListe:filter-form:lignes:radioGroup:table:topToolbars:toolbars:7:filters:8:filter:filter">
>
> So when I change the value, my form is submit.
>
> In Wicket 1.5.8, i don't have this behaviour. Could you tell me what's
> wrong
> in 6.4 ?
>
> Best regards,
> Damien
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/ChoiceFiltrer-autoSubmit-tp4655198.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
>
>


-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com <http://jweekend.com/>