struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <e...@readingplus.com>
Subject Indexed tags struts 1.0
Date Mon, 03 Nov 2003 16:33:36 GMT
I would like to pass the String[] array results of a
select tag to an array set and in the form bean my object always seems to me an string and
not a String[]?

Could someone let me know if I am doing something wrong?



jsp snippet:
<logic:iterate id="net" name="localProductInfo" property="network" indexId="netIn">

<tr>
<td width="50%" class="bullets" valign="top">
Network Product:
<b><bean:write name="net" property="product.productName" /></b> 
</td>
<td width="50%">
<bean:define id="prodVersions" name="net" property="productVersions" />
<html:select name="localProductInfo" property='<%= "networkVersionList[" + netIn + "]"
%>' multiple="true">
<html:options collection="prodVersions" property="id" labelProperty="version" />
</html:select>
</td>
</tr>
<td colspan="100%">&nbsp;</td>
</logic:iterate>

form snippet

private ArrayList network;

private ArrayList networkVersionsList = new ArrayList();

private ArrayList assignedProducts = new ArrayList();
private ArrayList newProducts = new ArrayList();

private String networkSupportType;
private int networkSupportTypeId;
private String shippedDate;

public Object getNetworkVersionList(int key) {
if (networkVersionsList.size() > 0) {
return networkVersionsList.get(key + 1);
} else 
return null;
}
public void setNetworkVersionList(int key, Object value) {
System.out.println("** adding networkVersion");

if (value == null){
System.out.println("*** NULL!");
} else {
System.out.println("_Size:" + networkVersionsList.size());
System.out.println("_--- 1 " + value.getClass());
// String[] test = (String[]) value;
// for (int c = 0; c<test.length; c++ ) {
// System.out.println(test[c]);
// }

}

networkVersionsList.add(value);
}



Eric Waite

Taylor Online
Java Developer


http://www.readingplus.com
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message