If the field has retained its state in some way (such as @Persist or 
@SessionState) then this is to be expected. Otherwise, it’s an illusion. Try 
using person, in code, before findPerson(…) is executed and you’ll find it is, 
in fact, null.

The illusion is something to do with byte code enhancement and not being in 
production mode. Lance is very good at explaining this. Lance?

> On 8 May 2015, at 11:55 pm, Poggenpohl, Daniel 
> <daniel.poggenp...@isst.fraunhofer.de> wrote:
> 
> Hi,
> 
> http://jumpstart.doublenegative.com.au/jumpstart/examples/input/edit1/1
> 
> describes an example where a BeanEditForm is used to edit some object and 
> update the database.
> 
> The example uses the following code:
> 
>    // Form bubbles up the PREPARE_FOR_SUBMIT event during form submission.
> 
>    void onPrepareForSubmit() throws Exception {
>        // Get objects for the form fields to overlay.
>        person = findPerson(personId);
>    }
> 
> When I implement the example and set a few breakpoints, every time this event 
> handler is called, the person object already is the same as is found by 
> findPerson(personId). I can't seem to find the reason that the handler 
> retrieves the same object from the database once again.
> 
> Is this done because of detached objects? Or is there some other reasoning 
> behind this?
> 
> Regards,
> Daniel P.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to