I am still having real trouble making truly reusable panels for domain
objects that work consistently without quirky behaviour.

I attach my code for an address panel. It contains a form as it has buttons
for looking up streets from the postcode. This panel needs to be embedded
with multiple instances in same page and/or other forms and panels. The
lookup etc works except it has some strange side effects. When I first enter
a postcode and press the lookup button, all the other postcode fields are
populated further down the page. Then when I select an address from the now
populated drop down list, and then press use selected button, all the
remaining fields of all other address forms also get populated!

This weird behaviour only occurs in a downwards direction thoughout the page
and only when the user has not already entered something in a field.

Can people please look at the code below. I cannot see why it should behave
this way.

http://www.nabble.com/file/8180/AddressPanel.java AddressPanel.java 
http://www.nabble.com/file/8181/AddressPanel.html AddressPanel.html 
http://www.nabble.com/file/8182/AddressDO.java AddressDO.java 

The form that adds these panels does it as below

add(new AddressPanel("proposedAddress",
getCreditCheckDTO().getProposedAddress()));
add(new AddressPanel("currentAddress",
getCreditCheckDTO().getCurrentAddress()));      
add(new AddressPanel("previousAddress",
getCreditCheckDTO().getPreviousAddress()));

The form has a compound property model has a pojo for its model object. This
is returned by getCreditCheckDTO().

Thanks in advance,
John



-- 
View this message in context: 
http://www.nabble.com/Reusable-Panels-Nested-Forms-Models-and-weird-behaviour-tf3680964.html#a10287153
Sent from the Wicket - User mailing list archive at Nabble.com.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to