Read and respond to this message at: https://sourceforge.net/forum/message.php?msg_id=3861059 By: nounet
Hi all I'm trying to build a table from an array of StartJobCard, an in-house complex class. It goes like this: <display:table name="startJobCards" uid="currentStartJobCard"> <display:column decorator="my.package.decorator.StartJobCardDecorator" /> </display:table> As I understand it, the uid attribute allows me to get the object in the current row, using PageContext. So, in my decorator, I do this: +++++ public Object decorate(Object inSJC, PageContext inPc, MediaTypeEnum inMte) throws DecoratorException { String result = ""; Object sjc = inPc.getAttribute("currentStartJobCard"); if (sjc != null) { if (!(sjc instanceof StartJobCard)) { result = sjc.toString(); } else { result = findStatus((StartJobCard) sjc, inPc); } } return result; } +++++ inPc.getAttribute("startJobCard") 'almost' works, in the sense that I get a StartJobCard object indeed. I was happy, until I noticed that the object wasn't actually updated, and it was the same one for every row... (i.e., the object I get is always the last one from my array of StartJobCard objects. Am I understanding the whole 'uid' thing correctly? If not, do you see a workaround, to get current row object in my decorator? Many thanks in advance, and I hope I've been clear enough. Stéphane ______________________________________________________________________ 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=249318 ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ displaytag-user mailing list displaytag-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/displaytag-user