This is a reasonably complex issue, so I'll apologize up front if I fail at 
explaining what seems to be wrong, and what I actually want to work.  I have 
created a simple Wicket app to demonstrate what I talk about that is available 
here: http://www.laccetti.com/rdm/wicket-ajax-problem.zip

I have a form that starts off with two fields: a dropdown that allows a user to select a 
number of accounts, and a dropdown that allows a user to choose if they have comments or 
not.  I have a custom AJAX behaviour that is a mixture of 
AjaxFormComponentUpdatingBehavior and AjaxFormSubmitBehavior so that a component update 
will cause all the fields to be posted to the server, so that their state can be retained 
across a refresh.  I am doing this because the entire form gets repainted.  I realize 
that I can just refresh certain components, but unfortunately the "big" app 
that is experiencing this problem is a table, which changes how things work (to retain 
XHTML compatibility).

When one of the two dropdowns is changed, the onchange event is fired in the behaviour.  When the 
"number of accounts" field changes, a RepeatingView is populated with the same number of 
text fields as was specified in the dropdown.  When the "has comments" drop down changes, 
a text area is displayed or hidden as required.  When the accounts dropdown changes, and the entire 
form is repainted, the text in the comments text area will be persisted across the refresh, due to 
the custom behaviour.  My problem comes in to saving the state of the account text fields.  I 
realize that right now I am clearing them all, and then rebuilding them, which is not helping.  
However, if I debug the AJAX behaviour, I noticed that the model field that corresponds to them is 
not being populated, whereas the comments one is.

So, the questions seem to be: why is the model not being populated (even though 
I can see via Firebug that they are being submitted), and how can I save the 
state of the repeating view across repaints?

Mike

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

Reply via email to