You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Craig McDaniel <cr...@nplus1.net> on 2002/05/28 19:52:54 UTC

Link Tool Behavior

Does the object returned by the link tool reset itself after the
toString() method is called? Here is an example of this very thing
happening (or so it seems):

----------------------------------------------------------
Source code of ProductsAndServices.html:

#set ($psLink = $link.setPage("ProductsAndServices_Template.html").addPathInfo("id",$ps.product))
	...
<a href="$psLink"
   onClick="PSInfoWindow = window.open('$psLink.addPathInfo("popup","yes")','PSInfoWindow','$newWindowSettings'); return false;"
	...


Generates the following output:
	...
<a href="http://servername/nw/s/template/ProductsAndServices_Template.html/id/1152"
   onClick="PSInfoWindow = window.open('http://servername/nw/s/popup/yes','PSInfoWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=500,height=300'); return false;"
	...
---------------------------------------------------------

sorry for the line wrapping :-)

Anyway, as you can see, the second time $psLink is used, we are trying
to add something else to the PATH_INFO. However the template name and
previous PATH_INFO goes bye-bye. 

Thanks,
-- 
\ Craig Patrick McDaniel
/_\ Software Engineer
/_/_\ n + 1, Inc.
/_/_/_\ craigm@nplus1.net
/_/_/_/_\ (502) 479-5557

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Link Tool Behavior

Posted by Eric Pugh <ep...@upstate.com>.
Yes, it does..  That way each link doesn't carry garbage over from before...

Eric

-----Original Message-----
From: Craig McDaniel [mailto:craigm@nplus1.net]
Sent: Tuesday, May 28, 2002 1:53 PM
To: turbine-user@jakarta.apache.org
Subject: Link Tool Behavior


Does the object returned by the link tool reset itself after the
toString() method is called? Here is an example of this very thing
happening (or so it seems):

----------------------------------------------------------
Source code of ProductsAndServices.html:

#set ($psLink =
$link.setPage("ProductsAndServices_Template.html").addPathInfo("id",$ps.prod
uct))
	...
<a href="$psLink"
   onClick="PSInfoWindow =
window.open('$psLink.addPathInfo("popup","yes")','PSInfoWindow','$newWindowS
ettings'); return false;"
	...


Generates the following output:
	...
<a
href="http://servername/nw/s/template/ProductsAndServices_Template.html/id/1
152"
   onClick="PSInfoWindow =
window.open('http://servername/nw/s/popup/yes','PSInfoWindow','toolbar=no,lo
cation=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,w
idth=500,height=300'); return false;"
	...
---------------------------------------------------------

sorry for the line wrapping :-)

Anyway, as you can see, the second time $psLink is used, we are trying
to add something else to the PATH_INFO. However the template name and
previous PATH_INFO goes bye-bye.

Thanks,
--
\ Craig Patrick McDaniel
/_\ Software Engineer
/_/_\ n + 1, Inc.
/_/_/_\ craigm@nplus1.net
/_/_/_/_\ (502) 479-5557

--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>