On Wed, 26 Mar 2008, lizz wrote:
> I have a page that contains a compound property model that refers to a
> loadableDetachable model.
> 
> The domain object in  the loadable detachable model contains a collection of
> Person Objects (Person contains a first name and a last name and an age). 
> 
> I want to display the persons in a ListView and I want to be able to change
> the first name, last name or age and save the new value. I therefore use
> three text fields for each list item.
> 
> The problem is that when I press the save button the changed values has been
> reset back to the original value. Why is the detachable model being detached
> and reloaded before I save the list?

There are a lot things that could go wrong in your scenario,
depending on the persistence mechanism, transaction handling
etc.

To investigate further you could

- try to display a single person outside the ListView but
  with the same mechanism, to see whether the problem has
  something to do with the ListView or whether it is in how
  your models work

- look at whether the correct values get updated to the
  Person object

- put Thread.dumpStack() or something such in the load()
  implementation of your LoadableDetachableModel to see when
  it is called

- post us some code

Best wishes,
Timo

-- 
Timo Rantalaiho           
Reaktor Innovations Oy    <URL: http://www.ri.fi/ >

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

Reply via email to