0

I'm using the same jsp for three different modules. Because the three modules contain nearly 10 to 12 columns common. So i'm using the same jsp for three modules. What my problem is am using the "KeepStatus = true" in the inside of the display:table. Each module has the unique UID name(Because of the KeepStatus property) so i declare the runtime value. It works fine but in one module the value renders in the top of the table. Other modules doesn't have problem.

File Name: - ratingElementInstances_All.jsp

<display:table name="${disputeForm.ratingInstanceList}" uid="${diplayTableUID}" sort="list" keepStatus="true"
    requestURI="${diplayTableReqURI}" excludedParams="method" decorator="com.ford.mpl.superg.decorator.DisputeRatingInstanceTableDecorator">
    <%@include file="/jsp/include/displaytag.jsp"%>
    <ui:resultsPerPage />
    <logic:notEqual name="disableActions" value="Y">
        <display:column property="actions" title="${Actions}" sortable="false" class="textAlignC inlineMenuTriggerWrapper" />
        <display:column property="checkbox" title="${disputeInstanceHeaderCheckbox}" sortable="false" />
    </logic:notEqual>
    <c:if test="${diplayTableUID.disputeNumber != null}">
        <display:column property="disputeNumber" title="${disputeNumberForLabel}" sortable="true"/>
    </c:if>
    <display:column property="disputeAnalystCDSID" title="${WQAnalyst}" sortable="true"/>
    <display:column title="${Status}" sortable="true">
        <c:if test="${diplayTableUID.disputeStatus != null}">
            <bean:message bundle="i18n" key="${diplayTableUID.disputeStatus}" />
        </c:if>
    </display:column>               
    <display:column property="disputeLastUpdatedCSDID" title="${LastUpdatedCDSID}" sortable="true"/>
    <display:column property="disputeLastUpdateDate" title="${LastUpdatedDate}" sortable="true"/>
</display:table>

First Jsp Page:

<bean:define id="diplayTableUID" name="processRatingDisputeForm"/> 
<%@include  file="ratingElementInstances_All.jsp"%>

Second Jsp Page:

<bean:define id="diplayTableUID" name="returnPointsRatingDisputeForm"/> 
<%@include  file="ratingElementInstances_All.jsp"%>

third Jsp Page:

<bean:define id="diplayTableUID" name="submitRatingDisputeForm"/>
<%@include  file="ratingElementInstances_All.jsp"%>

Why i'm using the entire form in the bean tag means. I need some values to get through the object. For example,

<c:if test="${diplayTableUID.disputeNumber != null}">
Kallar_Mannargudi
  • 485
  • 1
  • 4
  • 10
  • I don't understand the problem. What do you expect the above code to do, and what does it do instead? – JB Nizet Jul 23 '12 at 13:35
  • @JB Nizet - i get the object through the ben:define tag at the same time i have one jsp for the three modules. So i declare "${diplayTableUID}". Now it works fine but that object prints the value in the above of the display tag. – Kallar_Mannargudi Jul 23 '12 at 13:39
  • The ID should be a string. It should not be a form object. Please show the generated HTML code and/or a screenshot, because it's still not very clear to me. – JB Nizet Jul 23 '12 at 13:49
  • @ JB Nizet - i need minimum 10 reputation to upload the screen shot. i tried but i can't uploaded that. I'm very sorry. What is the another way to do. – Kallar_Mannargudi Jul 23 '12 at 13:51
  • @JB - Can you please give me your mail id, i will forward the screen shot for you – Kallar_Mannargudi Jul 23 '12 at 13:57
  • @JB i added some more details to the previous question. Can you please tell me which scope is really suitable to use here. You are the only person to reply me. So i have the only one option and waiting for you reply. Thanks for advance – Kallar_Mannargudi Jul 23 '12 at 14:04
  • pageScope is fine. Use any freely available image hosting provider to post your screenshot. I won't give you my email. – JB Nizet Jul 23 '12 at 14:39

2 Answers2

0

If I understand correctly, you want to be able to access the current "row" object, but since it has a dynamic ID, you're stuck. The following should work:

<c:if test="${pageScope[diplayTableUID].disputeNumber != null}">

You could also define an alias right after the opening tag, and use this alias after:

<c:set var="currentRow" value="${pageScope[diplayTableUID]"/>
...
<c:if test="${currentRow.disputeNumber != null}">
JB Nizet
  • 678,734
  • 91
  • 1,224
  • 1,255
0

Use 'htmlId' for id of table on the client side.

Brad Solomon
  • 38,521
  • 31
  • 149
  • 235