PDiefent, I've came across similar problem. In my case, and what I'm discovered fits your case as well, the following is happening:
ModalWindow is component based. It is rendered in two parts. The first part is all you put into your markup. The second part is dynamically built within a separate div within the <body> tag. Concerning browser's DOM, your form and modal window form are not overlapped. Nothing is passed for DDChoice when modal window form is submitted. Concerning wicket tree your form and modal window form are overlapped (modal form is within). So when wicket is updating formcomponent models (and it starts from the outermost form for some reason), it has to fill DDC, but nothing is passed in request for it. So wicket fills it with null, what explains "choose a value" message in it. I don't know what is actually wrong - how wicket is processing form or ModalWindow implementation that renders modal window somewhere outside of the place you pointed. It is up to authors to decide. I'm going to investigate workarounds. Will be back if suceed. PDiefent wrote: > > It's definitely not a hashCode/equals problem, because when the page is > rendered, the initial value of the dropDown is set correctly from the > PropertyModel. After coming back from the modal window the DropDownChoice > can't set the new value ... > > asfernandes wrote: >> >>> Looks like lack of hashCode/equals implementation for the type used. >>> I suffered from exactly problem as you initially described... But in my >>> case, however, equals() was implemented to always return false, and >>> DropDownChoice calls it. Perhaps, your problem is different, but I don't >>> know if it can happen due to different instances of objects created by >>> LoadableDetachableModel so you had to correctly override this method, or >>> is a totally different thing... >>> >>> >>> Adriano >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> For additional commands, e-mail: users-h...@wicket.apache.org >> >> >> > > -- View this message in context: http://www.nabble.com/Update-DropDownChoice-with-ModalWindow-tp22595072p23273638.html Sent from the Wicket - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org