I'm trying to populate a List of beans from a form:
public class Foo {
public String attr1;
public String attr2;
}
public class Bar {
public List<Foo> foos;
}
public class StrutsAction extends Action {
public Bar bar;
}
So in my Struts2 form, what's the best way to populate Foo? Intuitively, I want to do:
<input type="hidden" name="bar.foos.attr1" />
but that isn't working and would cause collisions. I'm sure the answer is very simple and I'm overlooking it.