How to make Wicket Jquery ui dialog as reponsive???

24 views
Skip to first unread message

sujit kirve

unread,
Feb 4, 2015, 3:33:38 AM2/4/15
to wicket-j...@googlegroups.com
Hi

I have used the  Wicket Jquery ui dialog in one of my project web site, which works very well, but  now I have to make that web site as a responsive....

I have used Bootstrap to add responsive functionality but can not apply same  on Jquery  dialog  as the structure & CSS classes are different on it.

I would like to know,  is there any way or configuration available in Jquery Dialog to make it as responsive???

Your Help is Appreciated  !!! 

Sebastien

unread,
Feb 4, 2015, 4:02:34 AM2/4/15
to wicket-j...@googlegroups.com
Hi Sujit

Actually this is more a jQuery UI question than a Wicket jQuery UI one...

It seems to not be shipped out of the box, but if I had to do this, I would go for this add-on:
The way you can use it:

public MyDialog(String id /*, ... */)
{
    super(/* ... */);
   
    this.add(new ResponsiveDialogBehavior());
}

static class ResponsiveDialogBehavior extends Behavior
{
    public ResponsiveDialogBehavior()
    {
    }
   
    @Override
    public void renderHead(Component component, IHeaderResponse response)
    {
        super.renderHead(component, response);
       
        JavaScriptResourceReference reference = new JQueryPluginResourceReference(MyDialog.class, "jquery.dialogOptions.js");
        HeaderItem headerItem = JavaScriptHeaderItem.forReference(reference);
       
        response.render(new PriorityHeaderItem(headerItem));
    }
}


Hope this helps,
Sebastien.

Reply all
Reply to author
Forward
0 new messages