Re: CRUD with a OneToMany association under Struts 2 / Hibernate 3

2010-04-01 Thread bruno grandjean
for the children's form fields. The parameters names you would need are id name values[0].id values[0].name values[1].id values[2].name ... for the parameters interceptor to work properly when applying the posted values. See here for more details: http://struts.apache.org/2.1.8/docs/ta

RE: CRUD with a OneToMany association under Struts 2 / Hibernate 3

2010-04-01 Thread bruno grandjean
upport implements ModelDriven { > >>>>> > >>>>> private static final long serialVersionUID = -2662966220408285700L; > >>>>> private Parent cl = new Parent(); > >>>>> private List clList = new ArrayList(); > >>>>> p

RE: CRUD with a OneToMany association under Struts 2 / Hibernate 3

2010-04-01 Thread bruno grandjean
on extends ActionSupport implements ModelDriven { > >>>>> > >>>>> private static final long serialVersionUID = -2662966220408285700L; > >>>>> private Parent cl = new Parent(); > >>>>> private List clList = new ArrayList(); > >>>>> private

RE: CRUD with a OneToMany association under Struts 2 / Hibernate 3

2010-04-01 Thread bruno grandjean
ing delete() > >>> { > >>> HttpServletRequest request = (HttpServletRequest) > >>> ActionContext.getContext().get(ServletActionContext.HTTP_REQUEST); > >>> clDAO.deleteParent(Long.parseLong(request.getParameter("id"))); > >>> r

RE: CRUD with a OneToMany association under Struts 2 / Hibernate 3

2010-04-01 Thread bruno grandjean
etRequest) > >>> ActionContext.getContext().get(ServletActionContext.HTTP_REQUEST); > >>> clDAO.deleteParent(Long.parseLong(request.getParameter("id"))); > >>> return SUCCESS; > >>> } > >>> > >>> public String edit() > &

RE: CRUD with a OneToMany association under Struts 2 / Hibernate 3

2010-04-01 Thread bruno grandjean
public List getParentList() { > > return clList; > > } > > > > public void setParentList(List clList) { > > this.clList = clList; > > } > > } > > > > > > > >> Date: Thu, 1 Apr 2010 11:30:23 +0200 > >> From: gie...@it-neering

RE: CRUD with a OneToMany association under Struts 2 / Hibernate 3

2010-04-01 Thread bruno grandjean
values[0].id > values[0].name > values[1].id > values[2].name > ... > > for the parameters interceptor to work properly when applying the posted > values. > > See here for more details: > http://struts.apache.org/2.1.8/docs/tabular-inputs.html > > - René > >

RE: CRUD with a OneToMany association under Struts 2 / Hibernate 3

2010-04-01 Thread bruno grandjean
ds > > bruno > > > > > > > > -- > > From: "Rene Gielen" > > Sent: Wednesday, March 31, 2010 7:12 PM > > To: "Struts Users Mailing List" > > Subject: Re: CRUD with a O

Re: CRUD with a OneToMany association under Struts 2 / Hibernate 3

2010-03-31 Thread bruno grandjean
is, nor whether it is particularly Struts 2 related (rather than just Hibernate) - but you might want to have a look in the CRUD demo section of the Struts 2 showcase application. Maybe you will also find this demo useful: http://github.com/rgielen/struts2crudevolutiondemo - René bruno grandjean schrie

Re: CRUD with a OneToMany association under Struts 2 / Hibernate 3

2010-03-31 Thread bruno grandjean
be you will also find this demo useful: http://github.com/rgielen/struts2crudevolutiondemo - René bruno grandjean schrieb: Hi I am trying to implement a simple CRUD with a OneToMany association under Struts 2 / Hibernate 3. I have two entities Parent and Child: @Entity @Table(name="PARENT

CRUD with a OneToMany association under Struts 2 / Hibernate 3

2010-03-27 Thread bruno grandjean
Hi I am trying to implement a simple CRUD with a OneToMany association under Struts 2 / Hibernate 3. I have two entities Parent and Child: @Entity @Table(name="PARENT") public class Parent { private Long id; private Set values = new HashSet(); .. @Entity @Table(name="CHILD") public class Chi