src/main/java/org/efaps/ui/wicket/components/modalwindow/ModalWindowAjaxPageCreator.java
@Override
    public Page createPage()
    {
        Page ret = null;
        try {
            final String instKey = this.uiObject.getInstance() == null ? null : this.uiObject.getInstance().getKey();

            if (this.uiObject.getCommand().getTargetTable() == null) {
                final UIForm uiform = new UIForm(this.uiObject.getCommand().getUUID(), instKey)
                                .setPagePosition(this.pagePosition);
                uiform.setPicker(this.uiObject);
                if (!uiform.isInitialized()) {
                    uiform.execute();
                }
                if (uiform.getElements().isEmpty()) {
                    ret = new DialogPage(this.modalWindow.getPage().getPageReference(),
                                    uiform.getCommand().getName() + ".InvalidInstance", false, false);
                } else {
                    if (this.uiObject.getCommand().isSubmit()) {
                        final IRequestParameters parameters = RequestCycle.get().getRequest().getRequestParameters();
                        uiform.setSelected(parameters.getParameterValues("selectedRow"));
                    }
                    ret = new FormPage(Model.of(uiform), this.modalWindow, this.modalWindow.getPage()
                                    .getPageReference());
                }
            } else {
                if (this.uiObject.getCommand().getTargetStructurBrowserField() == null) {
                    final UITable uitable = new UITable(this.uiObject.getCommand().getUUID(), instKey)
                                    .setPagePosition(this.pagePosition);
                    uitable.setPicker(this.uiObject);
                    ret = new TablePage(Model.of(uitable), this.modalWindow, this.modalWindow.getPage()
                                    .getPageReference());
                } else {
                    final UIStructurBrowser uiPageObject = new UIStructurBrowser(this.uiObject.getCommand().getUUID(),
                                    instKey);
                    uiPageObject.setPicker(this.uiObject);
                    ret = new StructurBrowserPage(Model.of(uiPageObject), this.modalWindow,
                                    this.modalWindow.getPage().getPageReference());
                }
            }
        } catch (final EFapsException e) {
            ret = new ErrorPage(e);
        }
        return ret;
    }
@Override
    public Page createPage()
    {
        Page ret = null;
        try {
            final String instKey = this.uiObject.getInstance() == null ? null : this.uiObject.getInstance().getKey();

            if (this.uiObject.getCommand().getTargetTable() == null) {
                final UIForm uiform = new UIForm(this.uiObject.getCommand().getUUID(), instKey)
                                .setPagePosition(this.pagePosition);
                uiform.setPicker(this.uiObject);
                if (!uiform.isInitialized()) {
                    uiform.execute();
                }
                if (uiform.getElements().isEmpty()) {
                    ret = new DialogPage(this.modalWindow.getPage().getPageReference(),
                                    uiform.getCommand().getName() + ".InvalidInstance", false, false);
                } else {
                    if (this.uiObject.getCommand().isSubmit()) {
                        final IRequestParameters parameters = RequestCycle.get().getRequest().getRequestParameters();
                        uiform.setSelected(parameters.getParameterValues("selectedRow"));
                    }
                    ret = new FormPage(Model.of(uiform), this.modalWindow, this.modalWindow.getPage()
                                    .getPageReference());
                }
            } else {
                if (this.uiObject.getCommand().getTargetStructurBrowserField() == null) {
                    final UITable uitable = new UITable(this.uiObject.getCommand().getUUID(), instKey)
                                    .setPagePosition(this.pagePosition);
                    uitable.setPicker(this.uiObject);
                    ret = new TablePage(Model.of(uitable), this.modalWindow, this.modalWindow.getPage()
                                    .getPageReference());
                } else {
                    final UIStructurBrowser uiPageObject = new UIStructurBrowser(this.uiObject.getCommand().getUUID(),
                                    instKey);
                    uiPageObject.setPicker(this.uiObject);
                    ret = new StructurBrowserPage(Model.of(uiPageObject), this.modalWindow,
                                    this.modalWindow.getPage().getPageReference());
                }
            }
        } catch (final EFapsException e) {
            ret = new ErrorPage(e);
        }
        return ret;
    }
Method that creates the page.

@return new Page