Strut2 filter configuration
http://www.displaytag.org/10/export_filter.html
Required jars
http://sourceforge.net/projects/displaytag/files/displaytaglibrary/ (any version)
iText1.3(for pdf export)
<display:table name="clientList"(list) export="true"(enable export) pagesize="5"(how many to display)
requestURI="#"(click o/p is same page) class="mars"(look style) style="text-align:center;">
<display:column property="clientId"(list contains attribute) title="Client Id"(displays at header) group="1"(give as a group)
sortable="true"(sort is choice) href="viewClient"(Action name)
paramId="clientDetails.clientId" (giving param default value is properity)></display:column>
<display:column property="companyName" title="Company Name" group="2" sortable="true">
<display:column property="emailId" title="EmailId" />
<display:column property="website" title="website" />
<display:column title="Edit" href="editClient" paramId="clientDetails.clientId" paramProperty="clientId" media="pdf/html/excel"(display on which media decide by u)>Edit(user clicks action)</display:column>
<display:column title="Delete" href="deleteClient" paramId="clientDetails.clientId" paramProperty="clientId" >Delete</display:column>
<display:setProperty name="export.pdf" value="true"></display:setProperty>(export as a pdf)
<display:setProperty name="export.excel.filename" value="ClientDetails.xls"/>(define xml name by default jsp/ action name)
<display:setProperty name="export.pdf.filename" value="ClientDetails.pdf"/>
</display:table>
http://www.displaytag.org/10/export_filter.html
Required jars
http://sourceforge.net/projects/displaytag/files/displaytaglibrary/ (any version)
iText1.3(for pdf export)
<display:table name="clientList"(list) export="true"(enable export) pagesize="5"(how many to display)
requestURI="#"(click o/p is same page) class="mars"(look style) style="text-align:center;">
<display:column property="clientId"(list contains attribute) title="Client Id"(displays at header) group="1"(give as a group)
sortable="true"(sort is choice) href="viewClient"(Action name)
paramId="clientDetails.clientId" (giving param default value is properity)></display:column>
<display:column property="companyName" title="Company Name" group="2" sortable="true">
<display:column property="emailId" title="EmailId" />
<display:column property="website" title="website" />
<display:column title="Edit" href="editClient" paramId="clientDetails.clientId" paramProperty="clientId" media="pdf/html/excel"(display on which media decide by u)>Edit(user clicks action)</display:column>
<display:column title="Delete" href="deleteClient" paramId="clientDetails.clientId" paramProperty="clientId" >Delete</display:column>
<display:setProperty name="export.pdf" value="true"></display:setProperty>(export as a pdf)
<display:setProperty name="export.excel.filename" value="ClientDetails.xls"/>(define xml name by default jsp/ action name)
<display:setProperty name="export.pdf.filename" value="ClientDetails.pdf"/>
</display:table>