Nathan Bubna
Thu, 19 Oct 2006 17:15:57 -0700
Hi Mark,Sorry, i filter non-work emails to this address lately and have been too busy to go thru them in a while. You should know that you're always going to be much better off emailing the user list of any open source project. It's a lot easier on contributors to the project (like me) since answers get archived for others to find, and especially since other people are free to respond for us. Anyway, I hope the delay here hasn't set you back too far.
You're right. We are missing this function. I wasn't even aware the HTML tag had the option to take a prepared map of params. Anyway, it would be fairly easy for you to add this yourself, either by modifying the LinkTool or (if you prefer not to build VelocityTools yourself) extending the StrutsLinkTool to iterate through your parameter map and add each param to the query data for the link.
If you end up doing the former, please consider submitting a patch for it to the velocity-dev@jakarta.apache.org mailing list. Submissions like that greatly help open source projects like ours progress. Even better would be to open a JIRA case (http://issues.apache.org/jira/browse/VELTOOLS) and attach the patch file there, as then we would not lose track of it.
peace, nathan Mark Brunkhart wrote:
Hi, I'm attempting to convert a JSP based Struts site to Velocity and have run into a problem with the StrutsLinkTool. I'm trying to emulate this: <html:rewrite forward="players" name="baseParameters" /> Where base parameters is a Map of parameters to be added that is provided to the template by my action. The Struts HTML tag allows you to provide a Map in this form. I was hoping I could do this in Velocity: link.setForward("players").addQueryData($baseParameters) But LinkTool only appears to support adding one parameter at a time via addQueryData(key,value). My only thought is that maybe I'm expected towrite a macro...and as a new Velocity user, this is a little beyond me.Because it seems to be commonly suggested that you can easily do anything you can do with Struts tags in Velocity, I'm wondering if I'm missing something obvious. Thanks for your help. Mark Brunkhart
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]