You could use JSTL if you'd like to check for whether you should print
the column out - something like: 

<c:if test="${myParameter==true}"><td>print my stuff here</td>
</c:if> 


Im not sure how to do it with just struts, someone else might know that.




-----Original Message-----
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Konrad Billewicz
Sent: Thursday, July 28, 2005 2:47 PM
To: user@struts.apache.org
Subject: Filtering bean properties

I have a report with a huge number of columns (about 150). In the prior
form 
user can choose some of them. My current task is to show only choosen
columns in 
the report. I'm unexpectedly uncertain how to do it elegantly (using, of
course, 
Struts). The current version of this huge result page (showing all
colums) is 
similar to this:

<table>
<tr>
<td><b>Agreement type</b></td>
<td><b>Agreement symbol</b></td>

<!-- many, many (about 150) other columns) -->

</tr>

<logic:iterate name="treaties" id="treaty" scope="request">

<tr>
<td>
        <bean:write name="treaty" property="agreementType"/>
</td>
<td>
        <bean:write name="treaty" property="agreementSymbol"/>
</td>

<!-- many, many (150 too) values, mostly String and Date objects  -->

</tr>

In my opinion reports are quite common, so it should be a quite common
problem. 
How would you handle it?

Best regards,
Konrad Billewicz



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to