Hi, I have never actually set an actionLink parameter in a Velocity page template, I have always done it in the Java Page class. I think performing this kind of initialization is best done in the Page if you can.
regards Malcolm Edgar On Wed, Apr 8, 2009 at 5:41 PM, WarnerJan Veldhuis <[email protected]> wrote: > Hello List, > > New user of Click here, but I am very enthousiastic!! I love the simplicity. > > Here's my question: I am using an ActionLink to let the user select an > object on screen. I know the ActionLink supports one extra value in > getHref(Object), but this object must be selected with TWO values. This is > what I am currently using, and it works (names have been changed to clarify > a bit): > > page.htm > $actionlink.setParameter("id1", "$firstObject.id") > $actionlink.setParameter("id2", "$secondObject.id") > <a href="$actionlink.href">$someName</a> > > In the backingclass I can access the parameters with > actionlink.getParameter("id1") etc. > > Is it good practice to use parameters in this situation? Or should I > concatenate the id's for use in getHref(Object) and split them in the > backingclass? > > Second, Velocity doesn't like setParameter(String, int). It won't get > parsed. Surrounding the ints with quotes works, but it's fugly. Any way to > change that? > > Thanks for your comments, and keep up the good work! If time permits, I'll > look at creating a Click support plugin for IntelliJ if it doesn't exist. > Does it? > > > WarnerJan Veldhuis > >
