You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Norbert Sándor <de...@erinors.com> on 2006/10/27 16:34:26 UTC
4.1 script include problem via ajax
Hello,
I have a component which includes a script in renderComponent() using
pageRenderSupport.addExternalScript(this,
getScriptAsset().getResourceLocation());
It works fine when used without ajax, a <script> tag is written to the
HTML output.
But when the same component is rendered in an ajax request (triggered by
an async DirectLink), the script is not included at all.
Maybe this is unsupported?
Any ideas?
Thanks in advance,
Norbi
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: 4.1 script include problem via ajax
Posted by Norbert Sándor <de...@erinors.com>.
I found the correct "tapestry.loadScriptFromUrl()" at the end of the
AJAX response, which may mean that it is executed only after the other
scripts (from the .script file's <initialization> part).
Regards,
Norbi
andyhot írta:
> It's supposed to work...
> Tapestry will add this javascript in the response:
> tapestry.loadScriptFromUrl(...)
>
> But there was this issue:
> http://tacoscomponents.jot.com/BugReporter/Bug127
> and the fix
> http://fisheye3.cenqua.com/browse/tacos/tacos-4.0/trunk/tacos-core/src/java/net/sf/tacos/ajax/components/tacos.js?r1=404&r2=413
> and soon
> http://issues.apache.org/jira/browse/TAPESTRY-1119
> will close :)
>
>
> Norbert Sándor wrote:
>
>> Hello,
>>
>> I have a component which includes a script in renderComponent() using
>>
>> pageRenderSupport.addExternalScript(this,
>> getScriptAsset().getResourceLocation());
>>
>> It works fine when used without ajax, a <script> tag is written to the
>> HTML output.
>> But when the same component is rendered in an ajax request (triggered
>> by an async DirectLink), the script is not included at all.
>>
>> Maybe this is unsupported?
>> Any ideas?
>>
>> Thanks in advance,
>> Norbi
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: 4.1 script include problem via ajax
Posted by Norbert Sándor <de...@erinors.com>.
Thanks for the info.
I've voted for it (before Puff Daddy shoots me :) )
Regards,
Norbi
andyhot írta:
> It's supposed to work...
> Tapestry will add this javascript in the response:
> tapestry.loadScriptFromUrl(...)
>
> But there was this issue:
> http://tacoscomponents.jot.com/BugReporter/Bug127
> and the fix
> http://fisheye3.cenqua.com/browse/tacos/tacos-4.0/trunk/tacos-core/src/java/net/sf/tacos/ajax/components/tacos.js?r1=404&r2=413
> and soon
> http://issues.apache.org/jira/browse/TAPESTRY-1119
> will close :)
>
>
> Norbert Sándor wrote:
>
>> Hello,
>>
>> I have a component which includes a script in renderComponent() using
>>
>> pageRenderSupport.addExternalScript(this,
>> getScriptAsset().getResourceLocation());
>>
>> It works fine when used without ajax, a <script> tag is written to the
>> HTML output.
>> But when the same component is rendered in an ajax request (triggered
>> by an async DirectLink), the script is not included at all.
>>
>> Maybe this is unsupported?
>> Any ideas?
>>
>> Thanks in advance,
>> Norbi
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: 4.1 script include problem via ajax
Posted by andyhot <an...@di.uoa.gr>.
It's supposed to work...
Tapestry will add this javascript in the response:
tapestry.loadScriptFromUrl(...)
But there was this issue:
http://tacoscomponents.jot.com/BugReporter/Bug127
and the fix
http://fisheye3.cenqua.com/browse/tacos/tacos-4.0/trunk/tacos-core/src/java/net/sf/tacos/ajax/components/tacos.js?r1=404&r2=413
and soon
http://issues.apache.org/jira/browse/TAPESTRY-1119
will close :)
Norbert Sándor wrote:
> Hello,
>
> I have a component which includes a script in renderComponent() using
>
> pageRenderSupport.addExternalScript(this,
> getScriptAsset().getResourceLocation());
>
> It works fine when used without ajax, a <script> tag is written to the
> HTML output.
> But when the same component is rendered in an ajax request (triggered
> by an async DirectLink), the script is not included at all.
>
> Maybe this is unsupported?
> Any ideas?
>
> Thanks in advance,
> Norbi
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
--
Andreas Andreou - andyhot@apache.org - http://andyhot.di.uoa.gr
Tapestry / Tacos developer
Open Source / J2EE Consulting
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org