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]

Reply via email to