protected UserDirectoryPanel(final String id, final Builder builder, final boolean wizardInModal) { super(id, builder, wizardInModal); altDefaultModal.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() { private static final long serialVersionUID = 8804221891699487139L; @Override public void onClose(final AjaxRequestTarget target) { updateResultTable(target); modal.show(false); } }); }
/** * Set a WindowClosedCallback for a Modal instance. * * @param modal window * @param container container */ public void setWindowClosedCallback(final BaseModal<?> modal, final WebMarkupContainer container) { modal.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() { private static final long serialVersionUID = 8804221891699487139L; @Override public void onClose(final AjaxRequestTarget target) { if (container != null) { target.add(container); } } }); } }
/** * Set window close callback for the given modal. * * @param modal target modal. */ protected void setWindowClosedReloadCallback(final BaseModal<?> modal) { modal.setWindowClosedCallback(target -> { modal.show(false); }); }
@Override protected void setWindowClosedReloadCallback(final BaseModal<?> modal) { modal.setWindowClosedCallback(target -> { target.add(SchemaTypePanel.this); modal.show(false); }); }
@Override protected void setWindowClosedReloadCallback(final BaseModal<?> modal) { modal.setWindowClosedCallback(target -> { if (modal.getContent() instanceof ResultPage) { Serializable result = ResultPage.class.cast(modal.getContent()).getResult(); try { restClient.set(MAPPER.readValue(result.toString(), SCIMConf.class)); SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED)); modal.show(false); target.add(content); } catch (Exception e) { LOG.error("While setting SCIM configuration", e); SyncopeConsoleSession.get().error(StringUtils.isBlank(e.getMessage()) ? e.getClass().getName() : e.getMessage()); } ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target); } }); } });
modal.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() {
@Override protected void setWindowClosedReloadCallback(final BaseModal<?> modal) { modal.setWindowClosedCallback(target -> { if (modal.getContent() instanceof ResultPage) { Serializable result = ResultPage.class.cast(modal.getContent()).getResult(); RealmTO newRealmTO = RealmTO.class.cast(ProvisioningResult.class.cast(result).getEntity()); // reload realmChoicePanel label too - SYNCOPE-1151 target.add(realmChoicePanel.reloadRealmTree(target, Model.of(newRealmTO))); realmChoicePanel.setCurrentRealm(newRealmTO); send(Realms.this, Broadcast.DEPTH, new ChosenRealm<>(newRealmTO, target)); } else { target.add(realmChoicePanel.reloadRealmTree(target)); } target.add(content); modal.show(false); }); }
public void toggleWithContent( final AjaxRequestTarget target, final ActionsPanel<T> actionsPanel, final T modelObject) { updateHeader(target, modelObject); modal.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() { private static final long serialVersionUID = 8804221891699487139L; @Override public void onClose(final AjaxRequestTarget target) { modal.show(false); } }); final Fragment frag = new Fragment("actions", "actionsFragment", this); frag.setOutputMarkupId(true); frag.add(actionsPanel); container.addOrReplace(frag); target.add(this.container); toggle(target, modelObject, true); }
setOutputMarkupId(true); add(modal); modal.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() { detailModal.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() { reportModal.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() {
content.add(templateModal); modal.setWindowClosedCallback(new WindowClosedCallback() { templateModal.setWindowClosedCallback(new WindowClosedCallback() {
public PolicyDirectoryPanel(final String id, final PolicyType policyType, final PageReference pageRef) { super(id, pageRef, true); this.type = policyType; this.restClient = new PolicyRestClient(); ruleCompositionModal.size(Modal.Size.Large); setWindowClosedReloadCallback(ruleCompositionModal); addOuterObject(ruleCompositionModal); policySpecModal.size(Modal.Size.Large); policySpecModal.addSubmitButton(); setWindowClosedReloadCallback(policySpecModal); addOuterObject(policySpecModal); modal.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() { private static final long serialVersionUID = 8804221891699487129L; @Override public void onClose(final AjaxRequestTarget target) { updateResultTable(target); modal.show(false); } }); setFooterVisibility(true); modal.addSubmitButton(); modal.size(Modal.Size.Large); disableCheckBoxes(); }
modal.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() {
disableCheckBoxes(); modalDetails.setWindowClosedCallback(new WindowClosedCallback() {
modal.addSubmitButton(); setFooterVisibility(true); modal.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() {
modal.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() {
public MailTemplateDirectoryPanel(final String id, final PageReference pageReference) { super(id, pageReference, true); disableCheckBoxes(); modal.size(Modal.Size.Small); modal.addSubmitButton(); setFooterVisibility(true); modal.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() { private static final long serialVersionUID = 8804221891699487139L; @Override public void onClose(final AjaxRequestTarget target) { updateResultTable(target); modal.show(false); } }); addOuterObject(utilityModal); setWindowClosedReloadCallback(utilityModal); utilityModal.size(Modal.Size.Large); utilityModal.addSubmitButton(); restClient = new NotificationRestClient(); addNewItemPanelBuilder(new AbstractModalPanelBuilder<MailTemplateTO>(new MailTemplateTO(), pageRef) { private static final long serialVersionUID = 1995192603527154740L; @Override public WizardModalPanel<MailTemplateTO> build( final String id, final int index, final AjaxWizard.Mode mode) { return new TemplateModal<>(modal, restClient, new MailTemplateTO(), pageReference); } }, true); initResultTable(); MetaDataRoleAuthorizationStrategy.authorize(addAjaxLink, RENDER, StandardEntitlement.MAIL_TEMPLATE_CREATE); }
public ReportTemplateDirectoryPanel(final String id, final PageReference pageReference) { super(id, pageReference, true); disableCheckBoxes(); modal.size(Modal.Size.Small); modal.addSubmitButton(); setFooterVisibility(true); modal.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() { private static final long serialVersionUID = 8804221891699487139L; @Override public void onClose(final AjaxRequestTarget target) { updateResultTable(target); modal.show(false); } }); addOuterObject(utilityModal); setWindowClosedReloadCallback(utilityModal); utilityModal.size(Modal.Size.Large); utilityModal.addSubmitButton(); restClient = new ReportRestClient(); addNewItemPanelBuilder(new AbstractModalPanelBuilder<ReportTemplateTO>(new ReportTemplateTO(), pageRef) { private static final long serialVersionUID = 1995192603527154740L; @Override public WizardModalPanel<ReportTemplateTO> build( final String id, final int index, final AjaxWizard.Mode mode) { return new TemplateModal<>(modal, restClient, new ReportTemplateTO(), pageReference); } }, true); initResultTable(); MetaDataRoleAuthorizationStrategy.authorize(addAjaxLink, RENDER, StandardEntitlement.MAIL_TEMPLATE_CREATE); }
modal.addSubmitButton(); setFooterVisibility(true); modal.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() {
public void toggleWithContent(final AjaxRequestTarget target, final TopologyNode node) { setHeader(target, node.getDisplayName()); modal.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() {
setWindowClosedReloadCallback(displayAttributeModal); displayAttributeModal.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() {