We're using the servlet for the export to excel that servlet name is 'MultiTableExportServlet'. We need to pass three parameters for the servlet that is 'multitablesId','name','type'. The 'multitablesId' name is used to identify the particlur export to excel where using the jsp. The 'name' is used to identify the export to excel name. The 'type' is should defined the excel then only it populates. I'm using the link in the without using the decorator.Each request from the jsp page i pass the two parameters then after based upon the parameters i build the query and show the results using the Query Object List using the 'Source' attribute in the . My problem is after loading the jsp page. Then i click the 'href' link using the it did some business logic and store it to the Query Object list and populates into the export to excel correctly whatever i want. But if i click the 'href' link in the second time it doesn't change the list value. So i clear the list each and every time. But it shows the emty QO list in the excel. Here, my sample code i pasted here for your concern.
<display:table name="${weeklyDlvyInstancesDashboardReportForm.asnAccuracyListQO}" uid="asnAccuracyListUID" sort="list" defaultsort="1"
requestURI="/weeklyDlvyInstancesDashboardReportPre.do?method=httpGet" excludedParams="method"
decorator="com.ford.mpl.superg.decorator.WeeklyDeliveryInstancesTypeTableDecorator" keepStatus="true">
<%@include file="/jsp/include/displaytag.jsp"%>
<c:set value="${asnAccuracyListUID.firstWeekOfCountLabel}" var="asnAccuracyFirstWeekOfCount"/>
<c:set value="${asnAccuracyListUID.secondWeekOfCountLabel}" var="asnAccuracySecondWeekOfCount"/>
<c:set value="${asnAccuracyListUID.thirdWeekOfCountLabel}" var="asnAccuracyThirdWeekOfCount"/>
<c:set value="${asnAccuracyListUID.fourthWeekOfCountLabel}" var="asnAccuracyFourthWeekOfCount"/>
<c:set value="${asnAccuracyListUID.fifthWeekOfCountLabel}" var="asnAccuracyFifthWeekOfCount"/>
<c:set value="${asnAccuracyListUID.sixthWeekOfCountLabel}" var="asnAccuracySixthWeekOfCount"/>
<c:choose>
<c:when test="${asnAccuracyListUID.instanceTypeDescription != null && asnAccuracyListUID.instanceTypeDescription != 'Sum'}">
<display:column property="instanceTypeDescription" title="Instance Type" sortable="false"/>
</c:when>
<c:otherwise>
<display:column property="instanceTypeDescription" title="Instance Type" sortable="false" style="font-weight:bold;text-align:center"/>
</c:otherwise>
</c:choose>
<display:column property="firstWeekOfCount" title="${asnAccuracyFirstWeekOfCount}" href="${pageContext.request.contextPath }/weeklyDlvyInstancesDashboardReportPost.do?method=WeeklyDlvyInstExcelReport&ratingElementIdFromJSP=${asnAccuracyListUID.ratingElementId}" paramProperty="instanceType" paramId="instanceTypeFromJSP" sortable="false"/>
<display:column property="secondWeekOfCount" title="${asnAccuracySecondWeekOfCount}" sortable="false" />
<display:column property="thirdWeekOfCount" title="${asnAccuracyThirdWeekOfCount}" sortable="false" />
<display:column property="fourthWeekOfCount" title="${asnAccuracyFourthWeekOfCount}" sortable="false" />
<display:column property="fifthWeekOfCount" title="${asnAccuracyFifthWeekOfCount}" sortable="false" />
<display:column property="sixthWeekOfCount" title="${asnAccuracySixthWeekOfCount}" sortable="false"/>
</display:table>
</fieldset>
<export:multitables id="nameid">
<export:table title="tablename" source="${weeklyDlvyInstancesDashboardReportForm.asnAccuracyInstancesRatingElementQO}">
<export:column property="shipCode" title="Ship Code" />
<export:column property="plantOrRecLoc" title="Plant/Rec Loc" />
<export:column property="instanceType" title="Instance Type" />
<export:column property="fordOrg" title="Ford Org" />
<export:column property="OrgType" title="Org Type" />
<export:column property="region" title="Region" />
<export:column property="shipDate" title="Ship Date" />
<export:column property="errorTransmitted" title="Error Transmitted" />
<export:column property="externalAlertNo" title="External Alert Number" />
<export:column property="asnNumber" title="ASN Number"/>
<export:column property="packingSlipNumber" title="Packing Slip Number"/>
</export:table>
</export:multitables>
<action path="/weeklyDlvyInstancesDashboardReportPost"
type="*.*.*.*.action.*.*Action"
name="weeklyDlvyInstancesDashboardReportForm" scope="session" validate="false"
parameter="method">
<forward name="httpGet" path="tile.showreport"></forward>
<forward redirect="true" name="somname" path="/MultiTableExportServlet?multitablesId=nameid&name=exporttoexcel&type=excel"></forward>
</action>
What i need is i want the new list of values when i click the href from the jsp page.
using the decorator in the <export:table> i solved my issue.
<export:multitables id="WeeklyDeliveryInstances-Count" >
<export:table title="tablename" source="${weeklyDlvyInstancesDashboardReportForm.weeklyDeliveryInstancesRatingElementQO}"
decorator="com.ford.mpl.superg.decorator.WeeklyDeliveryInstancesTypeTableDecorator">
<export:column property="shipCode" title="Ship Code" />
<export:column property="plantOrRecLoc" title="Plant/Rec Loc" />
<export:column property="instanceType" title="Instance Type" />
<export:column property="fordOrg" title="Ford Org"/>
<export:column property="orgType" title="Org Type" />
<export:column property="region" title="Region" />
<export:column property="conveyanceDepartureDateAndTime" title="Conveyance Departure Date And Time"/>
<export:column property="asnReceivedDateAndTime" title="ASN Recieved Date And Time" />
<export:column property="externalAlertNo" title="External Alert No" />
<export:column property="asnNumber" title="ASN Number" />
<export:column property="packingSlipNumber" title="Packing Slip Number" />
<export:column property="timeDeviance" title="Time Deviance(hh:mm)" />
</export:table>