You must case your ListObject to something that has a getId() method - for instance, an ActionForm.
ListObject obj = (ListObject) this.getObject(); MyForm myForm = (MyForm) obj; myForm.getId() should work - but ListObject probably doesn't have a getId() method on it. HTH, Matt > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of Melonie Brown > Sent: Sunday, June 29, 2003 10:44 PM > To: [EMAIL PROTECTED] > Subject: [displaytag-user] InvocationTargetException while > trying to use a decorator > > > I'm trying to replicate the view/edit/delete example on the ed hill > website that uses a decorator to display the view /edit > /delete options, > but keep getting a "InvocationTargetException trying to fetch > property > userId on bean [EMAIL PROTECTED]" If I remove the > decorator, then > the page displays without any problems. I've looked at the > examples and > userList, but am still stuck. Suggestions? > > This is my object (of which I generate a list of) : > > private String parentId; > private String userId; > [getters / setters ] > > and this is my jsp code: > > <display:table width="75%" name="users" > requestURI="gotomodifyuser.do" > decorator="foo.Wrapper" > > <display:column property="userId" title="ID" /> > </display:table> > > and this is the wrapper code (identical to example with link2 - just > want to see it work on page): > > public String getUserId() > { > ListObject obj= (ListObject) this.getObject(); > int id= obj.getId(); > return "<a href=\"details.jsp?id=" > + id > + "&action=view\">View</a> | " > + "<a href=\"details.jsp?id=" > + id > + "&action=edit\">Edit</a> | " > + "<a href=\"details.jsp?id=" > + id > + "&action=delete\">Delete</a>"; > } > > > > > ------------------------------------------------------- > This SF.Net email sponsored by: Free pre-built ASP.NET sites > including Data Reports, E-commerce, Portals, and Forums are > available now. Download today and enter to win an XBOX or > Visual Studio .NET. > http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_06 1203_01/01 _______________________________________________ displaytag-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/displaytag-user ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01 _______________________________________________ displaytag-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/displaytag-user

