dandelion runtime expression

58 views Asked by At

I have in a dandalion datatable a column with a s:a tag. In this title attribute i want to call getText with a property of my row variable. How can I do it right?

<datatables:table id="annoucementList" data="${listData}" row="announcement">
    <datatables:column>
        <s:a href="%{edit}" title="%{getText('announcement.announcement.list.ankuendigungNr', announcement.ankuendigungNr, announcement.ankuendigungNr)}">
            ${announcement.ankuendigungNr}
        </s:a>
    </datatables:column>
1

There are 1 answers

0
Roman C On BEST ANSWER

You can use the variable if it's in the valueStack using OGNL expression. To access scoped variables use #attr. It searches in all scopes.

<s:a href="%{edit}" title="%{getText('announcement.announcement.list.ankuendigungNr', #attr.announcement.ankuendigungNr, #attr.announcement.ankuendigungNr)}">
            ${announcement.ankuendigungNr}
</s:a>