> 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..

I'm pretty sure I'm not smart enough to do that :-)

I dug into the TableTag and ColumnTag source last night. It turns out that
TableTag isn't implemented as an interating tag (eg -- like struts' logic
tag). That means that even if I have a doStartTag that returns something
other than SKIP_BODY that body text will only show up once and even then
it'll be outside of the generated table.

I think that if TableTag is implemented as an interating tag and the
doStartTag methods of it and ColumnTag return EVAL_BODY_TAG or
EVAL_BODY_INCLUDE then things might work as expected.

The trick, by whatever implementation, is to get the body content of each
<display:column> nexted within the <display:table> to be evaluated for
every iteration. Not only that, but the current iteration instance
('smartRow' I believe) needs to be available so that any tags (such as
<bean:write>) within that column's body will have access to it.

>
> 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

Reply via email to