I would suggest not using the display tag's linking mechanism - just write the link yourself.
http://displaytag.sourceforge.net/11/tut_implicitobjects.html <display:table id="foo"> <display:column sortProperty="whatever"> <a href="${foo.property}">${foo.property}</a> .... Eliminating the "property" attribute on a column allows you to define its body. HTH, Matt On Nov 12, 2007 10:27 PM, Rob Hills <[EMAIL PROTECTED]> wrote: > Hi All, > > I've made huge progress on this and I'm so close to a solution it's killing > me! > > I have a <display:table ..> tag that iterates over a list of beans > (DriverShift) in the usual way. Each of those beans has an attribute that is > a > treemap of nested beans (JourneySegment) which are used to build some > additional (dynamic) columns in my table. That much is > working fine. > > My final problem is that I want to produce a link in my dynamic column using > a value from the JourneySegment bean. I'm trying to do this > using the paramId and paramName attributes of the <display:column ..> tag. > I've googled and read extensively and spent hours on trial- > and-error, but I am having a problem getting my head around the interplay > between OGNL and EL and I believe that's where my problem > lies. > > The following code illustrates where I'm at. To make it a bit easier to > follow, I've pruned out irrelevant "noise". What I'm trying to do is to > get the dynamic <display:column tag to produce a link url containing > "?id=xxx" where the "xxx" value comes from my JourneySegment > bean's deliveryId attribute as the value. > > <display:table name="driversShifts" class="table" requestURI="" > id="driversShifts" export="true" pagesize="25"> > <..> > <%-- Iterate through the journeySegments if present and display a > Product and ETA column for each --%> > <s:if test="#attr.driversShifts.journeySegments != null && > #attr.driversShifts.journeySegments.size() > 0"> > <s:iterator id="journeySegment" > value="#attr.driversShifts.journeySegments.values()" status="rowStatus"> > <%-- expose the current column's deliveryId via a column-specific > variable so <display:column can see it? --%> > <s:set name="deliveryIdParamName" > value="'deliveryId_${driversShifts_rowNum}'"/> > <s:set name="#deliveryIdParamName" > value="deliveryId"/> > <s:if test="product != null"> > <display:column sortable="false" > titleKey="delivery.product" href="editDelivery.html" paramId="id" > paramName="${deliveryIdParamName}"> > <s:property value="product"/><br /> > <s:property value="fromLocation"/> to > <s:property value="toLocation"/> > <!-- Delivery ID Param Name : > <s:property value="#deliveryIdParamName"/> --> > <!-- Delivery ID Param Value : > <s:property value="${#deliveryIdParamName}" /> --> > </display:column> > <display:column sortable="false" > titleKey="delivery.arrivalTime"> > <fmt:formatDate value="${eta}" > pattern="${timePattern}"/><br /> > <s:property value="toLocation"/> > </display:column> > </s:if> > <..> > </s:iterator> > </s:if> > > What can I put in the <display:column ..> tag's paramName attribute so it can > see my deliveryId variable's value? > > > TIA, > Rob Hills > Waikiki, Western Australia > Mobile +61 (412) 904-357 > Fax: +61 (8) 9529-2137 > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- http://raibledesigns.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
