Wow, nice thought.. Seems like that could be done with a simple check for no name atrribute and instead eval the body instead.. Probably a small change to the descriptor and tag..
James > -----Original Message----- > From: James CE Johnson [mailto:[EMAIL PROTECTED] > Sent: Thursday, March 13, 2003 2:25 PM > To: [EMAIL PROTECTED] > Subject: [displaytag-user] Life without decorators > > > Hi, > > I've just started using the display:* taglib so forgive me if > this has > been covered elsewhere and I failed to find it. > > I grok the idea of decorators and I think they're a wonderful > idea but > for my needs I think it is too much. Plus the fact that I > really don't > like the idea of embedding html in my java classes... > > What I would very much like to do is something like this: > > <display:table width="75%" name="reportList"> > <display:column> > <html:link page="/report/download.do" > paramId="oid" paramName="report" > paramProperty="oid" paramScope="Page"> > <bean:write name="report" property="name"/> > </html:link> > </display:column> > > Where the <html:link...> stuff is leveraging the struts framework to > figure out the correct URLs and so forth. > > My current solution is this: > <display:table width="75%" name="reportList" > decorator="com...UploadedReportWrapperDecorator"> > <display:column property="actionLinks" title=""/> > > Where the decorator has the following methods: > > public String getDeleteLink() > { > UploadedReportWrapper data = > (UploadedReportWrapper) this.getObject(); > return "<a href=\"javascript:removeReport('" > + data.getOid() > + "')\">[delete]</a>"; > } > > public String getDownloadLink() > { > UploadedReportWrapper data = > (UploadedReportWrapper) this.getObject(); > return "<a href=\"javascript:downloadReport('" > + data.getOid() > + "')\">[download]</a>"; > } > > public String getActionLinks() > { > return > this.getDeleteLink() + > this.getDownloadLink(); > } > > Now when my content expert comes along to replace [edit] and > [download] > he's going to have to get into the java code and he nor I > wants that to > happen. > > So... > > Is there a way to include a column in a row of the generated > table where > that column's data doesn't come (directly) from the iteration > instance? > > > Thanks, > J > > > > ------------------------------------------------------- > This SF.net email is sponsored by:Crypto Challenge is now open! > Get cracking and register here for some mind boggling fun and > the chance of winning an Apple iPod: > http://ads.sourceforge.net/cgi-> bin/redirect.pl?thaw0031en > > > _______________________________________________ > displaytag-user mailing list [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/displaytag-user > ------------------------------------------------------- This SF.net email is sponsored by:Crypto Challenge is now open! Get cracking and register here for some mind boggling fun and the chance of winning an Apple iPod: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en _______________________________________________ displaytag-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/displaytag-user

