You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Jan Vissers <Ja...@cumquat.nl> on 2007/05/21 16:03:14 UTC

@InjectScript - and how to pick them up

I've been trying to include a script in my page.
Although I've managed to do that, I have some question....

Suppose I specify this in my page class:

@InjectScript("/scripts/HideShowErrorBlock.script")
public abstract IScript getHideShowErrorBlock();

How should I pick this up in my .html file?

Couldn't get this (above) to work, and now are temporarily using this method
directly in my .html

<span jwcid="@Script" script="literal:/scripts/HideShowErrorBlock.script" />


So - how do I accomplish the same thing using the @InjectScript annotation?

Thanks,
-J.

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


Re: @InjectScript - and how to pick them up

Posted by Jesse Kuhnert <jk...@gmail.com>.
You can inject it as an asset and use that as a parameter to your <span
jwcid="@Script" block ...but either way if you're not executing the script
directly in your component then there doesn't seem to be much benefit to
defining it there.  (or you could just inject a Script component and use
that)

On 5/21/07, Jan Vissers <Ja...@cumquat.nl> wrote:
>
> I've been trying to include a script in my page.
> Although I've managed to do that, I have some question....
>
> Suppose I specify this in my page class:
>
> @InjectScript("/scripts/HideShowErrorBlock.script")
> public abstract IScript getHideShowErrorBlock();
>
> How should I pick this up in my .html file?
>
> Couldn't get this (above) to work, and now are temporarily using this
> method
> directly in my .html
>
> <span jwcid="@Script" script="literal:/scripts/HideShowErrorBlock.script"
> />
>
>
> So - how do I accomplish the same thing using the @InjectScript
> annotation?
>
> Thanks,
> -J.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Jesse Kuhnert
Tapestry/Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com