On Wed, 16 Jan 2008, Doug Leeper wrote:
> What is the best way to do this? 

I don' know which would be the best but can think of a 
couple of things to try out:

- use nested forms and make the two forms in fact separate,
  then you can use a FormSubmitting-behavior for the first
  form

- convert the input of the fields that you are interested in
  and use getConvertedInput() instead of getModelObject() to
  read the values. Probably you need 
  FormComponentUpdatingBehavior to the input fields to get
  the values from browser to server

- remove all normal validation from the form and do the 
  validation with ajax behaviors that check things 
  conditionally. If you have ajax anyway it might make sense
  to disable the submit button while the input is invalid 
  and indicate what is missing (instead of the 1970s style of
  making the user press submit and only then telling her 
  what is lacking)
  
> I have tried several methods ( CheckBox with a FormComponentUpdatingBehavior
> and an AjaxCheckBox ) but the values that are entered into the Contact
> Address fields are not being updated to the model.  

Wicket form processing does
1) check required-info
2) convert raw input to converted input 
3) validate converted input
4) update model

so normally the model is only updated after validation.

Best wishes,
Timo

-- 
Timo Rantalaiho           
Reaktor Innovations Oy    <URL: http://www.ri.fi/ >

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

Reply via email to