You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Andre Camilo <an...@premium-minds.com> on 2014/11/24 12:47:12 UTC

Remove components from AjaxRequestTarget

Hi all,

I'm trying to create a component that has better Ajax support for ListViews with Form components. I'm doing this by making diffs on the List for each ajax request and reordering the elements with javascript.

Now I'm trying to remove my component from AjaxRequestTarget beforeRender because of the "ajax repeater" exception.

I know I have alternatives to *target.remove(ajaxListView)*, but wouldn't this be a good thing?
The ability to remove components from AjaxResponse at certain stage in the rendering process?

Thanks :)

--

André Camilo
Software Architect

Premium Minds
Av. Marquês de Tomar nº69, 1º Andar
1050-154 Lisboa
www.premium-minds.com<http://www.premium-minds.com/>

Geral: +351 217 817 555
Tlm: +351 914 515 010
andre.camilo@premium-minds.com<ma...@premium-minds.com>

Re: Remove components from AjaxRequestTarget

Posted by Andre Camilo <an...@premium-minds.com>.
Hey,

that worked, thanks :)

On 24-11-2014 12:02, Martin Grigorov wrote:

Hi,

You can
use org.apache.wicket.ajax.AjaxRequestTarget.IListener#onBeforeRespond(Map,
AjaxRequestTarget) and remove entries from the map.
See
https://github.com/apache/wicket/blob/master/wicket-core/src/test/java/org/apache/wicket/ajax/GlobalUpdateAjaxAttributesTest.java#L40
for how to setup.

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

On Mon, Nov 24, 2014 at 1:47 PM, Andre Camilo <
andre.camilo@premium-minds.com<ma...@premium-minds.com>> wrote:



Hi all,

I'm trying to create a component that has better Ajax support for
ListViews with Form components. I'm doing this by making diffs on the List
for each ajax request and reordering the elements with javascript.

Now I'm trying to remove my component from AjaxRequestTarget beforeRender
because of the "ajax repeater" exception.

I know I have alternatives to *target.remove(ajaxListView)*, but wouldn't
this be a good thing?
The ability to remove components from AjaxResponse at certain stage in the
rendering process?

Thanks :)

--

André Camilo
Software Architect

Premium Minds
Av. Marquês de Tomar nº69, 1º Andar
1050-154 Lisboa
www.premium-minds.com<http://www.premium-minds.com><http://www.premium-minds.com/><http://www.premium-minds.com/>

Geral: +351 217 817 555
Tlm: +351 914 515 010
andre.camilo@premium-minds.com<ma...@premium-minds.com>







--

André Camilo
Software Architect

Premium Minds
Av. Marquês de Tomar nº69, 1º Andar
1050-154 Lisboa
www.premium-minds.com<http://www.premium-minds.com/>

Geral: +351 217 817 555
Tlm: +351 914 515 010
andre.camilo@premium-minds.com<ma...@premium-minds.com>

Re: Remove components from AjaxRequestTarget

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

You can
use org.apache.wicket.ajax.AjaxRequestTarget.IListener#onBeforeRespond(Map,
AjaxRequestTarget) and remove entries from the map.
See
https://github.com/apache/wicket/blob/master/wicket-core/src/test/java/org/apache/wicket/ajax/GlobalUpdateAjaxAttributesTest.java#L40
for how to setup.

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

On Mon, Nov 24, 2014 at 1:47 PM, Andre Camilo <
andre.camilo@premium-minds.com> wrote:

> Hi all,
>
> I'm trying to create a component that has better Ajax support for
> ListViews with Form components. I'm doing this by making diffs on the List
> for each ajax request and reordering the elements with javascript.
>
> Now I'm trying to remove my component from AjaxRequestTarget beforeRender
> because of the "ajax repeater" exception.
>
> I know I have alternatives to *target.remove(ajaxListView)*, but wouldn't
> this be a good thing?
> The ability to remove components from AjaxResponse at certain stage in the
> rendering process?
>
> Thanks :)
>
> --
>
> André Camilo
> Software Architect
>
> Premium Minds
> Av. Marquês de Tomar nº69, 1º Andar
> 1050-154 Lisboa
> www.premium-minds.com<http://www.premium-minds.com/>
>
> Geral: +351 217 817 555
> Tlm: +351 914 515 010
> andre.camilo@premium-minds.com<ma...@premium-minds.com>
>