dialog position

10 views
Skip to first unread message

Olivier Dutrieux

unread,
Nov 8, 2014, 4:00:01 PM11/8/14
to wicket-j...@googlegroups.com
Hello Seb,

What is the best solution to re-center the dialog (or set position) everytime I (re)open the dialog box.

I do that :

public void onOpen(AjaxRequestTarget target) {
        target
.appendJavaScript(
           
new JQueryUIBehavior(JQueryWidget.getSelector(this), "dialog").$(Options.asString("option"), Options.asString("position"), "{ my: 'center', at: 'center', of: window }")
       
);
}

It is the best way ?

I have a other question :  is there somes classes to manage the jQuery UI Position ?

Thx advance for your reply

Duto

Sebastien Briquet

unread,
Nov 16, 2014, 8:22:57 AM11/16/14
to wicket-j...@googlegroups.com
Hi Olivier,

Sorry, it seems that I didn't see your post earlier... Yes, but your solution absolutely makes sense!
There is a PositionBehavior (which is really simple) but it won't help in this case anyway...

Best regards,
Sebastien
Reply all
Reply to author
Forward
0 new messages