struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marco Mistroni" <mmistr...@waersystems.com>
Subject Can struts do it?
Date Fri, 21 Apr 2006 09:41:28 GMT

Hello all,
 I have following problem..


I have a DynaActionForm.  It has two array fields (String[] ownerRef and
Boolean[] suspendPart) and some other fields.  I want to populate these
arrays from a form and be able to submit the value from the page.
 That's it.

In the concrete examle, i am iterating thru suspendPart, which is a
Boolean[]

Within the logic:iterate I'd like , for each row, to display the
suspendPart[i] element, as an input parameter (a checkbox) so  that the user
can change it and I can submit it to the Action.

I have a jsp containing code like this:

<logic:iterate indexId="idx" name="suspendPartForm" property="suspendPart"
id="part">
       <tr>
		<td><html:hidden property='<%="ownerRef[" + idx + "]"%>'
                                                 indexed="true"/>
 
<bean:write name="suspendPartForm " property='<%="ownerRef["
+ idx + "]"%>' td>
		<td><html:checkbox name="part" property="suspendPart"
indexed="true" value="true"/></td>
	</tr>
</logic:iterate>

Obviously this does not work.  I have tried lots of other variants,
including having a class wrapping the two variables and iterating over that,
but ultimately it just refuses to actually work.


Can anyone help me out?

Thanx and regards
 marco


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message