I�m trying to set a multidimensional array to hold the results of posts from a multibox.
Any thoughts on how to approach this? I�ve been doing the following without success.
My form has:
private
String[][] checkingOptions = new String[MAX_NUM_PRODUCTS][0];
/**
* Returns the checkingOptions.
* @return String[][]
*/
public String[][] getCheckingOptions() {
return checkingOptions;
}
/**
* Sets the checkingOptions.
* @param checkingOptions The checkingOptions to set
*/
public void setCheckingOptions(String[][] checkingOptions) {
this.checkingOptions = checkingOptions;
}
My
JSP looks like:
CheckingOptionCount holds the first index in to the multidimensional array. This will be zero for all the elements iterated over in the following code.
<logic:iterate id="checkingoptions" name="selectProductForm" property="checkingConvenienceOptions">
<%
String checkboxTarget = "checkingOptions[" + checkingOptionCount + "]";
%>
<html:multibox name="selectProductForm" property="<%= checkboxTarget %>"
value="<%= ((Map.Entry) checkingoptions).getValue().toString() %>"/>
<html:link href="" target="_blank">
<bean:write name="checkingoptions" property="key"/>
</html:link>
</logic:iterate>
Any pointers would be appreciated.
Thanks,
~rich