One suggestion is to extend TemplateLink with convenience methods for
navigating your application.

$link.linkOrderDetail($orderId)
...instead of...
$link.setPage("order,OrderDetail.vm").addPathInfo("id",$orderId)

To get the current page, you can look into using the
RunData.getXXXTemplate() methods.

About the path-to-dir, can you use commas instead of slashes, and
tokenize/replace them in the java code?  Or maybe encode the paths it using
something like base64?  But it seems kind of odd and insecure to pass path
info in the URL, maybe you can have a PathTool or something of the sort and
pass an Id instead?

Chris


-----Original Message-----
From: Laurie Harper [mailto:zodiac@;holoweb.net]
Sent: Thursday, October 31, 2002 10:06 PM
To: Turbine Users List
Subject: URL construction


I there somewhere that fully documents how URLs are interpreted by Turbine,
and how to construct URLs in templates? Currently I'm using

  $link.setPath('Page.vm').setAction('Action')

That has the disadvantage that if I rename the template all the links break
:-( Is there a way to get the page set to the current screen? I was hoping
for something like

  $link.setAction('...')

But that doesn't seem to be supported...

Secondly, can I use URLs with additional path info? For example I'd like to
have URLs like

  http://.../x/servlet/x/.../SomeScreen.vm/path/to/dir

And retrieve the string '/path/to/dir' in my screens and actions. I looked
at doing

 $link.setPage('...').setAction('...').addPathInfo('/path/to/dir')

But all the addPathInfo() methods take a name/value pair which seems
wrong...

Thanks,

L.


--
To unsubscribe, e-mail:
<mailto:turbine-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail:
<mailto:turbine-user-help@;jakarta.apache.org>


--
To unsubscribe, e-mail:   <mailto:turbine-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:turbine-user-help@;jakarta.apache.org>

Reply via email to