You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Denis Ponomarev <oz...@romsat.ua> on 2003/05/05 16:22:17 UTC

Re[2]: JavaScript from private asset not included into page

HMLS> I <private-asset> just declares an asset, it doesn't include it in the page.
HMLS> The Script component can help here.

Thanks for answer, but I'm talking about *.js, not the *.script file.

I want to use ordinal JavaScript file, like standard DatePicker component did.
In it's *.jwc I found only

    <private-asset name="script" resource-path="DatePicker.js"/>

and in workbench application this works.
How can I do the same?


Re[3]: JavaScript from private asset not included into page

Posted by Denis Ponomarev <oz...@romsat.ua>.
Solution found in DatePicker's renderComponent method:

//=======================

Body body = Body.get(cycle);
IAsset script = getAsset("script");
body.includeScript(script.buildURL(cycle));

//=======================

easy :)