Re: how to indicate a model changed when item has been removed?

2007-08-16 Thread Leszek Gawron

Igor,

Igor Vaynberg wrote:

sounds like you are caching the list inside model returned by new
PropertyModel( getModel(), thermometers) getModel() there.


This is not the case. the thermometer is removed from parent entity and 
the parent itself is being persisted, so memory model is in sync with 
database.


If I remove child panels from list then everything works fine. If the 
list was cached as you suggest then even after removal the return page 
would show the removed thermometer, which it does not.


--
Leszek Gawron

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



Re: how to indicate a model changed when item has been removed?

2007-08-16 Thread Leszek Gawron

Leszek Gawron wrote:

Igor,

Igor Vaynberg wrote:

sounds like you are caching the list inside model returned by new
PropertyModel( getModel(), thermometers) getModel() there.


This is not the case. the thermometer is removed from parent entity and 
the parent itself is being persisted, so memory model is in sync with 
database.


If I remove child panels from list then everything works fine. If the 
list was cached as you suggest then even after removal the return page 
would show the removed thermometer, which it does not.



It looks like this:

- query for thermometers' list page
- RefreshingView.getItemModels() called
- show page
- click edit on some thermometer
- page with form shown
- click delete
- RefreshingView.getItemModels() !NOT! called
- exception in list child panel
  ThermometersPanel$ThermometerSensorPanel.isVisible

why isn't thermometers list refreshed first?


when I remove child panels this happens:
- query for thermometers' list page
- RefreshingView.getItemModels() called
- show page
- click edit on some thermometer
- page with form shown
- click delete
- RefreshingView.getItemModels() called
- page shown

--
Leszek Gawron

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