Me, set the version? I don't think I ever said I was doing that :)

On 3/30/06, James Carman <[EMAIL PROTECTED]> wrote:
>
> What do you do about versioned entities?  You're not supposed to set the
> version by hand on the object that you fetch from the database.
>
>
> -----Original Message-----
> From: Jesse Kuhnert [mailto:[EMAIL PROTECTED]
> Sent: Thursday, March 30, 2006 4:29 PM
> To: [EMAIL PROTECTED]
> Cc: Tapestry users
> Subject: Re: Keeping an object intact and only applying changed values
>
> If it's any consolation I do it this way and it works fine. I usually
> store
> the object key as a session persisted value that I use to re-init with
> hibernate on pageBeginRender . (Unless it's a new entity )
>
> On 3/30/06, Matt Raible <[EMAIL PROTECTED]> wrote:
> >
> > I'll try to get back to you with a more concrete example in the next
> > few hours.  For all I know, it's already working as desired in
> > Tapestry.  I'll prove it doesn't before posting a reply.
> >
> > Matt
> >
> > On 3/30/06, Jesse Kuhnert <[EMAIL PROTECTED]> wrote:
> > > I'm confused...If I had a User object with 5 out of 10 members that I
> > wanted
> > > to edit then I'd have these sorts of ognl: bindings to the field
> values:
> > >
> > > <input type="@TextField" value="ognl:user.firstName " />
> > >
> > > Then my POJO would only have the 5 of 10 values I'm mucking with
> > updated. Am
> > > I being retarded or did this answer your question?
> > >
> > >
> > > On 3/30/06, Matt Raible <[EMAIL PROTECTED]> wrote:
> > > >
> > >  Spring MVC and WebWork have some pretty easy ways to re-fetch an
> > > object from the database before applying request parameters on a post.
> > >  This provides a way to have your POJOs live in request scope and not
> > > put them in the session during an edit/save cycle.  Furthermore, you
> > > don't have to put *all* the properties of a POJO in hidden fields.
> > > For those fields that aren't passed in, the properties are not
> > > overwritten.
> > >
> > > Does Tapestry have a similar mechanism?
> > >
> > > I want to edit, display 5 out of 10 fields, and when I save - only
> > > have those 5 fields change instead of nullifying the fields I didn't
> > > pass in.
> > >
> > > My guess is this is built-in, and I'm doing something to short-circuit
> > > the behavior.  Here's what I have on one of my pages:
> > >
> > >     public void pageBeginRender(PageEvent event) {
> > >         if (getUser() == null &&
> > > !event.getRequestCycle().isRewinding()) {
> > >             setUser(new User());
> > >         } else if (event.getRequestCycle().isRewinding()) {
> > >             setUser(new User());
> > >         }
> > >     }
> > >
> > > I tried removing the 2nd one to get the desired behavior - is this the
> > > best way to do that?
> > >
> > > Thanks,
> > >
> > > Matt
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > > [EMAIL PROTECTED]
> > > For additional commands, e-mail:
> > > [EMAIL PROTECTED]
> > >
> > >
> > >
> > >
> > > --
> > > Jesse Kuhnert
> > > Tacos/Tapestry, team member/developer
> > >
> > > Open source based consulting work centered around
> > > dojo/tapestry/tacos/hivemind.   http://opennotion.com
> >
>
>
>
> --
> Jesse Kuhnert
> Tacos/Tapestry, team member/developer
>
> Open source based consulting work centered around
> dojo/tapestry/tacos/hivemind.  http://opennotion.com
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
Jesse Kuhnert
Tacos/Tapestry, team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind.  http://opennotion.com

Reply via email to