You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by "Reiche, Andreas" <An...@lgln.niedersachsen.de> on 2017/10/18 09:12:46 UTC

Wicket jqueryui DropDownChoice not working in AbstractFormDialog

Hi,
i have a problem with the wicket-jquery-ui DropDownChoice component when inherited in a dialog.
The DDC is not working in that case, whereas the wicket ddc works as expected.
I'm not a jquery expert, so I add a quickstart which reproduces the issue. (wicket and wicket-jquery-ui 6.28.0)
Any idea?

Greetings,
Andreas Reiche


Re: Wicket jqueryui DropDownChoice not working in AbstractFormDialog

Posted by Sebastien <se...@gmail.com>.
Hi, I cannot test the quickstart right now. By not working, do you mean it
is a display issue, or a behavioral issue? In the firstcase, it is likely a
css issue (please checkout the wicket-jquery-ui forum, I'm pretty sure the
question was raised in there before...)

Re: Wicket jqueryui DropDownChoice not working in AbstractFormDialog

Posted by Sebastien <se...@gmail.com>.
That's basically a css issue (which can also be solved by calling
#selectmenu() on dialog#open AFAIS)
I tried several css trick but so far I can get it work only once, with this
rule in HomePage$Dialog.html for instance:

    .ui-selectmenu-open {
        z-index: 999;
    }


You can google this to continue investigating : "jquery ui selectmenu
dialog not working" (seems to be a common issue)
Please keep me up to date. I will try to continue investigating later this
week...

Good luck,
Sebastien.


On Wed, Oct 18, 2017 at 1:46 PM, Reiche, Andreas <
Andreas.Reiche@lgln.niedersachsen.de> wrote:

> Not working means the DropDown is rendered but if you click on it the
> options are not shown.
> Btw. The same DDC works when it's placed outside of dialog.
> All together in the Quickstart.
>
> Andreas Reiche
>
>
>
> > -----Ursprüngliche Nachricht-----
> > Von: Sebastien [mailto:sebfz1@gmail.com]
> > Gesendet: Mittwoch, 18. Oktober 2017 11:21
> > An: users@wicket.apache.org
> > Betreff: Re: Wicket jqueryui DropDownChoice not working in
> AbstractFormDialog
> >
> > Hi, I cannot test the quickstart right now. By not working, do you mean
> it
> > is a display issue, or a behavioral issue? In the firstcase, it is
> likely a
> > css issue (please checkout the wicket-jquery-ui forum, I'm pretty sure
> the
> > question was raised in there before...)
>

Re: Wicket jqueryui DropDownChoice not working in AbstractFormDialog

Posted by Sebastien <se...@gmail.com>.
Perfect workaround ! :)

Could also be written this way:
behavior.setOption("appendTo",
Options.asString(JQueryWidget.getSelector(myDialog)));

The #setAppendTo(Component) is a nice idea! I've added an issue so I do not
forget:
https://github.com/sebfz1/wicket-jquery-ui/issues/278

Thanks & best regards,
Sebastien.

AW: Wicket jqueryui DropDownChoice not working in AbstractFormDialog

Posted by "Reiche, Andreas" <An...@lgln.niedersachsen.de>.
Ok, i got it. I didn't realized that it is a jqueryui problem. Thought about your integration.
Found the following ticket in jqueryui issue list:
https://bugs.jqueryui.com/ticket/10646

Found the following workaround for my case:
I override the onConfigure() of ddc and add the appendTo option to the initialization of the .selectmenu() method. 

super.onConfigure(behavior);
behavior.setOption("appendTo", "\"#" + selector + "\"");

where selector is the markupId of the dialog.
It now works correct.

Maybe there is a possibility to add a method to the ddc, something like setAppendTo(Component component) or something similar, or more generally have an DDC Options class (similar to DatePicker Widget.)

So, many thanks Sebastien, for putting me in the right direction.

Andreas Reiche


> -----Ursprüngliche Nachricht-----
> Von: Sebastien [mailto:sebfz1@gmail.com]
> Gesendet: Mittwoch, 18. Oktober 2017 14:57
> An: users@wicket.apache.org
> Betreff: Re: Wicket jqueryui DropDownChoice not working in AbstractFormDialog
> 
> That's basically a css issue (which can also be solved by calling
> #selectmenu() on dialog#open AFAIS)
> I tried several css trick but so far I can get it work only once, with this
> rule in HomePage$Dialog.html for instance:
> 
>     .ui-selectmenu-open {
>         z-index: 999;
>     }
> 
> 
> You can google this to continue investigating : "jquery ui selectmenu
> dialog not working" (seems to be a common issue)
> Please keep me up to date. I will try to continue investigating later this
> week...
> 
> Good luck,
> Sebastien.
> 
> 
> On Wed, Oct 18, 2017 at 1:46 PM, Reiche, Andreas <
> Andreas.Reiche@lgln.niedersachsen.de> wrote:
> 
> > Not working means the DropDown is rendered but if you click on it the
> > options are not shown.
> > Btw. The same DDC works when it's placed outside of dialog.
> > All together in the Quickstart.
> >
> > Andreas Reiche
> >
> >
> >
> > > -----Ursprüngliche Nachricht-----
> > > Von: Sebastien [mailto:sebfz1@gmail.com]
> > > Gesendet: Mittwoch, 18. Oktober 2017 11:21
> > > An: users@wicket.apache.org
> > > Betreff: Re: Wicket jqueryui DropDownChoice not working in
> > AbstractFormDialog
> > >
> > > Hi, I cannot test the quickstart right now. By not working, do you mean
> > it
> > > is a display issue, or a behavioral issue? In the firstcase, it is
> > likely a
> > > css issue (please checkout the wicket-jquery-ui forum, I'm pretty sure
> > the
> > > question was raised in there before...)
> >

AW: Wicket jqueryui DropDownChoice not working in AbstractFormDialog

Posted by "Reiche, Andreas" <An...@lgln.niedersachsen.de>.
Not working means the DropDown is rendered but if you click on it the options are not shown.
Btw. The same DDC works when it's placed outside of dialog.
All together in the Quickstart.

Andreas Reiche



> -----Ursprüngliche Nachricht-----
> Von: Sebastien [mailto:sebfz1@gmail.com]
> Gesendet: Mittwoch, 18. Oktober 2017 11:21
> An: users@wicket.apache.org
> Betreff: Re: Wicket jqueryui DropDownChoice not working in AbstractFormDialog
> 
> Hi, I cannot test the quickstart right now. By not working, do you mean it
> is a display issue, or a behavioral issue? In the firstcase, it is likely a
> css issue (please checkout the wicket-jquery-ui forum, I'm pretty sure the
> question was raised in there before...)