Example usage for org.apache.wicket.ajax AjaxEventBehavior AjaxEventBehavior

List of usage examples for org.apache.wicket.ajax AjaxEventBehavior AjaxEventBehavior

Introduction

In this page you can find the example usage for org.apache.wicket.ajax AjaxEventBehavior AjaxEventBehavior.

Prototype

public AjaxEventBehavior(String event) 

Source Link

Document

Construct.

Usage

From source file:org.apache.isis.viewer.wicket.ui.components.scalars.ScalarPanelAbstract2.java

License:Apache License

protected void addEditPropertyTo(final MarkupContainer scalarIfRegularFormGroup) {

    if (scalarModel.canEnterEditMode()
            && (scalarModel.getPromptStyle().isDialog() || !getInlinePromptConfig().isSupported())) {

        final WebMarkupContainer editProperty = new WebMarkupContainer(ID_EDIT_PROPERTY);
        editProperty.setOutputMarkupId(true);
        scalarIfRegularFormGroup.addOrReplace(editProperty);

        editProperty.add(new AjaxEventBehavior("click") {
            protected void onEvent(AjaxRequestTarget target) {

                final ActionPrompt prompt = ActionPromptProvider.Util.getFrom(ScalarPanelAbstract2.this)
                        .getActionPrompt();

                PropertyEditPromptHeaderPanel titlePanel = new PropertyEditPromptHeaderPanel(
                        prompt.getTitleId(), ScalarPanelAbstract2.this.scalarModel);

                final PropertyEditPanel propertyEditPanel = (PropertyEditPanel) getComponentFactoryRegistry()
                        .createComponent(ComponentType.PROPERTY_EDIT_PROMPT, prompt.getContentId(),
                                ScalarPanelAbstract2.this.scalarModel);

                propertyEditPanel.setShowHeader(false);

                prompt.setTitle(titlePanel, target);
                prompt.setPanel(propertyEditPanel, target);
                prompt.showPrompt(target);

            }/*from ww  w .  j a v a  2s .com*/
        });
    } else {
        Components.permanentlyHide(scalarIfRegularFormGroup, ID_EDIT_PROPERTY);
    }

}

From source file:org.apache.isis.viewer.wicket.ui.components.scalars.XEditableBehavior2.java

License:Apache License

protected AjaxEventBehavior newValidateListener() {
    return new AjaxEventBehavior("validate") {

        /**/*from  w ww.j  av  a 2 s  .co m*/
         * what's bound to "validate" event in Javascript, and sent to the server
         */
        @Override
        protected void updateAjaxAttributes(AjaxRequestAttributes attributes) {
            super.updateAjaxAttributes(attributes);
            attributes.getDynamicExtraParameters()
                    .add("return [{'name':'newValue', 'value': attrs.event.extraData.newValue}]");
        }

        /**
         * What's received at the server
         */
        @Override
        protected void onEvent(AjaxRequestTarget target) {
            StringValue newValue = RequestCycle.get().getRequest().getRequestParameters()
                    .getParameterValue("newValue");
            onValidate(target, newValue.toString());
        }

    };
}

From source file:org.apache.openmeetings.web.admin.configurations.ConfigsPanel.java

License:Apache License

public ConfigsPanel(String id) {
    super(id);//from www  .  ja v  a2 s .  c  om

    SearchableDataView<Configuration> dataView = new SearchableDataView<Configuration>("configList",
            new SearchableDataProvider<Configuration>(ConfigurationDao.class)) {
        private static final long serialVersionUID = 1L;

        @Override
        protected void populateItem(final Item<Configuration> item) {
            final Configuration c = item.getModelObject();
            item.add(new Label("id"));
            item.add(new Label("key"));
            item.add(new Label("value"));
            item.add(new AjaxEventBehavior("click") {
                private static final long serialVersionUID = 1L;

                @Override
                protected void onEvent(AjaxRequestTarget target) {
                    form.hideNewRecord();
                    form.setModelObject(c);
                    target.add(form, listContainer);
                    target.appendJavaScript("omConfigPanelInit();");
                }
            });
            item.add(AttributeModifier.replace("class", getRowClass(c.getId(), form.getModelObject().getId())));
        }
    };
    add(listContainer.add(dataView).setOutputMarkupId(true));
    PagedEntityListPanel navigator = new PagedEntityListPanel("navigator", dataView) {
        private static final long serialVersionUID = 1L;

        @Override
        protected void onEvent(AjaxRequestTarget target) {
            target.add(listContainer);
        }
    };
    DataViewContainer<Configuration> container = new DataViewContainer<Configuration>(listContainer, dataView,
            navigator);
    container.addLink(new OmOrderByBorder<Configuration>("orderById", "id", container))
            .addLink(new OmOrderByBorder<Configuration>("orderByKey", "key", container))
            .addLink(new OmOrderByBorder<Configuration>("orderByValue", "value", container));
    add(container.getLinks());
    add(navigator);

    form = new ConfigForm("form", listContainer, new Configuration());
    form.showNewRecord();
    add(form);

}

From source file:org.apache.openmeetings.web.admin.connection.ConnectionsPanel.java

License:Apache License

public ConnectionsPanel(String id) {
    super(id);//from   w w w. j  a  v  a2 s.  c  om

    SearchableDataProvider<Client> sdp = new SearchableDataProvider<Client>(null) {
        private static final long serialVersionUID = 1L;

        //FIXME add search

        @Override
        public Iterator<? extends Client> iterator(long first, long count) {
            //FIXME add grouping by public SID
            List<Client> l = new ArrayList<Client>(getBean(ISessionManager.class).getClientsWithServer());
            return l.subList((int) Math.max(0, first), (int) Math.min(first + count, l.size())).iterator();
        }

        @Override
        public long size() {
            return getBean(ISessionManager.class).getClients().size();
        }
    };
    final WebMarkupContainer container = new WebMarkupContainer("container");
    final WebMarkupContainer details = new WebMarkupContainer("details");
    SearchableDataView<Client> dataView = new SearchableDataView<Client>("clientList", sdp) {
        private static final long serialVersionUID = 1L;

        @Override
        protected void populateItem(final Item<Client> item) {
            Client c = item.getModelObject();
            item.add(new Label("streamid"));
            item.add(new Label("username"));
            item.add(new Label("connectedSince"));
            item.add(new Label("scope"));
            item.add(new Label("server", c.getServer() == null ? "no cluster" : c.getServer().getAddress())); //FIXME localization
            item.add(new ConfirmableAjaxBorder("kick", getString("603"), getString("605")) {
                private static final long serialVersionUID = 1L;

                @Override
                protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
                    Client c = item.getModelObject();
                    getBean(IUserService.class).kickUserByStreamId(getSid(), c.getStreamid(),
                            c.getServer() == null ? 0 : c.getServer().getId());
                    target.add(container, details.setVisible(false));
                }
            }.setEnabled(!c.isScreenClient()));
            item.add(new AjaxEventBehavior("click") {
                private static final long serialVersionUID = 1L;

                @Override
                protected void onEvent(AjaxRequestTarget target) {
                    Field[] ff = Client.class.getDeclaredFields();
                    RepeatingView lines = new RepeatingView("line");
                    Client c = item.getModelObject();
                    for (Field f : ff) {
                        int mod = f.getModifiers();
                        if (Modifier.isStatic(mod) || Modifier.isTransient(mod)) {
                            continue;
                        }
                        WebMarkupContainer line = new WebMarkupContainer(lines.newChildId());
                        line.add(new Label("name", f.getName()));
                        String val = "";
                        try {
                            f.setAccessible(true);
                            val = "" + f.get(c);
                        } catch (Exception e) {
                            //noop
                        }
                        line.add(new Label("value", val));
                        lines.add(line);
                    }
                    details.addOrReplace(lines);
                    target.add(details.setVisible(true));
                }
            });
            item.add(AttributeModifier.append("class", ROW_CLASS));
        }
    };
    add(container.add(dataView).setOutputMarkupId(true),
            details.setVisible(false).setOutputMarkupPlaceholderTag(true));

    SearchableDataProvider<org.apache.openmeetings.web.app.Client> sdpWeb = new SearchableDataProvider<org.apache.openmeetings.web.app.Client>(
            null) {
        private static final long serialVersionUID = 1L;

        @Override
        public Iterator<? extends org.apache.openmeetings.web.app.Client> iterator(long first, long count) {
            List<org.apache.openmeetings.web.app.Client> l = new ArrayList<org.apache.openmeetings.web.app.Client>(
                    Application.getClients());
            return l.subList((int) Math.max(0, first), (int) Math.min(first + count, l.size())).iterator();
        }

        @Override
        public long size() {
            return Application.getClientsSize();
        }
    };

    final WebMarkupContainer containerWeb = new WebMarkupContainer("containerWeb");
    SearchableDataView<org.apache.openmeetings.web.app.Client> dataViewWeb = new SearchableDataView<org.apache.openmeetings.web.app.Client>(
            "clientListWeb", sdpWeb) {
        private static final long serialVersionUID = 1L;

        @Override
        protected void populateItem(final Item<org.apache.openmeetings.web.app.Client> item) {
            org.apache.openmeetings.web.app.Client c = item.getModelObject();
            item.add(new Label("id", ""));
            User u = getBean(UserService.class).getUserById(getSid(), c.getUserId());
            item.add(new Label("login", u == null ? null : u.getLogin()));
            item.add(new Label("since", c.getConnectedSince()));
            item.add(new Label("scope", "html5"));
            item.add(new ConfirmableAjaxBorder("kick", getString("603"), getString("605")) {
                private static final long serialVersionUID = 1L;

                @Override
                protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
                    org.apache.openmeetings.web.app.Client c = item.getModelObject();
                    getBean(IUserService.class).kickUserBySessionId(getSid(), c.getUserId(), c.getSessionId());
                    target.add(containerWeb, details.setVisible(false));
                }
            }.setEnabled(!c.getSessionId().equals(WebSession.get().getId())));
            item.add(new AjaxEventBehavior("click") {
                private static final long serialVersionUID = 1L;

                @Override
                protected void onEvent(AjaxRequestTarget target) {
                    Field[] ff = org.apache.openmeetings.web.app.Client.class.getDeclaredFields();
                    RepeatingView lines = new RepeatingView("line");
                    org.apache.openmeetings.web.app.Client c = item.getModelObject();
                    for (Field f : ff) {
                        int mod = f.getModifiers();
                        if (Modifier.isStatic(mod) || Modifier.isTransient(mod)) {
                            continue;
                        }
                        WebMarkupContainer line = new WebMarkupContainer(lines.newChildId());
                        line.add(new Label("name", f.getName()));
                        String val = "";
                        try {
                            f.setAccessible(true);
                            val = "" + f.get(c);
                        } catch (Exception e) {
                        }
                        line.add(new Label("value", val));
                        lines.add(line);
                    }
                    details.addOrReplace(lines);
                    target.add(details.setVisible(true));
                }
            });
            item.add(AttributeModifier.append("class", ROW_CLASS));
        }
    };

    add(containerWeb.add(dataViewWeb).setOutputMarkupId(true),
            details.setVisible(false).setOutputMarkupPlaceholderTag(true));
    add(new PagedEntityListPanel("navigator", dataView) {
        private static final long serialVersionUID = 1L;

        @Override
        protected void onEvent(AjaxRequestTarget target) {
            target.add(container, containerWeb);
        }
    });
}

From source file:org.apache.openmeetings.web.admin.email.EmailPanel.java

License:Apache License

public EmailPanel(String id) {
    super(id);/* w ww.j  a va  2  s  .c  o m*/
    SearchableDataView<MailMessage> dataView = new SearchableDataView<MailMessage>("email",
            new SearchableDataProvider<MailMessage>(MailMessageDao.class)) {
        private static final long serialVersionUID = 1L;

        @Override
        protected void populateItem(Item<MailMessage> item) {
            final MailMessage m = item.getModelObject();
            item.add(new Label("id"));
            item.add(new Label("status", getString("admin.email.status." + m.getStatus().name())));
            item.add(new Label("subject"));
            //TODO color for Error
            item.add(new AjaxEventBehavior("click") {
                private static final long serialVersionUID = 1L;

                @Override
                protected void onEvent(AjaxRequestTarget target) {
                    form.setModelObject(m);
                    target.add(form, list);
                }
            });
            item.add(AttributeModifier.replace("class", getRowClass(m)));
        }
    };
    add(list.add(dataView).setOutputMarkupId(true));
    final PagedEntityListPanel navigator = new PagedEntityListPanel("navigator", dataView) {
        private static final long serialVersionUID = -1L;

        @Override
        protected void onEvent(AjaxRequestTarget target) {
            target.add(list);
        }
    };
    DataViewContainer<MailMessage> container = new DataViewContainer<MailMessage>(list, dataView, navigator);
    container.addLink(new OmOrderByBorder<MailMessage>("orderById", "id", container))
            .addLink(new OmOrderByBorder<MailMessage>("orderBySubject", "subject", container))
            .addLink(new OmOrderByBorder<MailMessage>("orderByStatus", "status", container));
    add(container.getLinks());
    add(navigator);

    form = new EmailForm("form", list, new MailMessage());
    add(form);
}

From source file:org.apache.openmeetings.web.admin.groups.GroupsPanel.java

License:Apache License

public GroupsPanel(String id) {
    super(id);//from   www . ja v  a 2 s  .  c  om
    final WebMarkupContainer listContainer = new WebMarkupContainer("listContainer");

    //Adding the Group Form
    form = new GroupForm("form", listContainer, new Group());
    add(form);

    //List view
    SearchableDataView<Group> dataView = new SearchableDataView<Group>("groupList",
            new SearchableDataProvider<Group>(GroupDao.class)) {
        private static final long serialVersionUID = 1L;

        @Override
        protected void populateItem(Item<Group> item) {
            final Group o = item.getModelObject();
            item.add(new Label("id"));
            item.add(new Label("name"));
            item.add(new AjaxEventBehavior("click") {
                private static final long serialVersionUID = 1L;

                @Override
                protected void onEvent(AjaxRequestTarget target) {
                    form.hideNewRecord();
                    form.setModelObject(o);
                    form.updateView(target);
                    target.add(listContainer);
                    target.appendJavaScript("groupsInit();");
                }
            });
            item.add(AttributeModifier.append("class", getRowClass(o.getId(), form.getModelObject().getId())));
        }
    };

    //Paging
    add(listContainer.add(dataView).setOutputMarkupId(true));
    PagedEntityListPanel navigator = new PagedEntityListPanel("navigator", dataView) {
        private static final long serialVersionUID = 1L;

        @Override
        protected void onEvent(AjaxRequestTarget target) {
            target.add(listContainer);
        }
    };
    DataViewContainer<Group> container = new DataViewContainer<Group>(listContainer, dataView, navigator);
    container.addLink(new OmOrderByBorder<Group>("orderById", "id", container))
            .addLink(new OmOrderByBorder<Group>("orderByName", "name", container));
    add(container.getLinks());
    add(navigator);
}

From source file:org.apache.openmeetings.web.admin.labels.LangPanel.java

License:Apache License

public LangPanel(String id) {
    super(id);/*from w w  w.j  a  v a 2 s  .com*/

    // Create feedback panels
    add(feedback.setOutputMarkupId(true));
    language = new AbstractMap.SimpleEntry<Long, Locale>(1L, Locale.ENGLISH);

    final LabelsForm form = new LabelsForm("form", this, new StringLabel(null, null));
    form.showNewRecord();
    add(form);

    final SearchableDataView<StringLabel> dataView = new SearchableDataView<StringLabel>("langList",
            new SearchableDataProvider<StringLabel>(LabelDao.class) {
                private static final long serialVersionUID = 1L;

                @Override
                protected LabelDao getDao() {
                    return (LabelDao) super.getDao();
                }

                @Override
                public long size() {
                    return getDao().count(language.getValue(), search);
                }

                @Override
                public Iterator<? extends StringLabel> iterator(long first, long count) {
                    return getDao().get(language.getValue(), search, (int) first, (int) count, getSort())
                            .iterator();
                }
            }) {
        private static final long serialVersionUID = 1L;

        @Override
        protected void populateItem(final Item<StringLabel> item) {
            final StringLabel fv = item.getModelObject();
            item.add(new Label("key"));
            item.add(new Label("value"));
            item.add(new AjaxEventBehavior("click") {
                private static final long serialVersionUID = 1L;

                @Override
                protected void onEvent(AjaxRequestTarget target) {
                    form.setModelObject(fv);
                    form.hideNewRecord();
                    target.add(form, listContainer);
                    target.appendJavaScript("labelsInit();");
                }
            });
            item.add(AttributeModifier.append("class", getRowClass(fv.getId(), form.getModelObject().getId())));
        }
    };

    add(listContainer.add(dataView).setOutputMarkupId(true));
    PagedEntityListPanel navigator = new PagedEntityListPanel("navigator", dataView) {
        private static final long serialVersionUID = 1L;

        @Override
        protected void onEvent(AjaxRequestTarget target) {
            dataView.modelChanging();
            target.add(listContainer);
        }
    };
    DataViewContainer<StringLabel> container = new DataViewContainer<StringLabel>(listContainer, dataView,
            navigator);
    container.addLink(new OmOrderByBorder<StringLabel>("orderByName", "key", container))
            .addLink(new OmOrderByBorder<StringLabel>("orderByValue", "value", container));
    add(container.getLinks());
    add(navigator);
    langForm = new LangForm("langForm", listContainer, this);
    fileUploadField = new FileUploadField("fileInput");
    langForm.add(fileUploadField);
    langForm.add(new UploadProgressBar("progress", langForm, fileUploadField));
    fileUploadField.add(new AjaxFormSubmitBehavior(langForm, "change") {
        private static final long serialVersionUID = 1L;

        @Override
        protected void onSubmit(AjaxRequestTarget target) {
            FileUpload download = fileUploadField.getFileUpload();
            try {
                if (download == null || download.getInputStream() == null) {
                    feedback.error("File is empty");
                    return;
                }
                LabelDao.upload(language.getValue(), download.getInputStream());
            } catch (Exception e) {
                log.error("Exception on panel language editor import ", e);
                feedback.error(e);
            }

            // repaint the feedback panel so that it is hidden
            target.add(listContainer, feedback);
        }
    });

    // Add a component to download a file without page refresh
    final AjaxDownload download = new AjaxDownload();
    langForm.add(download);

    langForm.add(new AjaxButton("export") {
        private static final long serialVersionUID = 1L;

        @Override
        protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
            final String name = LabelDao.getLabelFileName(language.getValue());
            download.setFileName(name);
            download.setResourceStream(new AbstractResourceStream() {
                private static final long serialVersionUID = 1L;
                private transient InputStream is;

                @Override
                public InputStream getInputStream() throws ResourceStreamNotFoundException {
                    try {
                        is = Application.class.getResourceAsStream(name);
                        return is;
                    } catch (Exception e) {
                        throw new ResourceStreamNotFoundException(e);
                    }
                }

                @Override
                public void close() throws IOException {
                    if (is != null) {
                        is.close();
                        is = null;
                    }
                }
            });
            download.initiate(target);

            // repaint the feedback panel so that it is hidden
            target.add(feedback);
        }

        @Override
        protected void onError(AjaxRequestTarget target, Form<?> form) {
            // repaint the feedback panel so errors are shown
            target.add(feedback);
        }

    });

    add(langForm);
    final AddLanguageDialog addLang = new AddLanguageDialog("addLang", this);
    add(addLang, new AjaxLink<Void>("addLangBtn") {
        private static final long serialVersionUID = 1L;

        @Override
        public void onClick(AjaxRequestTarget target) {
            addLang.open(target);
        }
    });
    add(BootstrapFileUploadBehavior.INSTANCE);
}

From source file:org.apache.openmeetings.web.admin.ldaps.LdapsPanel.java

License:Apache License

public LdapsPanel(String id) {
    super(id);//from  www. j  a va  2s  .com
    SearchableDataView<LdapConfig> dataView = new SearchableDataView<LdapConfig>("ldapList",
            new SearchableDataProvider<LdapConfig>(LdapConfigDao.class)) {
        private static final long serialVersionUID = 1L;

        @Override
        protected void populateItem(final Item<LdapConfig> item) {
            final LdapConfig lc = item.getModelObject();
            item.add(new Label("id"));
            item.add(new Label("name"));
            item.add(new Label("configFileName"));
            item.add(new AjaxEventBehavior("click") {
                private static final long serialVersionUID = 1L;

                @Override
                protected void onEvent(AjaxRequestTarget target) {
                    form.setModelObject(lc);
                    form.hideNewRecord();
                    target.add(form, listContainer);
                    target.appendJavaScript("omLdapPanelInit();");
                }
            });
            item.add(
                    AttributeModifier.replace("class", getRowClass(lc.getId(), form.getModelObject().getId())));
        }
    };
    add(listContainer.add(dataView).setOutputMarkupId(true));
    PagedEntityListPanel navigator = new PagedEntityListPanel("navigator", dataView) {
        private static final long serialVersionUID = 1L;

        @Override
        protected void onEvent(AjaxRequestTarget target) {
            target.add(listContainer);
        }
    };
    DataViewContainer<LdapConfig> container = new DataViewContainer<LdapConfig>(listContainer, dataView,
            navigator);
    container.addLink(new OmOrderByBorder<LdapConfig>("orderById", "id", container))
            .addLink(new OmOrderByBorder<LdapConfig>("orderByName", "name", container))
            .addLink(new OmOrderByBorder<LdapConfig>("orderByFile", "configFileName", container));
    add(container.getLinks());
    add(navigator);

    form = new LdapForm("form", listContainer, new LdapConfig());
    form.showNewRecord();
    add(form);

}

From source file:org.apache.openmeetings.web.admin.oauth.OAuthPanel.java

License:Apache License

public OAuthPanel(String id) {
    super(id);/* w ww  .  ja  va2s.c o m*/
    SearchableDataView<OAuthServer> dataView = new SearchableDataView<OAuthServer>("oauthServersList",
            new SearchableDataProvider<OAuthServer>(OAuth2Dao.class)) {
        private static final long serialVersionUID = 1L;

        @Override
        protected void populateItem(Item<OAuthServer> item) {
            final OAuthServer server = item.getModelObject();
            item.add(new Label("id"));
            item.add(new Label("name"));
            item.add(new AjaxEventBehavior("click") {
                private static final long serialVersionUID = 1L;

                @Override
                protected void onEvent(AjaxRequestTarget target) {
                    form.setModelObject(server);
                    form.hideNewRecord();
                    target.add(form, listContainer);
                    target.appendJavaScript("oauthPanelInit();");
                }
            });
            item.add(AttributeModifier.replace("class",
                    getRowClass(server.getId(), form.getModelObject().getId())));
        }

    };

    add(listContainer.add(dataView).setOutputMarkupId(true));
    PagedEntityListPanel navigator = new PagedEntityListPanel("navigator", dataView) {
        private static final long serialVersionUID = -1L;

        @Override
        protected void onEvent(AjaxRequestTarget target) {
            target.add(listContainer);
        }
    };
    DataViewContainer<OAuthServer> container = new DataViewContainer<OAuthServer>(listContainer, dataView,
            navigator);
    container.addLink(new OmOrderByBorder<OAuthServer>("orderById", "id", container))
            .addLink(new OmOrderByBorder<OAuthServer>("orderByName", "name", container));
    add(container.getLinks());
    add(navigator);

    form = new OAuthForm("form", listContainer, new OAuthServer());
    form.showNewRecord();
    add(form);
}

From source file:org.apache.openmeetings.web.admin.rooms.RoomsPanel.java

License:Apache License

public RoomsPanel(String id) {
    super(id);//from  w  w  w.  j  ava 2 s.  c  om
    SearchableDataView<Room> dataView = new SearchableDataView<Room>("roomList",
            new SearchableDataProvider<Room>(RoomDao.class)) {
        private static final long serialVersionUID = 1L;

        @Override
        protected void populateItem(final Item<Room> item) {
            Room room = item.getModelObject();
            final Long roomId = room.getId();
            item.add(new Label("id"));
            item.add(new Label("name"));
            item.add(new Label("ispublic"));
            item.add(new AjaxEventBehavior("click") {
                private static final long serialVersionUID = 1L;

                @Override
                protected void onEvent(AjaxRequestTarget target) {
                    form.hideNewRecord();
                    form.setModelObject(getBean(RoomDao.class).get(roomId));
                    form.updateView(target);
                    target.add(form, listContainer);
                    target.appendJavaScript("omRoomPanelInit();");
                }
            });
            item.add(AttributeModifier.replace("class",
                    getRowClass(room.getId(), form.getModelObject().getId())));
        }
    };

    add(listContainer.add(dataView).setOutputMarkupId(true));
    PagedEntityListPanel navigator = new PagedEntityListPanel("navigator", dataView) {
        private static final long serialVersionUID = -1L;

        @Override
        protected void onEvent(AjaxRequestTarget target) {
            target.add(listContainer);
        }
    };
    DataViewContainer<Room> container = new DataViewContainer<Room>(listContainer, dataView, navigator);
    container.addLink(new OmOrderByBorder<Room>("orderById", "id", container))
            .addLink(new OmOrderByBorder<Room>("orderByName", "name", container))
            .addLink(new OmOrderByBorder<Room>("orderByPublic", "ispublic", container));
    add(container.getLinks());
    add(navigator);

    add(form = new RoomForm("form", listContainer, new Room()));
}