syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ilgro...@apache.org
Subject [10/20] syncope git commit: [SYNCOPE-867] provides refresh for notification templates table
Date Wed, 08 Jun 2016 15:58:46 GMT
[SYNCOPE-867] provides refresh for notification templates table


Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/1389a937
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/1389a937
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/1389a937

Branch: refs/heads/SYNCOPE-862
Commit: 1389a93766e99f473704719b0e6c03353626fcb2
Parents: bee58ea
Author: fmartelli <fabio.martelli@gmail.com>
Authored: Mon Jun 6 12:38:04 2016 +0200
Committer: fmartelli <fabio.martelli@gmail.com>
Committed: Mon Jun 6 14:22:35 2016 +0200

----------------------------------------------------------------------
 .../notifications/MailTemplateDirectoryPanel.java       | 12 ++++++++++++
 .../client/console/notifications/TemplateModal.java     |  3 +--
 2 files changed, 13 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/1389a937/client/console/src/main/java/org/apache/syncope/client/console/notifications/MailTemplateDirectoryPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/notifications/MailTemplateDirectoryPanel.java
b/client/console/src/main/java/org/apache/syncope/client/console/notifications/MailTemplateDirectoryPanel.java
index 7882110..218ff3b 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/notifications/MailTemplateDirectoryPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/notifications/MailTemplateDirectoryPanel.java
@@ -54,6 +54,7 @@ import org.apache.wicket.model.IModel;
 import org.apache.wicket.model.ResourceModel;
 import org.apache.wicket.model.StringResourceModel;
 import org.apache.syncope.client.console.panels.WizardModalPanel;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
 
 public class MailTemplateDirectoryPanel
         extends DirectoryPanel<MailTemplateTO, MailTemplateTO, MailTemplateProvider, NotificationRestClient>
{
@@ -70,6 +71,17 @@ public class MailTemplateDirectoryPanel
         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);

http://git-wip-us.apache.org/repos/asf/syncope/blob/1389a937/client/console/src/main/java/org/apache/syncope/client/console/notifications/TemplateModal.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/notifications/TemplateModal.java
b/client/console/src/main/java/org/apache/syncope/client/console/notifications/TemplateModal.java
index fab2186..7b164e8 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/notifications/TemplateModal.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/notifications/TemplateModal.java
@@ -38,7 +38,7 @@ public class TemplateModal<T extends EntityTO, F> extends AbstractModalPanel<T>
 
     private final T templateTO;
 
-    private TemplateRestClient<T, F> restClient;
+    private final TemplateRestClient<T, F> restClient;
 
     public TemplateModal(
             final BaseModal<T> modal,
@@ -65,7 +65,6 @@ public class TemplateModal<T extends EntityTO, F> extends AbstractModalPanel<T>
         try {
             restClient.createTemplate(templateTO);
             SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));
-            modal.show(false);
             modal.close(target);
         } catch (SyncopeClientException e) {
             LOG.error("While creating template for {}", templateTO.getKey(), e);


Mime
View raw message