You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by ssamarin <st...@gmail.com> on 2017/04/07 13:42:46 UTC

POST request on textfield when expecting GET on link in AjaxPagingNavigator

Hello,

We've got TextField and AjaxPagingNavigator. After user enters something in
text field, list view is filtered, navigator is updated. After that, if
clicking on ">>" in navigator, POST request for text field is issued and
nothing happens. After clicking second time on ">>" - GET request is issued
for navigator and everything works as expected.

Any ideas why POST request for text field is issued first time?

Regards, Stepan.

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/POST-request-on-textfield-when-expecting-GET-on-link-in-AjaxPagingNavigator-tp4677619.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: POST request on textfield when expecting GET on link in AjaxPagingNavigator

Posted by Martin Grigorov <mg...@apache.org>.
You can override it use only "inputchange" event for this TextField.
See
https://github.com/apache/wicket/blob/5f4affeb62bbd4ec6286394e0572ec20633c939f/wicket-core/src/main/java/org/apache/wicket/ajax/form/OnChangeAjaxBehavior.java#L79

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Mon, Apr 10, 2017 at 9:08 AM, ssamarin <st...@gmail.com> wrote:

> We've got .add(new OnChangeAjaxBehavior() on TextField.
>
> Is there any way to fix this?
>
> --
> View this message in context: http://apache-wicket.1842946.
> n4.nabble.com/POST-request-on-textfield-when-expecting-GET-on-link-in-
> AjaxPagingNavigator-tp4677619p4677638.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: POST request on textfield when expecting GET on link in AjaxPagingNavigator

Posted by ssamarin <st...@gmail.com>.
We've got .add(new OnChangeAjaxBehavior() on TextField. 

Is there any way to fix this?

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/POST-request-on-textfield-when-expecting-GET-on-link-in-AjaxPagingNavigator-tp4677619p4677638.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: POST request on textfield when expecting GET on link in AjaxPagingNavigator

Posted by Martin Grigorov <ma...@gmail.com>.
Hi,

On Apr 7, 2017 4:52 PM, "ssamarin" <st...@gmail.com> wrote:

Hello,

We've got TextField and AjaxPagingNavigator. After user enters something in
text field, list view is filtered, navigator is updated. After that, if
clicking on ">>" in navigator, POST request for text field is issued and
nothing happens. After clicking second time on ">>" - GET request is issued
for navigator and everything works as expected.

Any ideas why POST request for text field is issued first time?


It sounds like you have an AjaxFormComponentUpdatingBehavior ("blur") on
the TextField.
When you click the >> it loses focus and POSTs the content.


Regards, Stepan.

--
View this message in context: http://apache-wicket.1842946.
n4.nabble.com/POST-request-on-textfield-when-expecting-GET-on-link-in-
AjaxPagingNavigator-tp4677619.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