Hello,
I am sucessfully using a display table in a jsp file as follows:
<h3>Lead ${captial_type}s</h3>
<display:table name="refs.lead"
export="true" requestURI=""
decorator="de.mpicbg.db.endotrack.displaydecorators.WorkItemDecorator">
<display:setProperty name="basic.msg.empty_list">None
available</display:setProperty>
<display:column property="code" sortable="true"
titleKey="workitem.code" url="/viewWorkItem.html" paramId="id"
paramProperty="id"
comparator="de.mpicbg.db.common.comparator.AlphanumComparator" />
<display:column property="name" sortable="true" maxLength="50"
class="nowrap"
titleKey="workitem.name" />
<display:column property="startDate" titleKey="workitem.startdate" />
<display:column property="endDate" titleKey="workitem.enddate" />
<display:column property="type" sortable="true"
titleKey="workitem.type" />
<display:column property="leadOrganisation" titleKey="organisation"
decorator="de.mpicbg.db.endotrack.displaydecorators.OrganisationShortNameDecorator"
/>
<authz:authorize ifAnyGranted="ROLE_ADMIN">
<display:column titleKey="generic.button.edit"
url="/editWorkItem.html" paramId="id"
paramProperty="id">Click</display:column>
</authz:authorize>
</display:table>
---
However I have pulled this into a separate tag file as this table
appears in lots of places throughout my app. So here I am attempting to
access the details through the attribute of the tag file as follows (the
bit which has ${itemlist} in plain text is just to check if the
attribute is set correctly which it is).
<%@ include file="../jsp/common/include.jsp"%>
<%@ attribute name="itemlist" required="true" type="java.util.List"%>
<%@ attribute name="title" required="true" type="java.lang.String"%>
${itemlist}
<h3>${title}</h3>
<display:table name="itemlist" export="true" requestURI=""
decorator="de.mpicbg.db.endotrack.displaydecorators.WorkItemDecorator">
<display:setProperty name="basic.msg.empty_list">None
available</display:setProperty>
<display:column property="code" sortable="true"
titleKey="workitem.code" url="/viewWorkItem.html" paramId="id"
paramProperty="id"
comparator="de.mpicbg.db.common.comparator.AlphanumComparator" />
<display:column property="name" sortable="true" maxLength="50"
class="nowrap" titleKey="workitem.name" />
<display:column property="startDate" titleKey="workitem.startdate" />
<display:column property="endDate" titleKey="workitem.enddate" />
<display:column property="type" sortable="true"
titleKey="workitem.type" />
<display:column property="leadOrganisation" titleKey="organisation"
decorator="de.mpicbg.db.endotrack.displaydecorators.OrganisationShortNameDecorator"
/>
<authz:authorize ifAnyGranted="ROLE_ADMIN">
<display:column titleKey="generic.button.edit"
url="/editWorkItem.html" paramId="id"
paramProperty="id">Click</display:column>
</authz:authorize>
</display:table>
---
However this doesn't show anything in my generated file for the
table, it simply shows the data for an empty list - it is like
displaytag is failing to read the variable from the attribute. Has
anyone successfully used displaytag in a tag file?
Cheers,
Neil
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
displaytag-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/displaytag-user