Hello all.

I want displaytag to create a dynamic link for me.  Currently, the only
way that I can do this is to use a decorator.  However, I would prefer
using the struts-like approach.

The situation is this:  I have a collection of classes, where each class
has two attributes, id and description.  I want to show the description
in a table, and hyperlink it using the id, something like this:
   <a href="MyAction.do?index=45">This is the Description</a>
Therefore, I have the following table definition:
   <display:table
      list="${MyForm.collection}"
      sort="list"
      requestURI="MyAction.do"
      >
      <display:column 
         property="description" 
         sortable="true" 
         title="The Description"
         href="MyAction.do"
         paramId="index"
         />
   </display:table>

Now, the above definition creates the following cell entry:
   <a href="MyAction.do?index=This is the description">This is the
description</a>

If I add a paramName attribute like this to the display:column:
   <display:column
      ...
      paramName="id"
it looks for an attribute in the current scope, whose name is 'id'.

This isn't what I was expecting.  I was hoping that it was going to find
the parameter of the current ROW, and put it's value into the request.

So, to summarize, how do I use the struts-like dynamic link generator to
create a URL based on the current row, where if I have a class with
attributes:
   description="this is the description"
   id=45
the resulting URL is:
   <a href="MyAction.do?index=45">This is the Description</a>


Thanks



--
Jay Glanville


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click
_______________________________________________
displaytag-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/displaytag-user

Reply via email to