aspose file tools*
The moose likes Other Open Source Projects and the fly likes problem in displaying an array conditionally using display tag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "problem in displaying an array conditionally using display tag" Watch "problem in displaying an array conditionally using display tag" New topic
Author

problem in displaying an array conditionally using display tag

reena rathod
Greenhorn

Joined: Jun 18, 2009
Posts: 4
I am using display tag to display an array of objects from session depending on certain condition using <c:if (JSTL tag). But the problem is it will display a blank row in between the table if the condition fails and there onwards it will continue.

Every thing works fine accept the display(blank rows inbetween the table)

Any body has the solution for it?

check out the code and attached screen


<display:table name="sessionScope.SecureMessages.messages" id="row"
requestURI="/messageChange.do">

<display:column title="Date" sortable="true"
headerClass="columnheader" sortProperty="createdDate"
defaultorder="ascending" class="tdclass">
<c:if test="${row.fromType == 1}">
<fmt:formatDate value="${row.createdDate}"
pattern="M/dd/yy" />
</c:if>
</display:column>

<display:column title="From" sortable="true"
headerClass="columnheader" sortProperty="To">

<c:if test="${row.fromType == 1}">
<cut value="${row.to}" />

</c:if>
</display:column>
</display:table>



[Thumbnail for display_tag_problem.jpg]



Reena
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61432
    
  67

"roy ranchy", please check your private messages for an important administrative matter.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
reena patil
Greenhorn

Joined: Jul 05, 2009
Posts: 3
even I have the same problem... any body has the solution for this other then creating suppurate lists depending on the condition?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem in displaying an array conditionally using display tag