src/main/java/org/efaps/ui/wicket/components/footer/AjaxSubmitCloseButton.java
@Override
    public void onRequest(final AjaxRequestTarget _target)
    {
        AjaxSubmitCloseButton.LOG.trace("entering onSubmit");
        final String[] oids = ParameterUtil.parameter2Array(getRequest().getRequestParameters(), "selectedRow");
        final Map<String, String[]> others = new HashMap<>();
        others.put("selectedRow", oids);

        final ICmdUIObject cmdUIObject = (ICmdUIObject) getDefaultModelObject();
        final List<Classification> classifications = new ArrayList<>();
        try {
            if (cmdUIObject instanceof UIForm) {
                final UIForm uiform = (UIForm) cmdUIObject;
                others.putAll(uiform.getNewValues());
                // if the form contains classifications, they are added to a list and passed on to the esjp
                if (uiform.isClassified()) {
                    for (final Element element : uiform.getElements()) {
                        if (element.getType().equals(ElementType.SUBFORM)) {
                            final UIFieldForm uifieldform = (UIFieldForm) element.getElement();
                            classifications.add((Classification) Type.get(uifieldform.getClassificationUUID()));
                        }
                    }
                }
            }
            if (convertDateFieldValues(_target) && convertFieldValues(_target)
                            && checkForRequired(_target) && validateFieldValues(_target)
                            && validateForm(_target, others, classifications)) {
                if (executeEvents(_target, others, classifications)) {
                    // to be able to see the changes the context must be commited and reopened
                    ((EFapsSession) Session.get()).saveContext();

                    if (cmdUIObject.getCommand().getTargetCommand() != null) {
                        final AbstractCommand targetCmd = cmdUIObject.getCommand().getTargetCommand();
                        final AbstractUIPageObject newUIObject;
                        final PagePosition pp = cmdUIObject instanceof IPageObject
                                        ? ((IPageObject) cmdUIObject).getPagePosition() : PagePosition.CONTENT;
                        if (targetCmd.getTargetTable() != null) {
                            newUIObject = new UITable(cmdUIObject.getCommand().getTargetCommand().getUUID(),
                                            cmdUIObject.getInstance() == null ? null
                                                            : cmdUIObject.getInstance().getOid())
                                            .setPagePosition(pp);
                        } else {
                            newUIObject = new UIForm(cmdUIObject.getCommand().getTargetCommand().getUUID(),
                                            cmdUIObject.getInstance() == null ? null
                                                            : cmdUIObject.getInstance().getOid())
                                            .setPagePosition(pp);
                        }
                        final UIWizardObject wizard = new UIWizardObject((IWizardElement) newUIObject);
                        wizard.addParameters((IWizardElement) cmdUIObject, Context.getThreadContext().getParameters());
                        wizard.insertBefore((IWizardElement) cmdUIObject);
                        newUIObject.setWizard(wizard);
                        newUIObject.setPartOfWizardCall(true);
                        newUIObject.setRenderRevise(cmdUIObject.getCommand().isTargetCmdRevise());
                        if (cmdUIObject.getCommand().isSubmit()) {
                            newUIObject.setSubmit(true);
                            //newUIObject.setCallingCommandUUID(this.uiObject.getCallingCommandUUID());
                        }
                        final FooterPanel footer = findParent(FooterPanel.class);
                        final ModalWindowContainer modal = footer.getModalWindow();
                        final AbstractContentPage page;
                        if (targetCmd.getTargetTable() != null) {
                            page = new TablePage(Model.of((UITable) newUIObject), modal);
                        } else {
                            page = new FormPage(Model.of((UIForm) newUIObject), modal);
                        }
                        if (cmdUIObject.getCommand().isTargetShowFile()) {
                            page.getDownloadBehavior().initiate();
                        }
                        getRequestCycle().setResponsePage(page);
                    } else {
                        final FooterPanel footer = findParent(FooterPanel.class);
                        // if inside a modal

                        switch (((IPageObject) getPage().getDefaultModelObject()).getPagePosition()) {
                            case PICKER:
                            case CONTENTMODAL:
                            case TREEMODAL:
                                footer.getModalWindow().setReloadChild(!cmdUIObject.getCommand().isNoUpdateAfterCmd());
                                footer.getModalWindow().setTargetShowFile(cmdUIObject.getCommand().isTargetShowFile());
                                footer.getModalWindow().close(_target, cmdUIObject);
                                break;
                            default:
                                break;
                        }
                        footer.setSuccess(true);
                    }
                }
            }
        } catch (final EFapsException e) {
            final ModalWindowContainer modal = ((AbstractContentPage) getPage()).getModal();
            modal.setPageCreator(new ModalWindow.PageCreator() {

                private static final long serialVersionUID = 1L;

                @Override
                public Page createPage()
                {
                    return new ErrorPage(e);
                }
            });
            modal.show(_target);
        }
    }
@Override
    public void onRequest(final AjaxRequestTarget _target)
    {
        AjaxSubmitCloseButton.LOG.trace("entering onSubmit");
        final String[] oids = ParameterUtil.parameter2Array(getRequest().getRequestParameters(), "selectedRow");
        final Map<String, String[]> others = new HashMap<>();
        others.put("selectedRow", oids);

        final ICmdUIObject cmdUIObject = (ICmdUIObject) getDefaultModelObject();
        final List<Classification> classifications = new ArrayList<>();
        try {
            if (cmdUIObject instanceof UIForm) {
                final UIForm uiform = (UIForm) cmdUIObject;
                others.putAll(uiform.getNewValues());
                // if the form contains classifications, they are added to a list and passed on to the esjp
                if (uiform.isClassified()) {
                    for (final Element element : uiform.getElements()) {
                        if (element.getType().equals(ElementType.SUBFORM)) {
                            final UIFieldForm uifieldform = (UIFieldForm) element.getElement();
                            classifications.add((Classification) Type.get(uifieldform.getClassificationUUID()));
                        }
                    }
                }
            }
            if (convertDateFieldValues(_target) && convertFieldValues(_target)
                            && checkForRequired(_target) && validateFieldValues(_target)
                            && validateForm(_target, others, classifications)) {
                if (executeEvents(_target, others, classifications)) {
                    // to be able to see the changes the context must be commited and reopened
                    ((EFapsSession) Session.get()).saveContext();

                    if (cmdUIObject.getCommand().getTargetCommand() != null) {
                        final AbstractCommand targetCmd = cmdUIObject.getCommand().getTargetCommand();
                        final AbstractUIPageObject newUIObject;
                        final PagePosition pp = cmdUIObject instanceof IPageObject
                                        ? ((IPageObject) cmdUIObject).getPagePosition() : PagePosition.CONTENT;
                        if (targetCmd.getTargetTable() != null) {
                            newUIObject = new UITable(cmdUIObject.getCommand().getTargetCommand().getUUID(),
                                            cmdUIObject.getInstance() == null ? null
                                                            : cmdUIObject.getInstance().getOid())
                                            .setPagePosition(pp);
                        } else {
                            newUIObject = new UIForm(cmdUIObject.getCommand().getTargetCommand().getUUID(),
                                            cmdUIObject.getInstance() == null ? null
                                                            : cmdUIObject.getInstance().getOid())
                                            .setPagePosition(pp);
                        }
                        final UIWizardObject wizard = new UIWizardObject((IWizardElement) newUIObject);
                        wizard.addParameters((IWizardElement) cmdUIObject, Context.getThreadContext().getParameters());
                        wizard.insertBefore((IWizardElement) cmdUIObject);
                        newUIObject.setWizard(wizard);
                        newUIObject.setPartOfWizardCall(true);
                        newUIObject.setRenderRevise(cmdUIObject.getCommand().isTargetCmdRevise());
                        if (cmdUIObject.getCommand().isSubmit()) {
                            newUIObject.setSubmit(true);
                            //newUIObject.setCallingCommandUUID(this.uiObject.getCallingCommandUUID());
                        }
                        final FooterPanel footer = findParent(FooterPanel.class);
                        final ModalWindowContainer modal = footer.getModalWindow();
                        final AbstractContentPage page;
                        if (targetCmd.getTargetTable() != null) {
                            page = new TablePage(Model.of((UITable) newUIObject), modal);
                        } else {
                            page = new FormPage(Model.of((UIForm) newUIObject), modal);
                        }
                        if (cmdUIObject.getCommand().isTargetShowFile()) {
                            page.getDownloadBehavior().initiate();
                        }
                        getRequestCycle().setResponsePage(page);
                    } else {
                        final FooterPanel footer = findParent(FooterPanel.class);
                        // if inside a modal

                        switch (((IPageObject) getPage().getDefaultModelObject()).getPagePosition()) {
                            case PICKER:
                            case CONTENTMODAL:
                            case TREEMODAL:
                                footer.getModalWindow().setReloadChild(!cmdUIObject.getCommand().isNoUpdateAfterCmd());
                                footer.getModalWindow().setTargetShowFile(cmdUIObject.getCommand().isTargetShowFile());
                                footer.getModalWindow().close(_target, cmdUIObject);
                                break;
                            default:
                                break;
                        }
                        footer.setSuccess(true);
                    }
                }
            }
        } catch (final EFapsException e) {
            final ModalWindowContainer modal = ((AbstractContentPage) getPage()).getModal();
            modal.setPageCreator(new ModalWindow.PageCreator() {

                private static final long serialVersionUID = 1L;

                @Override
                public Page createPage()
                {
                    return new ErrorPage(e);
                }
            });
            modal.show(_target);
        }
    }
On submit the action must be done.

@param _target AjaxRequestTarget