You're saying that /editPerson.html?id=1 results in a null value in
the hidden field?

Matt

On Thu, May 1, 2008 at 10:10 AM, Ryan Withers <[EMAIL PROTECTED]> wrote:
> Matt,
>
>   The id does get set, but when the action methods get performed either
> (edit, save, delete) the id is being set back to null.
>
> Thanks,
>
> Ryan
>
>
>
> On Thu, May 1, 2008 at 11:04 AM, Matt Raible <[EMAIL PROTECTED]> wrote:
>
> >
> >
> >
> > The id should be a hidden field so it's retained on an edit. The
> > tutorial shows this:
> >
> > <s:hidden name="person.id" value="%{person.id}"/>
> >
> > Matt
> >
> >
> >
> >
> > On Thu, May 1, 2008 at 9:58 AM, Ryan Withers <[EMAIL PROTECTED]>
> wrote:
> > > Matt,
> > >
> > >   In the posted example for the Struts 2 project there seems to be an
> issue
> > > with the PersonAction where things are done in terms of the id on the
> > > action.  Trouble is this gets set, and then on a subsequent request it
> winds
> > > up being null.  So the call to save always creates a new row in the
> table.
> > > I solved this by storing the id in the session when the setter setId
> gets
> > > called.  In fact many of the methods in the PersonAction now look for
> the id
> > > being in the session vs. just looking at the instance id variable.  Am I
> > > losing my mind or should the example be updated?
> > >
> > > Thanks,
> > >
> > > Ryan
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to