You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Petr Fejfar <pe...@gmail.com> on 2009/08/14 09:05:10 UTC

Ajax update of visibility component having attached JavaScript in run-time

Hi all,

I've created a component which needs to be initialized by JavaScript
in run-time.
To achieve it, I use <script> markup associated with Label which supplies
required JS code.

Now I need to update visibility of the component using Ajax.
But after update this script (which is a part of Ajax Response)
is not executed and previous run-time initialization is lost.

1. Is there a way to tell a browser to reinitialize component
    while processing Ajax response?

2. or is there another way how to either keep component
    initialized or reinitialize it again?


Thanks, Petr

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Ajax update of visibility component having attached JavaScript in run-time

Posted by Petr Fejfar <pe...@gmail.com>.
> see iheadercontributor, use that to output the necessary javascript
> rather then a label.

OK. I'll try it.

FYI, JS implementing a component is part of header already,
but initilization call I put into <script> element just behind related markup
within the <body>,  as recommended by documentation of the
JS component.

Thanks, Petr

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Ajax update of visibility component having attached JavaScript in run-time

Posted by Igor Vaynberg <ig...@gmail.com>.
see iheadercontributor, use that to output the necessary javascript
rather then a label.

-igor

On Fri, Aug 14, 2009 at 12:05 AM, Petr Fejfar<pe...@gmail.com> wrote:
> Hi all,
>
> I've created a component which needs to be initialized by JavaScript
> in run-time.
> To achieve it, I use <script> markup associated with Label which supplies
> required JS code.
>
> Now I need to update visibility of the component using Ajax.
> But after update this script (which is a part of Ajax Response)
> is not executed and previous run-time initialization is lost.
>
> 1. Is there a way to tell a browser to reinitialize component
>    while processing Ajax response?
>
> 2. or is there another way how to either keep component
>    initialized or reinitialize it again?
>
>
> Thanks, Petr
>
> ---------------------------------------------------------------------
> 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