Hi all:
I am populating all fields in the ActionForm, and also populating an
array of QueryResults from the data base. This bean called QueryResults
has a field on it called selected. This QueryResults bean lives in the
Actionform.
Going out to the jsp, and returning on the execute(): All the data in
the ActionForm, and the nested bean queryresults[] is populated
properly except for one field and that is the big problem:
checkbox member: QueryResults[1-'x'].selected <i>always</i> null in
ActionForm.
Here is the code. I dont know what to do. Any suggestions?
class QueryResultsFormBean extends ActionForm {
QueryResults[] queryRes;
String jspFld1;
String jspFld2;
String jspFld3;
......
public QueryResults[] getQueryRes() {
return hatResultsList;
}
public void setQueryRes(QueryResults[] queryRes) {
this.queryRes= queryRes;
}
}
class QueryResults {
String selected;
String col1data;
String col2data;
String col3data;
}
The action execute() is pulling things out of the data base and filling
in the form data:
public class QueryInitAction extends Action {
........
QueryResultsFormBean myForm = (QueryResultsFormBean)form;
db.moveDataHelper(myForm);
}
Now when I get to the actual jsp I tried the following:
<nested:present name="QueryResultsFormBean" property="QueryResults" >
queryResults are present.
</nested:present>
<nested:iterate id="element" name="QueryResultsFormBean"
property="QueryResults" scope="session">
<nested:checkbox name="element" property="selected" />
<nested:write name="element" property="col1data" />
<nested:write name="element" property="col2data" />
</nested:iterate>