You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Noven <no...@yahoo.com> on 2014/05/26 18:44:22 UTC

Is it possible to repaint wicket component via javascript?

Hi all,

Just want to ask if we can update wicket component via javascript or not. The case here is to repaint a datatable

Shadowbox.init({ 
        handleOversize:	"drag", 
        onClose : function () { 
                //repaint the component here
         } 
}); 



Please advise. Thank you.

Re: Is it possible to repaint wicket component via javascript?

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

You can do something like:
theComponent.add(new AjaxEventBehavior("repaint") { public void onEvent(ART
art) {art.add(getComponent())} })

the JS would be: $(selectorToTheTable).triggerHandler("repaint");

Martin Grigorov
Wicket Training and Consulting


On Mon, May 26, 2014 at 7:44 PM, Noven <no...@yahoo.com> wrote:

> Hi all,
>
> Just want to ask if we can update wicket component via javascript or not.
> The case here is to repaint a datatable
>
> Shadowbox.init({
>         handleOversize: "drag",
>         onClose : function () {
>                 //repaint the component here
>          }
> });
>
>
>
> Please advise. Thank you.