i guess you shouldve mentioned you are using 1.2.6, because nested forms are
1.3 and up.

what you can do is change:

class AddressForm extends Form to class AddressForm extends
WebMarkupContainer
and in AddressForm.html change <form> to <div>

then things should start working properly. of course the whole form will be
validated, when you press lookup. which is not something you want, but you
have to live with until you go 1.3 or create validators that only validate
conditionally.

-igor




On 5/3/07, John RDF <[EMAIL PROTECTED] > wrote:


OK. Below is a test case quick start application eclipse project that
produces the quirks I have been describing.

ftp://ftpuser:[EMAIL PROTECTED]/wicket-quickstart-1.2.6.rar

The test procedure to reproduce strange behaviour is as follows.

1. Enter postcode in first address.
2. Hit address search (you will then see your postcode appearing in other
fields unexpectedly)
3. Select first option from first drop down and hit use address (This will

appear to work apart from the extraneous postcodes)
4. Select second option from first drop down and hit use address (then all
addresses will be filled unexpectedly)

I suspect this behaviour relates to nested forms as without the outer form

it appears to work as expected. I am also beginning to suspect that this
may
be the root of my other problem with radio groups behaving oddly.

Hope this helps and thanks,
John



John RDF wrote:
>
> 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#a10305933

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

-------------------------------------------------------------------------
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