Hi,

I have a list of names like:

List<String> names;

I want to display this in a table as links on my JSP page.
I did this:

(JSP file)

<%@ taglib uri="/tags/struts-displaytag" prefix="displaytag" %>

<displaytag:table id="nameslist" name="requestScope.names" class="sr"
requestURI="" pagesize="50" decorator="NamesDecorator">
    <displaytag:setProperty name="paging.banner.placement" value="bottom"/>
    <displaytag:setProperty name="basic.empty.showtable" value="true"/>
</displaytag:table>

(NameDecorator class)

package myproject.decorators;

import org.apache.log4j.Logger;
import org.displaytag.decorator.TableDecorator;

public class NamesDecorator extends TableDecorator {

    private static final Logger log =
Logger.getLogger(NamesDecorator.class);

    public String displayNames() {
        log.info("do i get here?");
        String name = (String) getCurrentRowObject();
        StringBuilder link = new StringBuilder();
        link.append("<a href=\"mylink\">");
        link.append(name);
        link.append("</a>");
        return link.toString();
    }
}

The table displays fine but the names are not being generated as links.
It appears I never even get to the decorator ...

All the examples on the net do it just like this, what am I doing wrong?
I've refreshed my cache, cleaned my project etc etc, still nothing :(

- n
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
displaytag-user mailing list
displaytag-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/displaytag-user

Reply via email to