You are viewing a plain text version of this content. The canonical link for it is here.
Posted to adffaces-dev@incubator.apache.org by Böhringer Jochen <Jo...@tcc-products.de> on 2006/12/17 18:51:02 UTC

Include JavaScriptlets in Trinidad Component which is executed once per page

Hello,

I am still in the development process of my Trinidad Drag and Drop Component. The dropzone calls an action method if a draggable object is dropped on it. It works fine if I omit a partial page rendering. But if I only want to execute a PPR the Javascript makes problems on the client side.

For Initialization I have to execute a JavaScript each time new draggables and dropzones appear on the page or disappear. But not for every of these components only once for all of them. If I initiate a full page reload this can be done by including a scriptlet in the header of the page. But if a PPR is executed the header of the page is not executed again. Only new scriptlets which are included in the renderer's output of the components related to the PPR.

Is there a hook I can use in the PPR mechanism to execute a javascript method after the ppr took place?

Regards
Jochen

Re: Include JavaScriptlets in Trinidad Component which is executed once per page

Posted by Adam Winer <aw...@gmail.com>.
You can use ExtendedRenderKitService.addScript().

-- Adam


On 12/17/06, Böhringer Jochen <Jo...@tcc-products.de> wrote:
> Hello,
>
> I am still in the development process of my Trinidad Drag and Drop Component. The dropzone calls an action method if a draggable object is dropped on it. It works fine if I omit a partial page rendering. But if I only want to execute a PPR the Javascript makes problems on the client side.
>
> For Initialization I have to execute a JavaScript each time new draggables and dropzones appear on the page or disappear. But not for every of these components only once for all of them. If I initiate a full page reload this can be done by including a scriptlet in the header of the page. But if a PPR is executed the header of the page is not executed again. Only new scriptlets which are included in the renderer's output of the components related to the PPR.
>
> Is there a hook I can use in the PPR mechanism to execute a javascript method after the ppr took place?
>
> Regards
> Jochen
>