You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Robert Haycock <Ro...@mediasurface.com> on 2005/10/27 13:07:26 UTC

find components url for a window.open() call

Hi,

 

I have a component with a .script file.  In there I have a method with a
window.open() call.  I need the URL of another tapestry component for
the first parameter.  Would someone be kind enough to tell me how this
is done in tapestry?

 

I have seen a method using link components, set its display to 'none'
then use script to grab the links' URL but I'm assuming there must be a
cleaner method.

 

Thanks,

Rob.


Re: find components url for a window.open() call

Posted by Kent Tong <ke...@cpttm.org.mo>.
Robert Haycock <Robert.Haycock <at> mediasurface.com> writes:

> I have a component with a .script file.  In there I have a method with a
> window.open() call.  I need the URL of another tapestry component for
> the first parameter.  Would someone be kind enough to tell me how this
> is done in tapestry?

As you're using a .script file, you should have a corresponding
Script component. Then pass the URL as a symbol to that Script 
component and then use it like below in the .script file:

<script>
<input-symbol key="url" required="yes"/>
<body>
...
window.open("${url}", ...);
</body>
</script>

--
Author of a book for learning Tapestry (http://www.agileskills2.org/EWDT)


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