Repository: syncope
Updated Branches:
  refs/heads/master 4b991ec91 -> b34ff3f7e


[SYNCOPE-1078] changes into ActionPanel to support BookmarkablePageLink for 
ActionType.WORKFLOW_MODELER


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

Branch: refs/heads/master
Commit: b34ff3f7e52567eb5a8506e500ed38e8bd1592cb
Parents: 4b991ec
Author: fmartelli <fabio.marte...@gmail.com>
Authored: Tue May 9 14:59:39 2017 +0200
Committer: fmartelli <fabio.marte...@gmail.com>
Committed: Tue May 9 15:16:52 2017 +0200

----------------------------------------------------------------------
 .../syncope/client/console/SyncopeConsoleSession.java  |  1 -
 .../console/wicket/markup/html/form/ActionPanel.java   | 13 ++++++++++---
 2 files changed, 10 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/b34ff3f7/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleSession.java
----------------------------------------------------------------------
diff --git 
a/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleSession.java
 
b/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleSession.java
index 0ec23f1..2fbefe2 100644
--- 
a/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleSession.java
+++ 
b/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleSession.java
@@ -327,5 +327,4 @@ public class SyncopeConsoleSession extends 
AuthenticatedWebSession {
         Locale locale = getLocale() == null ? Locale.ENGLISH : getLocale();
         return FastDateFormat.getDateTimeInstance(DateFormat.SHORT, 
DateFormat.SHORT, locale);
     }
-
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/b34ff3f7/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/ActionPanel.java
----------------------------------------------------------------------
diff --git 
a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/ActionPanel.java
 
b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/ActionPanel.java
index fbe6a7e..b71b1d9 100644
--- 
a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/ActionPanel.java
+++ 
b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/ActionPanel.java
@@ -24,12 +24,14 @@ import java.io.Serializable;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.syncope.client.console.SyncopeConsoleSession;
 import 
org.apache.syncope.client.console.wicket.markup.html.form.ActionLink.ActionType;
+import 
org.apache.syncope.client.console.wicket.markup.html.link.VeilPopupSettings;
 import org.apache.wicket.AttributeModifier;
 import org.apache.wicket.ajax.AjaxRequestTarget;
-import org.apache.wicket.ajax.markup.html.AjaxLink;
 import 
org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy;
 import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxLink;
 import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.link.AbstractLink;
+import org.apache.wicket.markup.html.link.BookmarkablePageLink;
 import org.apache.wicket.markup.html.panel.Panel;
 import org.apache.wicket.model.IModel;
 import org.apache.wicket.model.ResourceModel;
@@ -65,7 +67,7 @@ public final class ActionPanel<T extends Serializable> 
extends Panel {
         }
 
         final boolean enabled;
-        final AjaxLink<Void> actionLink;
+        final AbstractLink actionLink;
 
         if (action.getLink() == null || action.getType() == 
ActionType.NOT_FOUND) {
             enabled = true;
@@ -82,6 +84,11 @@ public final class ActionPanel<T extends Serializable> 
extends Panel {
                 public void onClick(final AjaxRequestTarget target) {
                 }
             };
+        } else if (action.getType() == ActionType.WORKFLOW_MODELER) {
+            enabled = action.getLink().isEnabled(obj);
+            actionLink = new BookmarkablePageLink<>(
+                    "action", action.getLink().getPageClass(), 
action.getLink().getPageParameters()).
+                    setPopupSettings(new 
VeilPopupSettings().setHeight(600).setWidth(800));
         } else {
             enabled = action.getLink().isEnabled(obj);
 
@@ -123,7 +130,7 @@ public final class ActionPanel<T extends Serializable> 
extends Panel {
         } else {
             MetaDataRoleAuthorizationStrategy.unauthorizeAll(actionLink, 
RENDER);
         }
-        
+
         actionLink.setVisible(enabled);
 
         actionIcon = new Label("actionIcon", "");

Reply via email to