Hi,

I am trying to employ this nify tag.

Can you give this JSP a shot and let me know what gives ? The data seems to go ok 
without display:column tags within the request attribute but as soon as I add the 
disoplay:column tags it goes south. If I use TestList it runs fine. I have no 
classpath set and am running tomcat 4.1.

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">

<%@ page import="org.apache.taglibs.display.test.TestList,
                 org.apache.taglibs.display.test.ListHolder,
                 java.util.*"%>
<%@ taglib uri="WEB-INF/display.tld" prefix="display" %>

<jsp:include page="header.jsp" flush="true" />

<% 
    class YourBug extends Object {
        public int id;
        public String name;
        public String value;

        public YourBug (int id, String name, String value) 
        {
            this.id = id; 
            this.name=name; 
            this.value=value;
        }

        public int getId() { return id; }
        public void setID ( int id ) { this.id = id ; }
        public String getName(){ return name; }
        public void setName (String name) { this.name = name; }
        public String getValue(){ return value; }
        public void setValue (String value) { this.value = value; }
        public String toString() {
           return "YourBug(" + id + ")";
        }
    }

    List arl = new ArrayList(10);
    for ( int i = 0; i < 10; i++ )
    {
        Integer in = new Integer (i);
        arl.add (new YourBug(i, 
                "thename" + in.toString(), 
                "thevalue" + in.toString()));
    }    
    request.setAttribute( "test", arl);
%>

<display:table width="75%" name="test" list="<%=arl%>" pagesize="3" >
  <display:column property="id" title="ID" sort="true" />
  <display:column property="name" sort="true" />
  <display:column property="value" sort="true" />
</display:table>

<jsp:include page="footer.jsp" flush="true" />

</html>

BTW... I got the latest patch inside displaytag.jar and just dropped it into my war 
WEB-INF ... still a bug. I also updated and sync'd the collections and beanutil with 
that of the displaytag jars too.

email appreciated.


Thank You



_______________________________________________
Express Yourself - Share Your Mood in Emails!
Visit www.SmileyCentral.com - the happiest place on the Web.

Attachment: TestDisplay.jsp
Description: Binary data

Reply via email to