I've spent about a workday and a half trying to debug this and figure
out what's going wrong...

The core problem is: I'm pretty sure I've diagnosed it so that a Form
inside a Page embedded in a ModalWindow pCreativeModel I have is using
a CompudPropertyModel to update a model object... and with logging
debugging I see that it is indeed updating a model object of the right
type, but it's NOT the one I passed into it -- nor are the usual
constructors or static code blocks being called that would indicate a
new one was being made, it's like it's somehow being cloned....

To make it concrete, I have a
In a datatable,  CreativeVerifyColumn's populateItem reconstitutes a
AdCreativeModel ...
it then makes a CreativeVerifyLinkPanel that has an AjaxLink that will
show the ModalWindow that it made at creation time,
the ModalWindow's createPage() returns a new CreativeVerifyPanelPage
which is passed the AdCreativeModel,
that page has a form that does form.setModel(new
CompoundPropertyModel(mAdCreativeModel));, and then some checkboxes
that apply to accessors on the AdCreativeModel.

To track the problem, I made a static function on AdCreativeModel that
can be called with an instance of AdCreativeModel...
when the function is called, it A. adds the instance on an ArrayList
and B. tells you if that new instance is == to any of the previous
instances you called the function with.

I then put in calls to that debugger function to A. the constructor of
AdCreativeModel B. for grins, a static code block on AdCreativeModel
C. the getter for one of the relevant properties on the
AdCreativeModel

when the data table is displayed, the static block and the constructor
are called, and the same instance is called to show the value of the
field

clicking on the link to show the modal window, I see the thing getting
passed around is the old instance of the panel - plus that instance
gets read, presumably to let the checkbox in the form get populated
properly

in the form I check the checkboxes and hit OK... the accessor for the
field is read, but on a NEW instance of my model. It's NOT the same
old model I've been passing around, nor has anything new been
constructed or static code called. So on this new model, the accessor
is called. But back at the onClose callback of the ModalWindow, the
original model has not been touched.

How do I diagnose this? What am I missing? Is there some weird cloning
going on, between the ModalWindow and/or the form, or why is it
reading from one copy of the model and writing to another?

Thanks for any suggestions!

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

Reply via email to