开发者

JSLT tags & <display:table>

Am using <display:column> , i want to have a column i.e:"id " to be displayed and to be linkable. everything is ok until now but i want to display the link dynamic according to conditions.

<c:choose>
    <c:when test="${courseList.partner.area.country.id == user_country }">
            <display:column property="id" escapeXml="fals开发者_如何学编程e" sortable="true"
                 url="/editCourse.html}" paramId="id" paramProperty="id"
                 titleKey="course.id"/>
    </c:when>
    <c:otherwise>
            <display:column property="id" escapeXml="false" sortable="true" sortName="id"/>
    </c:otherwise>
 </c:choose>

The output is supposed to be list of ids displayed that are not linkable and the others are linkable. The problem is if the first row starting with linkable id so the rest row are displayed also linkable even if they doesn't fit the condition and vice versa.

Could you please advice me how can i solve it ?

Thanks in Advance


Assuming you are using Displaytag, have a look at the decorators

Possibly you can use any of the already existing decorators i e AutolinkColumnDecorator http://www.displaytag.org/1.2/displaytag/apidocs/index.html

or you might have too right your own implementation, which is fairly easy, look at http://www.displaytag.org/1.2/tut_decorators.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜