Skip to content
PMJMendes edited this page Dec 17, 2014 · 8 revisions

DrawerManager

The DrawerManager is a component that manages stacks of modal drawers that derive from AbstractDrawer.

You can see a demo here.

How to use

Using the DrawerManager is as simple as adding it to the page, then invoking its API:

<div wicket:id="drawermgr"></div>
public class MyPage extends WebPage implements IAjaxIndicatorAware {
    private DrawerManager manager;

    public MyPage() {
        manager = new DrawerManager("drawermgr");
    }

    @Override protected void onInitialize() {
        add(manager);

...

        myLabel.add(new AjaxEventBehavior("onclick") {
            private static final long serialVersionUID = 1L;
            @Override
            protected void onEvent(AjaxRequestTarget target) {
                final int id = item.getModelObject().getUserId();
                manager().push(new MyDrawer(), target);
            }
        });
    }
}
Clone this wiki locally