THANKS! After all that work, I *think* BeanUtils was having issues
with setNumber(int, String) for some reason - when I took out the
setters for indexed values, and just have setters/getters for the
arrays - it works like a champ!
Thanks a TON!
Will Stranathan
On Mon, 24 Jan 2005 15:16:55 -0600
"Brad Balmer" <[EMAIL PROTECTED]> wrote:
I have ActionForm's that contain String array variables like:
private String[] parmTypeCd = null;
With the normal:
public String[] getParmTypeCd() {
return parmTypeCd;
}
public void setParmTypeCd(String parmTypeCd[]) {
this.parmTypeCd = parmTypeCd;
}
My form has:
<html:select property="parmTypeCd" multiple="true" size="3">
<html:option value="1">Value1</html:option>
<html:option value="2">Value2</html:option>
...
</html:select>
Then, underneath I build my ArrayList to pass to my iBatis query
like:
ArrayList parmTypeCds = null;
if(form.getParmTypeCd() != null && form.getParmTypeCd().length > 0) {
parmTypeCds = new ArrayList();
String typeCds[] = form.getParmTypeCd();
for(int i=0; i<form.getParmTypeCd().length; i++) {
parmTypeCds.add(typeCds[i]);
}
}
Pretty simple. There may be a better way to do it, but this works
just fine
for me.
--Brad
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]