struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Taylor" <rtay...@mulework.com>
Subject RE: DynaValidatorFom with checkbox properties
Date Fri, 02 Apr 2004 18:27:44 GMT
> employee. How shall I configure
> the DynaValidatorForm in my strus_config to take a unknown number of 
> checkbox values?

<form-property name="rrole"
                  type="java.lang.String[]" initial="{}"/>


> second question: how can I make the properties of a DynaVForm available 
> to a Action?
DynaActionForm form = (DynaActionForm)form;
String[] rrole = (String[])form.get("rrole);

You might try using <html:multibox .../>

<c:forEach var="tk" items="${task}">
<html:multibox property="rrole"><c:out value="${tk.taskId}"/></html:multibox>
</c:forEach>


robert

> -----Original Message-----
> From: Johannes Wolfgang Woger [mailto:jwwoger@chello.at]
> Sent: Friday, April 02, 2004 12:48 PM
> To: user@struts.apache.org
> Subject: DynaValidatorFom with checkbox properties
> 
> 
> Hi,
> I have a checkbox, where do not know in adwance how many properties to 
> be checked I will have
> this is why I use forEach.
> I am using a DynaValidatorForm which takes some attibutes for an 
> employee. How shall I configure
> the DynaValidatorForm in my strus_config to take a unknown number of 
> checkbox values?
> 
> <c:forEach var="tk" items="${tasks}">
>     
>        <c:out value="${tk.taskBez}"/>
>                <input type="checkbox" name='rrole' value='<c:out 
> value="${tk.taskId}"/>'/>                   
>       </c:forEach>
> 
> this is how my .jsp looks like.
> 
> second question: how can I make the properties of a DynaVForm available 
> to a Action?
> 
> Thanks
>     Wolfgang
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 

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


Mime
View raw message