Read and respond to this message at:
https://sourceforge.net/forum/message.php?msg_id=3738712
By: tofranklu
hi,
I am a beginner to DT and having problem with my code.
Basically, I just want to create a list with few objects in the list to have
the first flavor of DT.
however, it keeps giving me same error message like
========
Exception: [.LookupUtil] Error looking up property "name" in object type
"org.apache.jsp._1_jsp$Item". Cause: Property 'name' has no getter method
=========
and the item class looks like the following
=====
class Item {
private String pw;
private String name;
public void setPw(String i) { pw = i; }
public void setName(String s) { name = s; }
public String getPw() { return this.pw; }
public String getName() { return this.name; }
}
==========================
here is my jsp code,
<%
Item m1 = new Item();
Item m2 = new Item();
m1.setPw("1");
m1.setName("john");
m2.setPw("2");
m2.setName("john2");
ArrayList list = new ArrayList();
list.add(m1);
list.add(m2);
request.setAttribute( "list", list );
%>
<display:table name="list">
<display:column property="name" />
</display:table>
===========================
Any advise will be appreciated,
thanks.
FRank
______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit:
https://sourceforge.net/forum/unmonitor.php?forum_id=249317
_______________________________________________
displaytag-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/displaytag-user