add(new Button("blockScreenButton").add(JQBehaviors
.mouseClick($f(new IJQStatement[] { b.block().toStatement(),
js("setTimeout($.unblockUI, 2000)") }))));
add(new Button("blockScreenButton2").add(JQBehaviors.mouseClick(b
.block(new BlockUIOptions()
.message("Custom loading message...")))));
add(new Button("unblockScreenButton").add(JQBehaviors.mouseClick(b
.unblock())));
final WebMarkupContainer blockMe = new WebMarkupContainer("blockMe");
blockMe.setOutputMarkupId(true);
add(blockMe);
add(new Button("blockElementButton").add(JQBehaviors.mouseClick(b
.block(blockMe))));
add(new Button("blockElementButton2").add(JQBehaviors.mouseClick(b
.block(blockMe, new BlockUIOptions()
.message("Custom loading message...")))));
add(new Button("unblockElementButton").add(JQBehaviors.mouseClick(b
.unblock(blockMe))));
}