You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Vladimir K <ko...@gmail.com> on 2009/04/28 11:43:05 UTC

Re: Update DropDownChoice with ModalWindow

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-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@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-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Update DropDownChoice with ModalWindow

Posted by Geeta Madhavi <ma...@gmail.com>.
Hi,

Please go through this link you will find the source code.This is pretty
help ful for drop down.

http://www.wicket-library.com/wicket-examples/ajax/choice.0


On Wed, Apr 29, 2009 at 11:18 AM, PDiefent <pd...@csc.com> wrote:

>
> Hi Vladimir,
> for the solution, look at
> http://www.nabble.com/Update-DropDownChoice-td22944165.html
> Peter
>
> Vladimir K wrote:
> >
> > 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.
> >
>
> --
> View this message in context:
> http://www.nabble.com/Update-DropDownChoice-with-ModalWindow-tp22595072p23290916.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>


-- 
Regards.
Geeta Madhavi. K

Re: Update DropDownChoice with ModalWindow

Posted by PDiefent <pd...@csc.com>.
Hi Vladimir,
for the solution, look at
http://www.nabble.com/Update-DropDownChoice-td22944165.html
Peter

Vladimir K wrote:
> 
> 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.
> 

-- 
View this message in context: http://www.nabble.com/Update-DropDownChoice-with-ModalWindow-tp22595072p23290916.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Update DropDownChoice with ModalWindow

Posted by Vladimir K <ko...@gmail.com>.
The problem is duscussed here 
http://www.nabble.com/Form-values-lost-in-combination-of-Forms-plus-ModalWindow-td19401595.html#a19401595
http://www.nabble.com/Form-values-lost-in-combination-of-Forms-plus-ModalWindow-td19401595.html#a19401595 


Vladimir K wrote:
> 
> PDiefent,
> 
> I've came across similar problem. In my case, and what I'm discovered fits
> your case as well, the following is happening:
> ...
> 

-- 
View this message in context: http://www.nabble.com/Update-DropDownChoice-with-ModalWindow-tp22595072p23274193.html
Sent from the Wicket - User mailing list archive at Nabble.com.