velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Sperling ...@hakodateit.com>
Subject Re: velocity-tools-1.2 linkTool module support
Date Fri, 03 Mar 2006 15:32:17 GMT
David Sperling wrote:

>Hi-
>
>I was reading the changlog for velocity-tools-1.1 and it said that:
>   * Refactor StrutsUtils to use Struts 1.1 classes and support modules
>(maj)
>
>I was wondering if this included a module switch function for linkTool.
>Right now I'm doing this to switch modules with linkTool:
>
><ahref="$link.setAction("toModule").addQueryData("prefix","/customer").addQueryData("page","/admin/listCustomers.do").addQueryData("id","$user.id").addQueryData("list","true")">customers</a>
>
>but it is very messy.  : (
>
>Is there a function similar to the Struts link tag available?
><html:link module="/moduleB" path="/index.do"/>
>
>
>Cheers,
>
>David
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: velocity-user-help@jakarta.apache.org
>
>  
>
Answering my own question.
StrutsLinkTool extends linkTool.  So  I tried out the following
and it works fine and is much cleaner.

<ahref="$link.setRelative("mymodule/admin/listCustomers.do").addQueryData("id","$user.id").addQueryData("list","true")">customers</a>
This may even be easier than adding a module param, like is done with
the Struts "html link tag".


Cheers,

David

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


Mime
View raw message