Hi,

I have two problems using Struts 1.0.2.
First problem
I use two beans on a html-page: an articlebean and a divisionbean.

This is part of my page:
<select name="artdivid" size="1">
<logic:iterate id="element" name="divisionbean" type="com.test.Division">
<option value="<bean:write name="element" property="divisionid"/>"
<logic:match name="element" property="divisionid"
value="searchvalue">selected</logic:match>><bean:write name="element"
property="divisionname"/></option>
</logic:iterate>
</select>

Instead of "searchvalue" I want to include the value of <bean:write
name="articlebean" property="articledivisionid" />, while the iterate is on
the divisionbean.

How do I do this?


Second problem

I do an iterate where "companyname" has the same value for several lines in
orderlinebean. However, I just want to write lines with a certain name only
once, witch is a conditional loop: as long as articlename has the same
value, don't write the line more then one time.

part of the html-page:
<logic:iterate id="element" name="orderlinebean" type="com.test.Orderline">
<tr>
<td><bean:write name="element" property="companyname"/></td>
<td><bean:write name="element" property="category"/></td>
</tr>
</logic:iterate>

I tried to include a logic:match with conditional value = <bean:write
name="element" property="companyname"/> but I did not manage to get the
property into a string. How can I do this?


Peter Cnops
Project Management - MediaTower
Digital Photography - PrePress - Digital Printing - Internet Services
Veldkant 29, B-2550 Kontich
Tel. 03 450 81 00 - Fax 03 450 81 09
http://www.mediatower.be



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

Reply via email to