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
upport implements ModelDriven {
> >>>>>
> >>>>> private static final long serialVersionUID = -2662966220408285700L;
> >>>>> private Parent cl = new Parent();
> >>>>> private List clList = new ArrayList();
> >>>>> p
on extends ActionSupport implements ModelDriven {
> >>>>>
> >>>>> private static final long serialVersionUID = -2662966220408285700L;
> >>>>> private Parent cl = new Parent();
> >>>>> private List clList = new ArrayList();
> >>>>> private
ing delete()
> >>> {
> >>> HttpServletRequest request = (HttpServletRequest)
> >>> ActionContext.getContext().get(ServletActionContext.HTTP_REQUEST);
> >>> clDAO.deleteParent(Long.parseLong(request.getParameter("id")));
> >>> r
etRequest)
> >>> ActionContext.getContext().get(ServletActionContext.HTTP_REQUEST);
> >>> clDAO.deleteParent(Long.parseLong(request.getParameter("id")));
> >>> return SUCCESS;
> >>> }
> >>>
> >>> public String edit()
> &
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
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é
>
>
ds
> > bruno
> >
> >
> >
> > --
> > From: "Rene Gielen"
> > Sent: Wednesday, March 31, 2010 7:12 PM
> > To: "Struts Users Mailing List"
> > Subject: Re: CRUD with a O
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
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
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
11 matches
Mail list logo