Quote from ModalWindow API:
"If you want to use form in modal window component make sure that you put the modal window itself in another form (nesting forms is legal in Wicket) and that the form on modal window is submitted before the window get closed"
This way when you submit the form in the modal window actually the parent form gets submitted and you get the values transferred.