Hi,
I am struggling with java/displaytag learning curves...  I am using the el version of 
displaytag-1.0-rc1 and have gotten it running.  I would like to implement something 
exactly like the example where a column is added with "View|Edit|Delete".  Here is 
what I have (using the results of an sql:query tag):

<display-el:table name="${result.rows}" id="row" pagesize="10" class="its" >

  <display-el:column property="DateDue" title="Due" sortable="true" 
decorator="com.earnst.disptag.decorators.ShortDateWrapper" />
  <display-el:column property="Name" title="Name" sortable="true" />

</display-el:table>

I have copied from some examples and have this so far for the decorator:

package com.earnst.disptag.decorators;

import org.displaytag.decorator.TableDecorator;

public class ActionLinks extends TableDecorator
{
    public ActionLinks()
    {
        super();
    }
    
    public final String getActionLinks(Object columnValue)
    {
        ListObject object = (ListObject) getCurrentRowObject();
        int lId= lObject.getId();
        
        return "<a href=\"details.jsp?id=" + lId
                        + "&action=view\">View</a> | "
                        + "<a href=\"details.jsp?id=" + lId
                        + "&action=edit\">Edit</a> | "
                        + "<a href=\"details.jsp?id=" + lId
                        + "&action=delete\">Delete</a>";
    }
}

My problem is what to use in place of ListObject.  All the examples I found where for 
cases where a bean is being used but I am using the results of an sql:query and I 
can't figure out what to use.  I'm hoping that it is obvious when I get the answer to 
the 
first question how to replace lObject.getId() with the correct code (IDassign is the 
what I want to use and it is in the information returned from the database in 
results.row); otherwise please comment on this part as well.

To add the column do I add this?
<display-el:column property="ActionLinks" title="Actions" />

Thanks,
Eric



-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
displaytag-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/displaytag-user

Reply via email to