Question

I am Getting a error when using the display Tag.

Let me Explain the situation. I have a search form and a display form where i used the display table.

<form:form name="queueForm" id="queueFormId" modelAttribute="queueForm" action="queueFormSearch.do">


<c:if test="${queueForm.queueType == '2' || queueForm.queueType == '3' || queueForm.queueType == '4'}">
<table>
  <td width="700px">
    <span class="boldCharacter"><spring:message code="queue.searchConditions"/></span>
  </td>

 </table>

  <div id="strtDtErr" style="display: none">
    <font color="red"><b>Start date must be a valid date in the format of mm/dd/yyyy.</b></font>
  </div>
  <div id="strtDtEmptyErr" style="display: none">
    <font color="red"><b>Please specify start date.</b></font>
  </div>
  <div id="endDtErr" style="display: none">
    <font color="red"><b>End date must be a valid date in the format of mm/dd/yyyy.</b></font>
  </div>
  <div id="endDtEmptyErr" style="display: none">
    <font color="red"><b>Please specify end date .</b></font>
  </div>
  <div id="dateRangeDiffErr" style="display: none">
    <font color="red"><b>Start date cannot be greater then end date.</b></font>
  </div>


            <td></td> 
            <td>
              <input type="button" value="Search" onclick="validateAndSearchQueueResults();" />
            </td>
          </tr>
        </table>
      </div>
    </c:if>
</form:form>

And the display form bellow the code.

<form:form name="displayTagQueueForm"  action="performActionQueue.do"  modelAttribute="queueForm" id="displayTagQueueForm" method="POST">
    <input type="hidden" name="actionCode" value=""/>
        <input type="hidden" name="queueType" value="${queueForm.queueType}" />


        <c:if test="${null != queueForm.queueCaseResultsList}">




            <table>   
                <tr>
                    <c:if test="${queueForm.queueType == '2'}">
                <td>
            <input type="button" value="Finish Task onclick="performAction('5');" />
                        </td>
                    </c:if>
                </tr>
             </table> 
        </c:if>

    <display:table name="${queueForm.queueCaseResultsList}" 
                   id="parent" 
                   sort="page" 
                   form="displayTagQueueForm"  
                   partialList="true"
                   export="true"
                           RequestUri="exportExcel.do?queueType=${queueForm.queueType}"

                   pagesize="${pageSizeInt}"  
                   size="resultSize" 
                   class="sortable" 
                   excludedParams="*"
                   decorator="com.wfc.mtg.fate.web.queue.QueueResultsVOWrapper"
                   style="width:1350px" 
                    >
             <display:setProperty name="export.types" value="excel" />
             <display:setProperty name="export.excel" value="true" />            
             <display:setProperty name="export.amount" value="list" /> 
             <display:setProperty name="export.excel.filename" value="List.xls"/>  
             <display:setProperty name="export.banner"><div id="exportTypes"><span class="label">Export:</span> {0}</div></display:setProperty>
             <display:setProperty name="basic.msg.empty_list" value="No assignments found."/>
             <display:setProperty name="paging.banner.placement" value="top"/>
             <display:setProperty name="paging.banner.onepage" value=" "/>
             <display:setProperty name="paging.banner.item_name" value="assignment"/>
             <display:setProperty name="paging.banner.items_name" value="assignments"/>
             <display:setProperty name="paging.banner.group_size" value="8"/>
             <display:column title="" property="type" />
             <display:column title="Selection" property="chkBox" style="align:center; "/>
             <display:column property="caseLink" title="Case ID" style="width:50px"/>

             <display:column property="priority" title="Priority" style="width:75px"/>
             <display:column property="status" title="Status" />
             <display:column property="stage" title="Stage" />
             <display:column property="daysInStage" title="Days in Stage" />
             <display:column property="stageDueDt" title="Stage Due Date" />
             <display:column property="scheme" title="Scheme" />

        </display:table>




    </div>

<script language="javascript">
    doOnLoad('<c:out value="${queueForm.isError}"/>', '<c:out value="${queueForm.actionCode}"/>');
</script>

</form:form>

now i am able to export the table into excel. But if i click on page 2 or next link the above search form and Finish task button i gone.

I have debugged my App and found out that the queueType is going 2 times . Like 2,2 and when we click on page 3 the queuetype is going in as 2,2,2,2. If i remove the Param in requestUri then it works fine. For exporting to excel i need the param.How should i deal with this issue.

Please ask me for more information and sorry to be vague .

Was it helpful?

Solution

Well I figured it out

I was sending the the params as

and also in the exportExcel

so it was taking it as two.

Well from the displayTag documentation i have found out the the requestURI is used by both exporting and pagination.

and also i have changed the URI to performActionQueue.do and captured if the condition of exporting

Thank You

Please Share your views if i am wrong.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top