Hi Martin,

I'm sorry to bother you with a second post. 

I have reproduced the behaviour described above in a simple project ( 
refreshingview.zip
<http://apache-wicket.1842946.n4.nabble.com/file/n4669090/refreshingview.zip> 
). Also, I put the mercurial project on bitbucket( hg clone
https://[email protected]/lucast/refreshingview).


The behaviour is as follow. 

Step 1, choose a number (3, for example) from the drop down list. A list of
3 entries of text fields will be displayed.

Step 2, choose a different number (2, for example) from the drop down list.
Only one entry of text field will be displayed. Even though the list model
has 2 entries, not one.

When an entry from the drop down list, located in HomePage is selected,
PersonListFormComponentPanel is updated.

On running the debugger, I noticed that inside
ReuseIfModelsEqualStrategy.getItems(), (line 86), on the bit that compares 
if (oldItem == null), on the first run, oldItem *is* null.
On the second run, *oldItem* *is not*.

That is why PersonRefreshingView.populateItem() is not called the second
time a number is selected from the drop down list.

How can I set *oldItem* to null so that it follows the very same behaviour
as when executed the first time?

If you happen to look inside
PersonListFormComponentPanel.PersonRefreshingView, you will notice that I
have implemented PersonModel, with equals and hashcode functions.


Anyway, this is something I honestly cannot get my head around. I have tried
for days now and I find it most puzzling.

Any tips, or hints in the right direction will be much appreciated.

Thanks, once more,
Lucas

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/validation-in-form-component-panels-in-RefreshingView-tp4669068p4669090.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to