1

Please see the below code, I am not able to generate link inside display tag, the attachment attribute is not null and taskHistory HAS attachments. With this code I only see http://anyhost.com/user/, and what I want http://anyhost.com/user/attachment

<display:table export="true" id="data" name="taskHistory" pagesize="5"
        requestURI="">

        <display:column title="Download Attachments">
        <a href="/notifier/<s:property value="%{#session.user.userId}" />/<s:property value="%{#data.attachment}" />">Download</a>
        </display:column>
    </display:table>
Roman C
  • 49,761
  • 33
  • 66
  • 176
Akhilesh
  • 1,400
  • 3
  • 15
  • 20
  • possible duplicate of [How can i create a link in displaytag?](http://stackoverflow.com/questions/788860/how-can-i-create-a-link-in-displaytag) – poring91 Aug 23 '15 at 14:28

2 Answers2

1

I found the solution.attr needed to be used for accessing values like below

<display:column title="Download Attachments">
        <a href="/notifier/<s:property value="%{#session.user.userId}" />/<s:property value="#attr.data.attachment" />">Download</a>
    </display:column>
Akhilesh
  • 1,400
  • 3
  • 15
  • 20
0

If attachment is an attribute of the action class then

<a href="/notifier/<s:property value="%{#session.user.userId}" />/<s:property value="%{attachment}" />">Download</a>
Roman C
  • 49,761
  • 33
  • 66
  • 176
  • attachment is not an attribute of an action class, its an attribute of taskHistory( a colllection ) objects.this collection is used to build the table – Akhilesh Apr 03 '13 at 09:53