Kallar_Mannargudi
Kallar_Mannargudi

Reputation: 495

How to declare the runtime value of UID in display tag?

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}">

Upvotes: 0

Views: 2202

Answers (2)

Hamid Fathi
Hamid Fathi

Reputation: 59

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

Upvotes: 0

JB Nizet
JB Nizet

Reputation: 691755

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}">

Upvotes: 0

Related Questions