Populate Collection from Struts2 Form Submission

后端 未结 1 628
情话喂你
情话喂你 2020-12-29 16:11

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&         


        
1条回答
  •  长情又很酷
    2020-12-29 16:56

    If I understand it correctly, you just want different name for each hidden field?

    
        
        
    
    

    which should give you the equivalent of

    
    
    
    
    

    If you have proper getter/setter, it should set all the values when the form is being submitted.

    0 讨论(0)
提交回复
热议问题