public class BaseForm extends ValidatorForm{
private List<?> trainnodeList = null;
public void reset(ActionMapping mapping, HttpServletRequest request) {
trainnodeList = new TrainList();
}
private class TrainList extends ArrayList<Object> {
public Object get(int index) {
while (index >= size()) {
add(new TrainNPOJO());
}
return super.get(index);
}
}
public List<?> getTrainnodeList() {
return trainnodeList;
}
public void setTrainnodeList(List<?> trainnodeList) {
this.trainnodeList = trainnodeList;
}
}