You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by fm...@apache.org on 2017/05/05 22:22:47 UTC
[01/10] syncope git commit: [SYNCOPE-1047] Replaces ActionLinksPanel
with TogglePanel
Repository: syncope
Updated Branches:
refs/heads/master 018fa9771 -> 2e7e2ceef
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/fit/core-reference/src/test/java/org/apache/syncope/fit/console/SecurityQuestionsITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/SecurityQuestionsITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/SecurityQuestionsITCase.java
index 9eabac7..664feeb 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/SecurityQuestionsITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/SecurityQuestionsITCase.java
@@ -18,11 +18,13 @@
*/
package org.apache.syncope.fit.console;
+import static org.apache.syncope.fit.console.AbstractConsoleITCase.TESTER;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import de.agilecoders.wicket.core.markup.html.bootstrap.dialog.Modal;
+import org.apache.syncope.client.console.commons.Constants;
import org.apache.syncope.client.console.pages.SecurityQuestions;
import org.apache.wicket.Component;
import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxLink;
@@ -46,8 +48,8 @@ public class SecurityQuestionsITCase extends AbstractConsoleITCase {
TESTER.assertComponent(
"body:content:securityQuestionPanel:outerObjectsRepeater:0:outer", Modal.class);
- FormTester formTester =
- TESTER.newFormTester("body:content:securityQuestionPanel:outerObjectsRepeater:0:outer:form");
+ FormTester formTester = TESTER.newFormTester(
+ "body:content:securityQuestionPanel:outerObjectsRepeater:0:outer:form");
formTester.setValue("content:securityQuestionDetailsPanel:container:form:content:textField",
name);
@@ -67,11 +69,13 @@ public class SecurityQuestionsITCase extends AbstractConsoleITCase {
+ "tablePanel:groupForm:checkgroup:dataTable:body:rows:1:cells:2:cell");
assertTrue(label.getDefaultModelObjectAsString().startsWith("What's your "));
+ TESTER.executeAjaxEvent("body:content:securityQuestionPanel:container:content:searchContainer:resultTable:"
+ + "tablePanel:groupForm:checkgroup:dataTable:body:rows:1", Constants.ON_CLICK);
+
TESTER.assertComponent(
- "body:content:securityQuestionPanel:container:content:"
- + "searchContainer:resultTable:tablePanel:"
- + "groupForm:checkgroup:dataTable:body:rows:"
- + "1:cells:3:cell:panelEdit:editLink", IndicatingAjaxLink.class);
+ "body:content:securityQuestionPanel:outerObjectsRepeater:1:outer:container:content:"
+ + "togglePanelContainer:container:actions:actions:actionRepeater:0:action:action",
+ IndicatingAjaxLink.class);
}
@Test
@@ -88,10 +92,12 @@ public class SecurityQuestionsITCase extends AbstractConsoleITCase {
assertNotNull(result);
- TESTER.clickLink(result.getPageRelativePath() + ":cells:3:cell:panelEdit:editLink");
+ TESTER.executeAjaxEvent(result.getPageRelativePath(), Constants.ON_CLICK);
+ TESTER.clickLink("body:content:securityQuestionPanel:outerObjectsRepeater:1:outer:container:content:"
+ + "togglePanelContainer:container:actions:actions:actionRepeater:0:action:action");
- FormTester formTester =
- TESTER.newFormTester("body:content:securityQuestionPanel:outerObjectsRepeater:0:outer:form");
+ FormTester formTester = TESTER.newFormTester(
+ "body:content:securityQuestionPanel:outerObjectsRepeater:0:outer:form");
formTester.setValue("content:securityQuestionDetailsPanel:container:form:content:textField",
"What's your preferred car?");
@@ -112,12 +118,14 @@ public class SecurityQuestionsITCase extends AbstractConsoleITCase {
name);
assertNotNull(result);
+ TESTER.executeAjaxEvent(result.getPageRelativePath(), Constants.ON_CLICK);
TESTER.getRequest().addParameter("confirm", "true");
- TESTER.clickLink(TESTER.getComponentFromLastRenderedPage(
- result.getPageRelativePath() + ":cells:3:cell:panelDelete:deleteLink"));
+ TESTER.clickLink("body:content:securityQuestionPanel:outerObjectsRepeater:1:outer:container:content:"
+ + "togglePanelContainer:container:actions:actions:actionRepeater:1:action:action");
TESTER.executeAjaxEvent(TESTER.getComponentFromLastRenderedPage(
- result.getPageRelativePath() + ":cells:3:cell:panelDelete:deleteLink"), "onclick");
+ "body:content:securityQuestionPanel:outerObjectsRepeater:1:outer:container:content:"
+ + "togglePanelContainer:container:actions:actions:actionRepeater:1:action:action"), "onclick");
TESTER.assertInfoMessages("Operation executed successfully");
TESTER.cleanupFeedbackMessages();
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/fit/core-reference/src/test/java/org/apache/syncope/fit/console/TopologyITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/TopologyITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/TopologyITCase.java
index 417cf5f..281873d 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/TopologyITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/TopologyITCase.java
@@ -145,7 +145,7 @@ public class TopologyITCase extends AbstractConsoleITCase {
// ------------------------------------------
TESTER.clickLink("body:toggle:outerObjectsRepeater:3:outer:form:content:provision:container:"
- + "content:group:beans:0:actions:panelMapping:mappingLink");
+ + "content:group:beans:0:actions:actionRepeater:0:action:action");
formTester = TESTER.newFormTester(
"body:toggle:outerObjectsRepeater:3:outer:form:content:provision:container:content:wizard:form");
@@ -251,7 +251,7 @@ public class TopologyITCase extends AbstractConsoleITCase {
TESTER.clickLink("body:toggle:container:content:togglePanelContainer:container:actions:provision");
TESTER.clickLink("body:toggle:outerObjectsRepeater:3:outer:form:content:provision:container:"
- + "content:group:beans:0:actions:panelMapping:mappingLink");
+ + "content:group:beans:0:actions:actionRepeater:0:action:action");
formTester = TESTER.newFormTester(
"body:toggle:outerObjectsRepeater:3:outer:form:content:provision:container:content:wizard:form");
@@ -262,7 +262,7 @@ public class TopologyITCase extends AbstractConsoleITCase {
TESTER.executeAjaxEvent("body:toggle:outerObjectsRepeater:3:outer:form:content:provision:container:"
+ "content:wizard:form:buttons:cancel", Constants.ON_CLICK);
-
+
TESTER.clickLink("body:toggle:outerObjectsRepeater:3:outer:dialog:footer:buttons:0:button");
TESTER.cleanupFeedbackMessages();
@@ -288,7 +288,10 @@ public class TopologyITCase extends AbstractConsoleITCase {
+ "firstLevelContainer:first:container:content:searchContainer:resultTable:tablePanel:groupForm:"
+ "checkgroup:dataTable", "TestDB Task");
- TESTER.clickLink(component.getPageRelativePath() + ":cells:10:cell:panelExecute:executeLink");
+ TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
+ TESTER.clickLink("body:toggle:outerObjectsRepeater:2:outer:form:content:tasks:firstLevelContainer:first:"
+ + "outerObjectsRepeater:1:outer:container:content:togglePanelContainer:container:"
+ + "actions:actions:actionRepeater:3:action:action");
TESTER.clickLink("body:toggle:outerObjectsRepeater:2:outer:form:content:tasks:firstLevelContainer:first:"
+ "container:content:startAt:container:content:togglePanelContainer:startAtForm:startAt");
@@ -298,7 +301,10 @@ public class TopologyITCase extends AbstractConsoleITCase {
+ "firstLevelContainer:first:container:content:searchContainer:resultTable:tablePanel:groupForm:"
+ "checkgroup:dataTable", "TestDB Task");
- TESTER.clickLink(component.getPageRelativePath() + ":cells:10:cell:panelView:viewLink");
+ TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
+ TESTER.clickLink("body:toggle:outerObjectsRepeater:2:outer:form:content:tasks:firstLevelContainer:first:"
+ + "outerObjectsRepeater:1:outer:container:content:togglePanelContainer:container:"
+ + "actions:actions:actionRepeater:0:action:action");
TESTER.assertLabel(
"body:toggle:outerObjectsRepeater:2:outer:form:content:tasks:secondLevelContainer:title",
@@ -307,11 +313,11 @@ public class TopologyITCase extends AbstractConsoleITCase {
int iteration = 0;
do {
try {
- TESTER.assertComponent(
+ component = findComponentByProp("status",
"body:toggle:outerObjectsRepeater:2:outer:form:content:tasks:secondLevelContainer:"
+ "second:executions:firstLevelContainer:first:container:content:searchContainer:resultTable:"
- + "tablePanel:groupForm:checkgroup:dataTable:body:rows:1:cells:6:cell:panelView:viewLink",
- AjaxLink.class);
+ + "tablePanel:groupForm:checkgroup:dataTable", "SUCCESS");
+ assertNotNull(component);
iteration = 10;
} catch (AssertionError e) {
try {
@@ -320,19 +326,24 @@ public class TopologyITCase extends AbstractConsoleITCase {
} catch (Exception ignore) {
}
- component = findComponentById(
- "body:toggle:outerObjectsRepeater:2:outer:form:content:tasks:secondLevelContainer:second:"
- + "executions:firstLevelContainer:first:container:content:searchContainer:resultTable:"
- + "tablePanel:groupForm:checkgroup:dataTable:topToolbars:toolbars:1:headers", "panelReload");
+ TESTER.executeAjaxEvent("body:toggle:outerObjectsRepeater:2:outer:form:content:tasks:"
+ + "secondLevelContainer:second:executions:firstLevelContainer:first:container:content:"
+ + "searchContainer:tablehandling:actionRepeater:0:action:action", Constants.ON_CLICK);
- TESTER.executeAjaxEvent(component.getPageRelativePath() + ":reloadLink", Constants.ON_CLICK);
iteration++;
}
} while (iteration < 10);
- TESTER.clickLink("body:toggle:outerObjectsRepeater:2:outer:form:content:tasks:secondLevelContainer:"
+ component = findComponentByProp("status",
+ "body:toggle:outerObjectsRepeater:2:outer:form:content:tasks:secondLevelContainer:"
+ "second:executions:firstLevelContainer:first:container:content:searchContainer:resultTable:"
- + "tablePanel:groupForm:checkgroup:dataTable:body:rows:1:cells:6:cell:panelView:viewLink");
+ + "tablePanel:groupForm:checkgroup:dataTable", "SUCCESS");
+ assertNotNull(component);
+
+ TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
+ TESTER.clickLink("body:toggle:outerObjectsRepeater:2:outer:form:content:tasks:secondLevelContainer:second:"
+ + "executions:firstLevelContainer:first:outerObjectsRepeater:1:outer:container:content:"
+ + "togglePanelContainer:container:actions:actions:actionRepeater:0:action:action");
TESTER.assertComponent("body:toggle:outerObjectsRepeater:2:outer:form:content:tasks:"
+ "secondLevelContainer:second:executions:secondLevelContainer:title", Label.class);
@@ -353,7 +364,11 @@ public class TopologyITCase extends AbstractConsoleITCase {
+ "firstLevelContainer:first:container:content:searchContainer:resultTable:tablePanel:groupForm:"
+ "checkgroup:dataTable", ResourceOperation.CREATE);
- TESTER.clickLink(component.getPageRelativePath() + ":cells:10:cell:panelExecute:executeLink");
+ assertNotNull(component);
+ TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
+ TESTER.clickLink("body:toggle:outerObjectsRepeater:1:outer:form:content:tasks:firstLevelContainer:first:"
+ + "outerObjectsRepeater:1:outer:container:content:togglePanelContainer:container:"
+ + "actions:actions:actionRepeater:1:action:action");
TESTER.clickLink("body:topologyLI:topology");
@@ -366,15 +381,25 @@ public class TopologyITCase extends AbstractConsoleITCase {
+ "firstLevelContainer:first:container:content:searchContainer:resultTable:tablePanel:groupForm:"
+ "checkgroup:dataTable", ResourceOperation.CREATE);
- TESTER.clickLink(component.getPageRelativePath() + ":cells:10:cell:panelView:viewLink");
+ assertNotNull(component);
+ TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
+ TESTER.clickLink("body:toggle:outerObjectsRepeater:1:outer:form:content:tasks:firstLevelContainer:first:"
+ + "outerObjectsRepeater:1:outer:container:content:togglePanelContainer:container:"
+ + "actions:actions:actionRepeater:0:action:action");
TESTER.assertLabel(
"body:toggle:outerObjectsRepeater:1:outer:form:content:tasks:secondLevelContainer:title",
"CREATE task about USER");
+ component = findComponentByProp("status", "body:toggle:outerObjectsRepeater:1:outer:form:content:tasks:"
+ + "secondLevelContainer:second:executions:firstLevelContainer:first:container:content:searchContainer:"
+ + "resultTable:tablePanel:groupForm:checkgroup:dataTable", "FAILURE");
+
+ assertNotNull(component);
+ TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
TESTER.clickLink("body:toggle:outerObjectsRepeater:1:outer:form:content:tasks:secondLevelContainer:"
- + "second:executions:firstLevelContainer:first:container:content:searchContainer:resultTable:"
- + "tablePanel:groupForm:checkgroup:dataTable:body:rows:1:cells:6:cell:panelView:viewLink");
+ + "second:executions:firstLevelContainer:first:outerObjectsRepeater:1:outer:container:content:"
+ + "togglePanelContainer:container:actions:actions:actionRepeater:0:action:action");
TESTER.assertComponent("body:toggle:outerObjectsRepeater:1:outer:form:content:tasks:"
+ "secondLevelContainer:second:executions:secondLevelContainer:title", Label.class);
@@ -386,9 +411,13 @@ public class TopologyITCase extends AbstractConsoleITCase {
assertNotNull(component);
TESTER.executeAjaxEvent(component.getPageRelativePath() + ":res", Constants.ON_CLICK);
TESTER.clickLink("body:toggle:container:content:togglePanelContainer:container:actions:push");
- TESTER.clickLink("body:toggle:outerObjectsRepeater:2:outer:form:content:tasks:firstLevelContainer:"
+
+ TESTER.executeAjaxEvent("body:toggle:outerObjectsRepeater:2:outer:form:content:tasks:firstLevelContainer:"
+ "first:container:content:searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable:"
- + "body:rows:1:cells:9:cell:panelEdit:editLink");
+ + "body:rows:1", Constants.ON_CLICK);
+ TESTER.clickLink("body:toggle:outerObjectsRepeater:2:outer:form:content:tasks:firstLevelContainer:first:"
+ + "outerObjectsRepeater:1:outer:container:content:togglePanelContainer:container:"
+ + "actions:actions:actionRepeater:1:action:action");
FormTester formTester = TESTER.newFormTester(
"body:toggle:outerObjectsRepeater:2:outer:form:content:"
@@ -446,9 +475,12 @@ public class TopologyITCase extends AbstractConsoleITCase {
TESTER.executeAjaxEvent(component.getPageRelativePath() + ":res", Constants.ON_CLICK);
TESTER.clickLink("body:toggle:container:content:togglePanelContainer:container:actions:pull");
- TESTER.clickLink("body:toggle:outerObjectsRepeater:2:outer:form:content:tasks:firstLevelContainer:"
+ TESTER.executeAjaxEvent("body:toggle:outerObjectsRepeater:2:outer:form:content:tasks:firstLevelContainer:"
+ "first:container:content:searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable:"
- + "body:rows:1:cells:10:cell:panelTemplate:templateLink");
+ + "body:rows:1", Constants.ON_CLICK);
+ TESTER.clickLink("body:toggle:outerObjectsRepeater:2:outer:form:content:tasks:firstLevelContainer:first:"
+ + "outerObjectsRepeater:1:outer:container:content:togglePanelContainer:container:"
+ + "actions:actions:actionRepeater:4:action:action");
TESTER.assertComponent("body:toggle:outerObjectsRepeater:2:outer:form:content:tasks:firstLevelContainer:"
+ "first:container:content:toggleTemplates", TogglePanel.class);
@@ -470,9 +502,12 @@ public class TopologyITCase extends AbstractConsoleITCase {
TESTER.assertInfoMessages("Operation executed successfully");
TESTER.cleanupFeedbackMessages();
- TESTER.clickLink("body:toggle:outerObjectsRepeater:2:outer:form:content:tasks:firstLevelContainer:"
+ TESTER.executeAjaxEvent("body:toggle:outerObjectsRepeater:2:outer:form:content:tasks:firstLevelContainer:"
+ "first:container:content:searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable:"
- + "body:rows:1:cells:10:cell:panelTemplate:templateLink");
+ + "body:rows:1", Constants.ON_CLICK);
+ TESTER.clickLink("body:toggle:outerObjectsRepeater:2:outer:form:content:tasks:firstLevelContainer:first:"
+ + "outerObjectsRepeater:1:outer:container:content:togglePanelContainer:container:"
+ + "actions:actions:actionRepeater:4:action:action");
TESTER.assertComponent("body:toggle:outerObjectsRepeater:2:outer:form:content:tasks:firstLevelContainer:"
+ "first:container:content:toggleTemplates", TogglePanel.class);
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/fit/core-reference/src/test/java/org/apache/syncope/fit/console/UsersITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/UsersITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/UsersITCase.java
index 81b7dfe..fe5f3ab 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/UsersITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/UsersITCase.java
@@ -69,8 +69,9 @@ public class UsersITCase extends AbstractConsoleITCase {
+ ":searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", "verdi");
assertNotNull(component);
- TESTER.clickLink(component.getPageRelativePath()
- + ":cells:6:cell:panelMustChangePassword:MustChangePasswordLink");
+ TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
+ TESTER.clickLink(TAB_PANEL + "outerObjectsRepeater:1:outer:container:content:togglePanelContainer:container:"
+ + "actions:actions:actionRepeater:2:action:action");
TESTER.assertInfoMessages("Operation executed successfully");
}
@@ -84,7 +85,9 @@ public class UsersITCase extends AbstractConsoleITCase {
+ ":searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", "rossini");
assertNotNull(component);
- TESTER.clickLink(component.getPageRelativePath() + ":cells:6:cell:panelClone:cloneLink");
+ TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
+ TESTER.clickLink(TAB_PANEL + "outerObjectsRepeater:1:outer:container:content:togglePanelContainer:container:"
+ + "actions:actions:actionRepeater:1:action:action");
TESTER.assertComponent(TAB_PANEL + "outerObjectsRepeater:0:outer:form:content:form:view:username:textField",
TextField.class);
@@ -104,11 +107,12 @@ public class UsersITCase extends AbstractConsoleITCase {
+ ":searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", "puccini");
assertNotNull(component);
- TESTER.clickLink(component.getPageRelativePath() + ":cells:6:cell:panelEdit:editLink");
+ TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
+ TESTER.clickLink(TAB_PANEL + "outerObjectsRepeater:1:outer:container:content:togglePanelContainer:container:"
+ + "actions:actions:actionRepeater:0:action:action");
- TESTER.
- assertComponent(TAB_PANEL + "outerObjectsRepeater:0:outer:form:content:form:view:username:textField",
- TextField.class);
+ TESTER.assertComponent(TAB_PANEL + "outerObjectsRepeater:0:outer:form:content:form:view:username:textField",
+ TextField.class);
FormTester formTester = TESTER.newFormTester(TAB_PANEL + "outerObjectsRepeater:0:outer:form:content:form");
assertNotNull(formTester);
@@ -149,7 +153,7 @@ public class UsersITCase extends AbstractConsoleITCase {
+ "outerObjectsRepeater:0:outer:form:content:customResultBody:resources:firstLevelContainer:first:"
+ "container:content:group:beans:0:fields:1:field", Label.class);
- TESTER.clickLink(TAB_PANEL + "outerObjectsRepeater:0:outer:form:content:action:panelClose:closeLink");
+ TESTER.clickLink(TAB_PANEL + "outerObjectsRepeater:0:outer:form:content:action:actionRepeater:0:action:action");
component = findComponentByProp("username", CONTAINER
+ ":searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", "puccini");
@@ -173,7 +177,9 @@ public class UsersITCase extends AbstractConsoleITCase {
+ ":searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", "rossini");
assertNotNull(component);
- TESTER.clickLink(component.getPageRelativePath() + ":cells:6:cell:panelEdit:editLink");
+ TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
+ TESTER.clickLink(TAB_PANEL + "outerObjectsRepeater:1:outer:container:content:togglePanelContainer:container:"
+ + "actions:actions:actionRepeater:0:action:action");
FormTester formTester = TESTER.newFormTester(TAB_PANEL + "outerObjectsRepeater:0:outer:form:content:form");
assertNotNull(formTester);
@@ -213,14 +219,16 @@ public class UsersITCase extends AbstractConsoleITCase {
+ "outerObjectsRepeater:0:outer:form:content:customResultBody:resources:firstLevelContainer:first:"
+ "container:content:group:beans:0:fields:1:field", Label.class);
- TESTER.clickLink(TAB_PANEL + "outerObjectsRepeater:0:outer:form:content:action:panelClose:closeLink");
+ TESTER.clickLink(TAB_PANEL + "outerObjectsRepeater:0:outer:form:content:action:actionRepeater:0:action:action");
component = findComponentByProp("username", CONTAINER
+ ":searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", "rossini");
assertNotNull(component);
// reset ....
- TESTER.clickLink(component.getPageRelativePath() + ":cells:6:cell:panelEdit:editLink");
+ TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
+ TESTER.clickLink(TAB_PANEL + "outerObjectsRepeater:1:outer:container:content:togglePanelContainer:container:"
+ + "actions:actions:actionRepeater:0:action:action");
formTester = TESTER.newFormTester(TAB_PANEL + "outerObjectsRepeater:0:outer:form:content:form");
assertNotNull(formTester);
@@ -249,8 +257,10 @@ public class UsersITCase extends AbstractConsoleITCase {
+ ":searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", "rossini");
assertNotNull(component);
- TESTER.assertComponent(component.getPageRelativePath() + ":cells:6:cell:panelDelete:deleteLink",
- IndicatingOnConfirmAjaxLink.class);
+ TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
+ TESTER.assertComponent(TAB_PANEL
+ + "outerObjectsRepeater:1:outer:container:content:togglePanelContainer:container:"
+ + "actions:actions:actionRepeater:8:action:action", IndicatingOnConfirmAjaxLink.class);
}
@Test
@@ -262,7 +272,9 @@ public class UsersITCase extends AbstractConsoleITCase {
+ ":searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", "puccini");
assertNotNull(component);
- TESTER.clickLink(component.getPageRelativePath() + ":cells:6:cell:panelEdit:editLink");
+ TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
+ TESTER.clickLink(TAB_PANEL + "outerObjectsRepeater:1:outer:container:content:togglePanelContainer:container:"
+ + "actions:actions:actionRepeater:0:action:action");
TESTER.assertComponent(TAB_PANEL + "outerObjectsRepeater:0:outer:form:content:form:view:username:textField",
TextField.class);
@@ -296,13 +308,15 @@ public class UsersITCase extends AbstractConsoleITCase {
+ "outerObjectsRepeater:0:outer:form:content:customResultBody:resources:firstLevelContainer:first:"
+ "container:content:group:beans:0:fields:1:field", Label.class);
- TESTER.clickLink(TAB_PANEL + "outerObjectsRepeater:0:outer:form:content:action:panelClose:closeLink");
+ TESTER.clickLink(TAB_PANEL + "outerObjectsRepeater:0:outer:form:content:action:actionRepeater:0:action:action");
component = findComponentByProp("username", CONTAINER
+ ":searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", "puccini");
assertNotNull(component);
- TESTER.clickLink(component.getPageRelativePath() + ":cells:6:cell:panelEdit:editLink");
+ TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
+ TESTER.clickLink(TAB_PANEL + "outerObjectsRepeater:1:outer:container:content:togglePanelContainer:container:"
+ + "actions:actions:actionRepeater:0:action:action");
TESTER.assertComponent(TAB_PANEL + "outerObjectsRepeater:0:outer:form:content:form:view:username:textField",
TextField.class);
@@ -350,17 +364,20 @@ public class UsersITCase extends AbstractConsoleITCase {
+ ":searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", "vivaldi");
assertNotNull(component);
- TESTER.clickLink(component.getPageRelativePath() + ":cells:6:cell:panelPasswordReset:passwordResetLink");
- TESTER.assertLabel(TAB_PANEL + "outerObjectsRepeater:2:outer:form:content:status:resources:"
+ TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
+ TESTER.clickLink(TAB_PANEL + "outerObjectsRepeater:1:outer:container:content:togglePanelContainer:container:"
+ + "actions:actions:actionRepeater:3:action:action");
+
+ TESTER.assertLabel(TAB_PANEL + "outerObjectsRepeater:3:outer:form:content:status:resources:"
+ "firstLevelContainer:first:container:content:group:beans:0:fields:0:field", "syncope");
- FormTester formTester = TESTER.newFormTester(TAB_PANEL + "outerObjectsRepeater:2:outer:form");
+ FormTester formTester = TESTER.newFormTester(TAB_PANEL + "outerObjectsRepeater:3:outer:form");
formTester.setValue("content:passwordPanel:passwordInnerForm:password:passwordField", "Password345");
formTester.setValue("content:passwordPanel:passwordInnerForm:confirmPassword:passwordField", "Password345");
formTester.select("content:status:resources:firstLevelContainer:first:container:content:group", 0);
TESTER.executeAjaxEvent(
- TAB_PANEL + "outerObjectsRepeater:2:outer:dialog:footer:inputs:0:submit", Constants.ON_CLICK);
+ TAB_PANEL + "outerObjectsRepeater:3:outer:dialog:footer:inputs:0:submit", Constants.ON_CLICK);
TESTER.assertInfoMessages("Operation executed successfully");
TESTER.cleanupFeedbackMessages();
@@ -372,17 +389,20 @@ public class UsersITCase extends AbstractConsoleITCase {
+ ":searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", "vivaldi");
assertNotNull(component);
- TESTER.clickLink(component.getPageRelativePath() + ":cells:6:cell:panelPasswordReset:passwordResetLink");
- TESTER.assertLabel(TAB_PANEL + "outerObjectsRepeater:2:outer:form:content:status:resources:"
+ TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
+ TESTER.clickLink(TAB_PANEL + "outerObjectsRepeater:1:outer:container:content:togglePanelContainer:container:"
+ + "actions:actions:actionRepeater:3:action:action");
+
+ TESTER.assertLabel(TAB_PANEL + "outerObjectsRepeater:3:outer:form:content:status:resources:"
+ "firstLevelContainer:first:container:content:group:beans:0:fields:0:field", "syncope");
- formTester = TESTER.newFormTester(TAB_PANEL + "outerObjectsRepeater:2:outer:form");
+ formTester = TESTER.newFormTester(TAB_PANEL + "outerObjectsRepeater:3:outer:form");
formTester.setValue("content:passwordPanel:passwordInnerForm:password:passwordField", "Password123");
formTester.setValue("content:passwordPanel:passwordInnerForm:confirmPassword:passwordField", "Password123");
formTester.select("content:status:resources:firstLevelContainer:first:container:content:group", 0);
TESTER.executeAjaxEvent(
- TAB_PANEL + "outerObjectsRepeater:2:outer:dialog:footer:inputs:0:submit", Constants.ON_CLICK);
+ TAB_PANEL + "outerObjectsRepeater:3:outer:dialog:footer:inputs:0:submit", Constants.ON_CLICK);
TESTER.assertInfoMessages("Operation executed successfully");
TESTER.cleanupFeedbackMessages();
[04/10] syncope git commit: [SYNCOPE-1047] Replaces ActionLinksPanel
with TogglePanel
Posted by fm...@apache.org.
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/java/org/apache/syncope/client/console/widgets/ReconciliationWidget.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/widgets/ReconciliationWidget.java b/client/console/src/main/java/org/apache/syncope/client/console/widgets/ReconciliationWidget.java
index ab7dc32..edce805 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/widgets/ReconciliationWidget.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/widgets/ReconciliationWidget.java
@@ -47,8 +47,9 @@ import org.apache.syncope.client.console.rest.ReportRestClient;
import org.apache.syncope.client.console.wicket.ajax.IndicatorAjaxTimerBehavior;
import org.apache.syncope.client.console.wicket.ajax.markup.html.IndicatorAjaxLink;
import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
+import org.apache.syncope.client.console.wicket.markup.html.form.Action;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
-import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionPanel;
import org.apache.syncope.client.console.widgets.reconciliation.Any;
import org.apache.syncope.client.console.widgets.reconciliation.Anys;
import org.apache.syncope.client.console.widgets.reconciliation.Misaligned;
@@ -428,10 +429,13 @@ public class ReconciliationWidget extends BaseWidget {
return resource.equals(object.getResource());
}
}, new ArrayList<Misaligned>());
- Component content = missing == null
- ? misaligned == null || misaligned.isEmpty()
- ? new Label(componentId, StringUtils.EMPTY)
- : ActionLinksPanel.<Any>builder().add(new ActionLink<Any>() {
+ Component content;
+
+ if (missing == null) {
+ if (misaligned == null || misaligned.isEmpty()) {
+ content = new Label(componentId, StringUtils.EMPTY);
+ } else {
+ final Action<Any> action = new Action<>(new ActionLink<Any>() {
private static final long serialVersionUID = -3722207913631435501L;
@@ -449,10 +453,15 @@ public class ReconciliationWidget extends BaseWidget {
modal.show(true);
target.add(modal);
}
- }, ActionLink.ActionType.VIEW).
- build(componentId)
- : ActionLinksPanel.<Any>builder().add(null, ActionLink.ActionType.NOT_FOND).
- build(componentId);
+ }, ActionLink.ActionType.VIEW);
+ action.hideLabel();
+ content = new ActionPanel<>(componentId, rowModel, action);
+ }
+ } else {
+ final Action<Any> action = new Action<>(null, ActionLink.ActionType.NOT_FOUND);
+ action.hideLabel();
+ content = new ActionPanel<>(componentId, rowModel, action);
+ }
cellItem.add(content);
cellItem.add(new AttributeModifier("class", "text-center"));
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/java/org/apache/syncope/client/console/wizards/AbstractMappingPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wizards/AbstractMappingPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/wizards/AbstractMappingPanel.java
index 382250d..f807c13 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/wizards/AbstractMappingPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wizards/AbstractMappingPanel.java
@@ -39,7 +39,7 @@ import org.apache.syncope.client.console.rest.AnyTypeClassRestClient;
import org.apache.syncope.client.console.rest.AnyTypeRestClient;
import org.apache.syncope.client.console.wicket.ajax.form.IndicatorAjaxFormComponentUpdatingBehavior;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
-import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionsPanel;
import org.apache.syncope.client.console.wicket.markup.html.form.AjaxCheckBoxPanel;
import org.apache.syncope.client.console.wicket.markup.html.form.AjaxTextFieldPanel;
import org.apache.syncope.client.console.wicket.markup.html.form.MappingPurposePanel;
@@ -318,7 +318,7 @@ public abstract class AbstractMappingPanel extends Panel {
//--------------------------------
// Remove
// -------------------------------
- final ActionLinksPanel.Builder<Serializable> actions = ActionLinksPanel.builder();
+ final ActionsPanel<Serializable> actions = new ActionsPanel<>("toRemove", null);
actions.add(new ActionLink<Serializable>() {
private static final long serialVersionUID = -3722207913631435501L;
@@ -338,8 +338,8 @@ public abstract class AbstractMappingPanel extends Panel {
target.add(AbstractMappingPanel.this);
}
}
- }, ActionLink.ActionType.DELETE, StandardEntitlement.RESOURCE_UPDATE);
- item.add(actions.build("toRemove"));
+ }, ActionLink.ActionType.DELETE, StandardEntitlement.RESOURCE_UPDATE, true).hideLabel();
+ item.add(actions);
// -------------------------------
intAttrName.getField().add(new IndicatorAjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/Relationships.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/Relationships.java b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/Relationships.java
index b9e4f0f..9c43187 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/Relationships.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/Relationships.java
@@ -46,7 +46,7 @@ import org.apache.syncope.client.console.wicket.ajax.form.IndicatorAjaxFormCompo
import org.apache.syncope.client.console.wicket.markup.html.bootstrap.tabs.Accordion;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink.ActionType;
-import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionsPanel;
import org.apache.syncope.client.console.wicket.markup.html.form.AjaxDropDownChoicePanel;
import org.apache.syncope.client.console.wizards.WizardMgtPanel;
import org.apache.syncope.client.lib.SyncopeClient;
@@ -154,7 +154,10 @@ public class Relationships extends WizardStep {
}
});
- viewFragment.add(ActionLinksPanel.<RelationshipTO>builder().add(new ActionLink<RelationshipTO>() {
+ final ActionsPanel<RelationshipTO> panel = new ActionsPanel<>("actions", null);
+ viewFragment.add(panel);
+
+ panel.add(new ActionLink<RelationshipTO>() {
private static final long serialVersionUID = 3257738274365467945L;
@@ -165,7 +168,7 @@ public class Relationships extends WizardStep {
addFragment.add(new Specification().setRenderBodyOnly(true));
target.add(Relationships.this);
}
- }, ActionType.CREATE, AnyEntitlement.UPDATE.getFor(anyTO.getType())).build("actions"));
+ }, ActionType.CREATE, AnyEntitlement.UPDATE.getFor(anyTO.getType()));
return viewFragment;
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/ResultPage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/ResultPage.java b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/ResultPage.java
index 26ac475..2be32df 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/ResultPage.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/ResultPage.java
@@ -19,12 +19,13 @@
package org.apache.syncope.client.console.wizards.any;
import java.io.Serializable;
+import org.apache.commons.lang3.StringUtils;
import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
-import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.markup.html.panel.Panel;
import org.apache.syncope.client.console.panels.WizardModalPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionsPanel;
public abstract class ResultPage<T extends Serializable> extends Panel implements WizardModalPanel<T> {
@@ -39,7 +40,10 @@ public abstract class ResultPage<T extends Serializable> extends Panel implement
add(customResultBody("customResultBody", item, result));
- add(ActionLinksPanel.<T>builder().add(new ActionLink<T>() {
+ final ActionsPanel<T> panel = new ActionsPanel<>("action", null);
+ add(panel);
+
+ panel.add(new ActionLink<T>() {
private static final long serialVersionUID = 3257738274365467945L;
@@ -47,7 +51,9 @@ public abstract class ResultPage<T extends Serializable> extends Panel implement
public void onClick(final AjaxRequestTarget target, final T ignore) {
closeAction(target);
}
- }, ActionLink.ActionType.CLOSE).build("action").setRenderBodyOnly(true));
+ }, ActionLink.ActionType.CLOSE, StringUtils.EMPTY).hideLabel();
+
+ panel.setRenderBodyOnly(true);
}
protected abstract void closeAction(final AjaxRequestTarget target);
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/resources/META-INF/resources/css/syncopeConsole.css
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/css/syncopeConsole.css b/client/console/src/main/resources/META-INF/resources/css/syncopeConsole.css
index 8089d2c..a9f3848 100644
--- a/client/console/src/main/resources/META-INF/resources/css/syncopeConsole.css
+++ b/client/console/src/main/resources/META-INF/resources/css/syncopeConsole.css
@@ -1107,4 +1107,41 @@ div.background-footer {
div#editUserChangePassword > label {
color: #e00000;
+}
+
+div > li {
+ list-style-type: none;
+}
+
+th ul.menu, div#inline-actions ul.menu, div#tablehandling ul.menu, div.listview-actions ul.menu {
+ list-style-type: none;
+ margin: 0;
+ padding: 0;
+}
+
+div#tablehandling ul.menu{
+ float: right;
+}
+
+th ul.menu li, div#inline-actions ul.menu li, div#tablehandling ul.menu li, div.listview-actions ul.menu li {
+ display: inline-block;
+}
+
+th ul.menu li a, div#inline-actions ul.menu li a, div.listview-actions ul.menu li a, div#tablehandling ul.menu li a {
+ margin-left: 5px;
+ display: inline-block !important;
+}
+
+ul.menu li a {
+ display: block;
+ cursor: pointer !important;
+}
+
+.toggle-menu ul.menu li a {
+ padding: 0px;
+ text-align: left;
+}
+
+div#tablehandling ul.menu li a {
+ padding: 0px !important;
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/resources/META-INF/resources/css/topology.css
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/css/topology.css b/client/console/src/main/resources/META-INF/resources/css/topology.css
index 99f421c..6b8c120 100644
--- a/client/console/src/main/resources/META-INF/resources/css/topology.css
+++ b/client/console/src/main/resources/META-INF/resources/css/topology.css
@@ -177,3 +177,20 @@ div.node-action-link .dropdown-menu{
margin: 0px;
border-radius: 0.5em;
}
+
+div#zoom ul.menu {
+ list-style-type: none;
+ margin: 0;
+ padding: 0;
+ float: right;
+}
+
+div#zoom ul.menu li {
+ display: inline-block;
+}
+
+div#zoom ul.menu li a {
+ display: inline-block;
+ margin-left: 5px;
+}
+
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/resources/org/apache/syncope/client/console/bulk/BulkContent.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/bulk/BulkContent.html b/client/console/src/main/resources/org/apache/syncope/client/console/bulk/BulkContent.html
index 06ee2fd..c0f5b9f 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/bulk/BulkContent.html
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/bulk/BulkContent.html
@@ -27,7 +27,9 @@ under the License.
<table class="ui-widget ui-widget-content table-hover pageRowElement" wicket:id="selectedObjects">[DataTable]</table>
<div class="circular-actions">
- <span wicket:id="actions">[Actions]</span>
+ <div id="inline-actions">
+ <span wicket:id="actions">[Actions]</span>
+ </div>
</div>
</div>
</wicket:panel>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/resources/org/apache/syncope/client/console/panels/AjaxDataTablePanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/AjaxDataTablePanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AjaxDataTablePanel.html
index 0032e7f..78c2d31 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/panels/AjaxDataTablePanel.html
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AjaxDataTablePanel.html
@@ -28,7 +28,7 @@ under the License.
</span>
</form>
<div class="bulkAction">
- <div class="bulkActionCell" style="width: 40px">
+ <div class="bulkActionCell">
<a href="#" wicket:id="bulkActionLink">
<i class="fa fa-gear" alt="bulk action icon" title="Bulk action"></i>
</a>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/resources/org/apache/syncope/client/console/panels/DirectoryPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/DirectoryPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/panels/DirectoryPanel.html
index bf257ba..bdc27e9 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/panels/DirectoryPanel.html
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/DirectoryPanel.html
@@ -20,17 +20,22 @@ under the License.
<wicket:extend>
<div wicket:id="searchContainer">
<div class="row">
- <div class="col-sm-6">
- <form wicket:id="paginator">
- <div>
- <div class="dataTables_length">
- <label>
- <wicket:message key="displayRows"/>
- <select class="form-control input-sm" wicket:id="rowsChooser"/>
- </label>
+ <div class="col-sm-12">
+ <div class="col-sm-6">
+ <form wicket:id="paginator">
+ <div>
+ <div class="dataTables_length">
+ <label>
+ <wicket:message key="displayRows"/>
+ <select class="form-control input-sm" wicket:id="rowsChooser"/>
+ </label>
+ </div>
</div>
- </div>
- </form>
+ </form>
+ </div>
+ <div id="tablehandling" class="col-sm-6 pull-right">
+ <span wicket:id="tablehandling">[TABLE HANDLING]</span>
+ </div>
</div>
</div>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/resources/org/apache/syncope/client/console/panels/ParametersDirectoryPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ParametersDirectoryPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ParametersDirectoryPanel.html
new file mode 100644
index 0000000..3550ace
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ParametersDirectoryPanel.html
@@ -0,0 +1,23 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:extend>
+ <div wicket:id="modalDetails"/>
+ </wicket:extend>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/resources/org/apache/syncope/client/console/panels/ParametersDirectoryPanel.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ParametersDirectoryPanel.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ParametersDirectoryPanel.properties
new file mode 100644
index 0000000..6c35595
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ParametersDirectoryPanel.properties
@@ -0,0 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+any.edit=Edit Parameter ${key}
+any.new=New Parameter
+values=Values
+readonly=Readonly
+any.edit=Edit parameter
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/resources/org/apache/syncope/client/console/panels/ParametersDirectoryPanel_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ParametersDirectoryPanel_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ParametersDirectoryPanel_it.properties
new file mode 100644
index 0000000..631b7b6
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ParametersDirectoryPanel_it.properties
@@ -0,0 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+any.edit=Modifica parametro ${key}
+any.new=Nuovo parametro
+values=Valori
+readonly=Readonly
+any.edit=Aggiorna parametro
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/resources/org/apache/syncope/client/console/panels/ParametersDirectoryPanel_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ParametersDirectoryPanel_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ParametersDirectoryPanel_pt_BR.properties
new file mode 100644
index 0000000..91548de
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ParametersDirectoryPanel_pt_BR.properties
@@ -0,0 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+any.edit=Editar par\u00e2metro
+any.new=Novo par\u00e2metro
+values=Valores
+readonly=Somente Leitura
+any.edit=Editar par\u00e2metro
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/resources/org/apache/syncope/client/console/panels/ParametersDirectoryPanel_ru.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ParametersDirectoryPanel_ru.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ParametersDirectoryPanel_ru.properties
new file mode 100644
index 0000000..1c94ee8
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ParametersDirectoryPanel_ru.properties
@@ -0,0 +1,27 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# any.edit=Изменить параметр ${key}
+any.edit=\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 ${key}
+# any.new=Создать параметр
+any.new=\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440
+# values=Значения
+values=\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u044f
+# readonly=Только чтение
+readonly=\u0422\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u0435\u043d\u0438\u0435
+# any.edit=Изменить параметр
+any.edit=\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/resources/org/apache/syncope/client/console/panels/ParametersPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ParametersPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ParametersPanel.html
deleted file mode 100644
index 3550ace..0000000
--- a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ParametersPanel.html
+++ /dev/null
@@ -1,23 +0,0 @@
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
- <wicket:extend>
- <div wicket:id="modalDetails"/>
- </wicket:extend>
-</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/resources/org/apache/syncope/client/console/panels/ParametersPanel.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ParametersPanel.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ParametersPanel.properties
deleted file mode 100644
index 6c35595..0000000
--- a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ParametersPanel.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-any.edit=Edit Parameter ${key}
-any.new=New Parameter
-values=Values
-readonly=Readonly
-any.edit=Edit parameter
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/resources/org/apache/syncope/client/console/panels/ParametersPanel_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ParametersPanel_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ParametersPanel_it.properties
deleted file mode 100644
index 631b7b6..0000000
--- a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ParametersPanel_it.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-any.edit=Modifica parametro ${key}
-any.new=Nuovo parametro
-values=Valori
-readonly=Readonly
-any.edit=Aggiorna parametro
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/resources/org/apache/syncope/client/console/panels/ParametersPanel_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ParametersPanel_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ParametersPanel_pt_BR.properties
deleted file mode 100644
index 91548de..0000000
--- a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ParametersPanel_pt_BR.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-any.edit=Editar par\u00e2metro
-any.new=Novo par\u00e2metro
-values=Valores
-readonly=Somente Leitura
-any.edit=Editar par\u00e2metro
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/resources/org/apache/syncope/client/console/panels/ParametersPanel_ru.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ParametersPanel_ru.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ParametersPanel_ru.properties
deleted file mode 100644
index 1c94ee8..0000000
--- a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ParametersPanel_ru.properties
+++ /dev/null
@@ -1,27 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-# any.edit=Изменить параметр ${key}
-any.edit=\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 ${key}
-# any.new=Создать параметр
-any.new=\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440
-# values=Значения
-values=\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u044f
-# readonly=Только чтение
-readonly=\u0422\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u0435\u043d\u0438\u0435
-# any.edit=Изменить параметр
-any.edit=\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/resources/org/apache/syncope/client/console/panels/RealmDetails.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/RealmDetails.html b/client/console/src/main/resources/org/apache/syncope/client/console/panels/RealmDetails.html
index 76c4b98..3b9448c 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/panels/RealmDetails.html
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/RealmDetails.html
@@ -45,7 +45,9 @@ under the License.
<wicket:fragment wicket:id="emptyFragment"></wicket:fragment>
<wicket:fragment wicket:id="actionsFragment">
- <div wicket:id="actions" class="modal-footer circular-actions"/>
+ <div id="inline-actions">
+ <div wicket:id="actions" class="modal-footer circular-actions"/>
+ </div>
</wicket:fragment>
</wicket:panel>
</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/resources/org/apache/syncope/client/console/panels/TogglePanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/TogglePanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/panels/TogglePanel.html
index 1fb0cf6..c92d8a2 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/panels/TogglePanel.html
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/TogglePanel.html
@@ -19,55 +19,55 @@ under the License.
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
<wicket:head>
<style type="text/css">
- div.topology-menu {
+ div.toggle-menu {
display: none;
border-radius: 5px;
- background-color: rgba(0, 0, 0, 0.45);
+ background-color: rgba(120, 120, 120, 0.96);
color: #fff;
position: absolute;
right: 5px;
- top: 130px;
+ top: 0px;
width: 0px;
min-width: 250px;
z-index: 999;
}
- div.topology-menu ul.menu {
+ div.toggle-menu ul.menu {
list-style: outside none none;
margin: 0;
padding: 0;
list-style: outside none none;
}
- div.topology-menu ul.menu li {
+ div.toggle-menu ul.menu li {
display: block;
- line-height: 2em;
+ line-height: 1em;
vertical-align: middle;
- padding: 5px 10px;
+ padding: 0px 10px;
}
- div.topology-menu ul.menu li a i {
+ div.toggle-menu ul.menu li a i {
position: relative;
padding: 12px 15px 12px 5px;
}
- div.topology-menu div.header a:active,
- div.topology-menu div.header a:link,
- div.topology-menu div.header a:visited,
- div.topology-menu ul a:active,
- div.topology-menu ul a:link,
- div.topology-menu ul a:visited{
+ div.toggle-menu div.header a:active,
+ div.toggle-menu div.header a:link,
+ div.toggle-menu div.header a:visited,
+ div.toggle-menu ul a:active,
+ div.toggle-menu ul a:link,
+ div.toggle-menu ul a:visited{
color: #fff;
}
- div.topology-menu ul li:hover {
+ div.toggle-menu ul li:hover {
color: #fff;
background-color: rgba(0, 0, 0, 0.2);
z-index: 1000;
font-weight: bold;
}
- div.topology-menu div.header {
+ div.toggle-menu div.header {
background-color: rgba(0, 0, 0, 0);
position: relative;
font-size: 1.5em;
@@ -75,18 +75,18 @@ under the License.
border-bottom: 1px solid #aaa;
}
- div.topology-menu div.header a {
+ div.toggle-menu div.header a {
display: inline-table;
padding: 6px 2px 0px 0px;
}
- div.topology-menu div.header .close {
+ div.toggle-menu div.header .close {
text-align: right;
}
</style>
</wicket:head>
<wicket:extend>
- <div wicket:id="togglePanelContainer" class="topology-menu inactive-topology-menu">
+ <div wicket:id="togglePanelContainer" class="toggle-menu inactive-toggle-menu">
<div class="header">
<div class="label">
<label wicket:id="label"/>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/resources/org/apache/syncope/client/console/topology/TopologyTogglePanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/topology/TopologyTogglePanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/topology/TopologyTogglePanel.html
index 051df49..5abef88 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/topology/TopologyTogglePanel.html
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/topology/TopologyTogglePanel.html
@@ -17,8 +17,15 @@ specific language governing permissions and limitations
under the License.
-->
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:head>
+ <style type="text/css">
+ div#topologyTogglePanel {
+ top: 130px !important;
+ }
+ </style>
+ </wicket:head>
<wicket:extend>
- <div wicket:id="container" >
+ <div wicket:id="container">
<wicket:container wicket:id="actions" />
</div>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/ActionLinksPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/ActionLinksPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/ActionLinksPanel.html
deleted file mode 100644
index 65a7eb7..0000000
--- a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/ActionLinksPanel.html
+++ /dev/null
@@ -1,298 +0,0 @@
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
- <wicket:head>
- <style>
- span#actionLink{
- margin-left: 1px;
- margin-right: 1px;
- }
- </style>
- </wicket:head>
- <wicket:panel>
- <span wicket:id="panelMustChangePassword">[plus]</span>
- <span wicket:id="panelClaim">[plus]</span>
- <span wicket:id="panelManageResources">[plus]</span>
- <span wicket:id="panelManageUsers">[plus]</span>
- <span wicket:id="panelManageGroups">[plus]</span>
- <span wicket:id="panelDryRun">[plus]</span>
- <span wicket:id="panelExecute">[plus]</span>
- <span wicket:id="panelPasswordReset">[plus]</span>
- <span wicket:id="panelEnable">[plus]</span>
- <span wicket:id="panelSearch">[plus]</span>
- <span wicket:id="panelNotFound">[plus]</span>
- <span wicket:id="panelView">[plus]</span>
- <span wicket:id="panelMembers">[plus]</span>
- <span wicket:id="panelMapping">[plus]</span>
- <span wicket:id="panelSetLatestSyncToken">[plus]</span>
- <span wicket:id="panelRemoveSyncToken">[plus]</span>
- <span wicket:id="panelClone">[plus]</span>
- <span wicket:id="panelCreate">[plus]</span>
- <span wicket:id="panelReset">[plus]</span>
- <span wicket:id="panelEdit">[plus]</span>
- <span wicket:id="panelTemplate">[plus]</span>
- <span wicket:id="panelTypeExtensions">[plus]</span>
- <span wicket:id="panelFoEdit">[plus]</span>
- <span wicket:id="panelHtml">[plus]</span>
- <span wicket:id="panelText">[plus]</span>
- <span wicket:id="panelCompose">[plus]</span>
- <span wicket:id="panelLayoutEdit">[plus]</span>
- <span wicket:id="panelExport">[plus]</span>
- <span wicket:id="panelExportCSV">[plus]</span>
- <span wicket:id="panelExportHTML">[plus]</span>
- <span wicket:id="panelExportPDF">[plus]</span>
- <span wicket:id="panelExportRTF">[plus]</span>
- <span wicket:id="panelExportXML">[plus]</span>
- <span wicket:id="panelPropagationTasks">[plus]</span>
- <span wicket:id="panelNotificationTasks">[plus]</span>
- <span wicket:id="panelDeprovisionMembers">[plus]</span>
- <span wicket:id="panelProvisionMembers">[plus]</span>
- <span wicket:id="panelWorkflowModeler">[plus]</span>
- <span wicket:id="panelDelete">[plus]</span>
- <span wicket:id="panelSelect">[select]</span>
- <span wicket:id="panelClose">[close]</span>
- <span wicket:id="panelSuspend">[plus]</span>
- <span wicket:id="panelReactivate">[plus]</span>
- <span wicket:id="panelReload">[plus]</span>
- <span wicket:id="panelChangeView">[plus]</span>
- <span wicket:id="panelUnlink">[plus]</span>
- <span wicket:id="panelLink">[plus]</span>
- <span wicket:id="panelUnassign">[plus]</span>
- <span wicket:id="panelAssign">[plus]</span>
- <span wicket:id="panelDeprovision">[plus]</span>
- <span wicket:id="panelProvision">[plus]</span>
- <span wicket:id="panelZoomIn">[plus]</span>
- <span wicket:id="panelZoomOut">[plus]</span>
-
- <wicket:fragment wicket:id="fragmentMustChangePassword">
- <a href="#" wicket:id="MustChangePasswordLink" class="btn"><i class="fa fa-lock" alt="must change password icon" title="Toggle must change password"></i></a>
- </wicket:fragment>
-
- <wicket:fragment wicket:id="fragmentClaim">
- <a href="#" wicket:id="claimLink" class="btn"><i id="actionLink" class="fa fa-ticket" alt="claim icon" title="Claim"></i></a>
- </wicket:fragment>
-
- <wicket:fragment wicket:id="fragmentManageResources">
- <a href="#" wicket:id="manageResourcesLink" class="btn"><i id="actionLink" class="fa fa-sitemap" alt="manage resources icon" title="Manage resources"></i></a>
- </wicket:fragment>
-
- <wicket:fragment wicket:id="fragmentManageUsers">
- <a href="#" wicket:id="manageUsersLink" class="btn"><img id="actionLink" src="img/actions/users-icon.png" alt="manage users icon" title="Manage users"/></a>
- </wicket:fragment>
-
- <wicket:fragment wicket:id="fragmentManageGroups">
- <a href="#" wicket:id="manageGroupsLink" class="btn"><img id="actionLink" src="img/actions/groups-icon.png" alt="manage groups icon" title="Manage groups"/></a>
- </wicket:fragment>
-
- <wicket:fragment wicket:id="fragmentMapping">
- <a href="#" wicket:id="mappingLink" class="btn"><i class="fa fa-exchange" alt="mapping icon" title="Mapping"></i></a>
- </wicket:fragment>
-
- <wicket:fragment wicket:id="fragmentSetLatestSyncToken">
- <a href="#" wicket:id="setLatestSyncTokenLink" class="btn"><i class="fa fa-hourglass-start" alt="reset time icon" title="Set latest Sync Token"></i></a>
- </wicket:fragment>
-
- <wicket:fragment wicket:id="fragmentRemoveSyncToken">
- <a href="#" wicket:id="removeSyncTokenLink" class="btn"><i class="fa fa-hourglass-o" alt="reset time icon" title="Remove Sync Token"></i></a>
- </wicket:fragment>
-
- <wicket:fragment wicket:id="fragmentClone">
- <a href="#" wicket:id="cloneLink" class="btn"><i class="fa fa-clone" alt="clone icon" title="Clone"></i></a>
- </wicket:fragment>
-
- <wicket:fragment wicket:id="fragmentCreate">
- <a href="#" wicket:id="createLink" class="btn"><i class="glyphicon glyphicon-plus" alt="create icon" title="Create"></i></a>
- </wicket:fragment>
-
- <wicket:fragment wicket:id="fragmentNotFound">
- <i class="fa fa-eye-slash" alt="notFound icon" title="Not Found"></i>
- </wicket:fragment>
-
- <wicket:fragment wicket:id="fragmentView">
- <a href="#" wicket:id="viewLink" class="btn"><i class="fa fa-eye" alt="view icon" title="View"></i></a>
- </wicket:fragment>
-
- <wicket:fragment wicket:id="fragmentMembers">
- <a href="#" wicket:id="membersLink" class="btn"><i class="fa fa-users" alt="members icon" title="Members"></i></a>
- </wicket:fragment>
-
- <wicket:fragment wicket:id="fragmentSearch">
- <a href="#" wicket:id="searchLink" class="btn"><i class="glyphicon glyphicon-search" alt="search icon" title="Search"></i></a>
- </wicket:fragment>
-
- <wicket:fragment wicket:id="fragmentEnable">
- <a href="#" wicket:id="enableLink" class="btn"><i id="actionLink" class="fa fa-toggle-on" alt="enable icon" title="Enable / Disable"></i></a>
- </wicket:fragment>
-
- <wicket:fragment wicket:id="fragmentEdit">
- <a href="#" wicket:id="editLink" class="btn"><i id="actionLink" class="glyphicon glyphicon-pencil" alt="edit icon" title="Edit"></i></a>
- </wicket:fragment>
-
- <wicket:fragment wicket:id="fragmentTemplate">
- <a href="#" wicket:id="templateLink" class="btn"><i id="actionLink" class="fa fa-list-alt" alt="template icon" title="Template"></i></a>
- </wicket:fragment>
-
- <wicket:fragment wicket:id="fragmentTypeExtensions">
- <a href="#" wicket:id="typeExtensionsLink" class="btn"><i id="actionLink" class="fa fa-expand" alt="typeExtensions icon" title="Type extensions"></i></a>
- </wicket:fragment>
-
- <wicket:fragment wicket:id="fragmentFoEdit">
- <a href="#" wicket:id="foEditLink" class="btn"><i id="actionLink" class="fa fa-file-pdf-o" alt="fo edit icon" title="FO Edit"></i></a>
- </wicket:fragment>
-
- <wicket:fragment wicket:id="fragmentHtml">
- <a href="#" wicket:id="htmlLink" class="btn"><i id="actionLink" class="fa fa-file-code-o" alt="html icon" title="HTML"></i></a>
- </wicket:fragment>
-
- <wicket:fragment wicket:id="fragmentText">
- <a href="#" wicket:id="textLink" class="btn"><i id="actionLink" class="fa fa-file-text-o" alt="text icon" title="TEXT"></i></a>
- </wicket:fragment>
-
- <wicket:fragment wicket:id="fragmentCompose">
- <a href="#" wicket:id="composeLink" class="btn"><i id="actionLink" class="fa fa-puzzle-piece" alt="compose icon" title="Compose"></i></a>
- </wicket:fragment>
-
- <wicket:fragment wicket:id="fragmentLayoutEdit">
- <a href="#" wicket:id="layoutEditLink" class="btn"><i id="actionLink" class="fa fa-object-ungroup" alt="layout edit icon" title="Layout Edit"></i></a>
- </wicket:fragment>
-
- <wicket:fragment wicket:id="fragmentReset">
- <a href="#" wicket:id="resetLink" class="btn"><img id="actionLink" src="img/actions/reset.png" alt="reset icon" title="Reset sync token"/></a>
- </wicket:fragment>
-
- <wicket:fragment wicket:id="fragmentPropagationTasks">
- <a href="#" wicket:id="propagationTasksLink" class="btn"><i class="fa fa-arrow-right" alt="PropagationTasks icon" title="PropagationTasks"></i></a>
- </wicket:fragment>
-
- <wicket:fragment wicket:id="fragmentNotificationTasks">
- <a href="#" wicket:id="notificationTasksLink" class="btn"><i class="fa fa-envelope-o" alt="NotificationTasks icon" title="NotificationTasks"></i></a>
- </wicket:fragment>
-
- <wicket:fragment wicket:id="fragmentDelete">
- <a href="#" wicket:id="deleteLink" class="btn"><i class="glyphicon glyphicon-minus" alt="delete icon" title="Delete"></i></a>
- </wicket:fragment>
-
- <wicket:fragment wicket:id="fragmentDryRun">
- <a href="#" wicket:id="dryRunLink" class="btn"><i class="fa fa-gears" alt="dryrun icon" title="DryRun"></i></a>
- </wicket:fragment>
-
- <wicket:fragment wicket:id="fragmentExecute">
- <a href="#" wicket:id="executeLink" class="btn"><i class="fa fa-gear" alt="execute icon" title="Execute"></i></a>
- </wicket:fragment>
-
- <wicket:fragment wicket:id="fragmentPasswordReset">
- <a href="#" wicket:id="passwordResetLink" class="btn"><i class="fa fa-shield" alt="password reset icon" title="Password reset"></i></a>
- </wicket:fragment>
-
- <wicket:fragment wicket:id="fragmentSelect">
- <a href="#" wicket:id="selectLink" class="btn"><i class="glyphicon glyphicon-ok"></i></a>
- </wicket:fragment>
-
- <wicket:fragment wicket:id="fragmentClose">
- <a href="#" wicket:id="closeLink" class="btn"><i class="fa fa-sign-out"></i></a>
- </wicket:fragment>
-
- <wicket:fragment wicket:id="fragmentExport">
- <a href="#" wicket:id="exportLink" class="btn"><i class="fa fa-floppy-o" alt="export icon" title="Export"></i></a>
- </wicket:fragment>
-
- <wicket:fragment wicket:id="fragmentExportCSV">
- <a href="#" wicket:id="exportCSVLink" class="btn"><i class="fa fa-file-text-o" alt="export icon" title="Export CSV"></i></a>
- </wicket:fragment>
-
- <wicket:fragment wicket:id="fragmentExportHTML">
- <a href="#" wicket:id="exportHTMLLink" class="btn"><i class="fa fa-file-code-o" alt="export icon" title="Export HTML"></i></a>
- </wicket:fragment>
-
- <wicket:fragment wicket:id="fragmentExportPDF">
- <a href="#" wicket:id="exportPDFLink" class="btn"><i class="fa fa-file-pdf-o" alt="export icon" title="Export PDF"></i></a>
- </wicket:fragment>
-
- <wicket:fragment wicket:id="fragmentExportRTF">
- <a href="#" wicket:id="exportRTFLink" class="btn"><i class="fa fa-file-word-o" alt="export icon" title="Export RTF"></i></a>
- </wicket:fragment>
-
- <wicket:fragment wicket:id="fragmentExportXML">
- <a href="#" wicket:id="exportXMLLink" class="btn"><i class="fa fa-file-excel-o" alt="export icon" title="Export XML"></i></a>
- </wicket:fragment>
-
- <wicket:fragment wicket:id="fragmentSuspend">
- <a href="#" wicket:id="suspendLink" class="btn"><i class="glyphicon glyphicon-ban-circle" alt="suspend icon" title="Suspend"></i></a>
- </wicket:fragment>
-
- <wicket:fragment wicket:id="fragmentReactivate">
- <a href="#" wicket:id="reactivateLink" class="btn"><i class="glyphicon glyphicon-ok-sign" alt="reactivate icon" title="Reactivate"></i></a>
- </wicket:fragment>
-
- <wicket:fragment wicket:id="fragmentReload">
- <a href="#" wicket:id="reloadLink" class="btn"><i id="actionLink" class="fa fa-repeat" alt="reload icon" title="Reload"></i></a>
- </wicket:fragment>
-
- <wicket:fragment wicket:id="fragmentChangeView">
- <a href="#" wicket:id="changeViewLink" class="btn"><i id="actionLink" class="fa fa-list" alt="Change view icon" title="Change view"></i></a>
- </wicket:fragment>
-
- <wicket:fragment wicket:id="fragmentUnlink">
- <a href="#" wicket:id="unlinkLink" class="btn"><i class="fa fa-unlink" alt="Unlink icon" title="Unlink"></i></a>
- </wicket:fragment>
-
- <wicket:fragment wicket:id="fragmentLink">
- <a href="#" wicket:id="linkLink" class="btn"><i class="fa fa-link" alt="Link icon" title="Link"></i></a>
- </wicket:fragment>
-
- <wicket:fragment wicket:id="fragmentUnassign">
- <a href="#" wicket:id="unassignLink" class="btn"><i class="glyphicon glyphicon-resize-full" alt="Unassign icon" title="Unassign"></i></a>
- </wicket:fragment>
-
- <wicket:fragment wicket:id="fragmentAssign">
- <a href="#" wicket:id="assignLink" class="btn"><i class="glyphicon glyphicon-resize-small" alt="Assign icon" title="Assign"></i></a>
- </wicket:fragment>
-
- <wicket:fragment wicket:id="fragmentDeprovision">
- <a href="#" wicket:id="deprovisionLink" class="btn"><i class="glyphicon glyphicon-fast-backward" alt="Deprovision icon" title="Deprovision"></i></a>
- </wicket:fragment>
-
- <wicket:fragment wicket:id="fragmentProvision">
- <a href="#" wicket:id="provisionLink" class="btn"><i class="glyphicon glyphicon-fast-forward" alt="Provision icon" title="Provision"></i></a>
- </wicket:fragment>
-
- <wicket:fragment wicket:id="fragmentDeprovisionMembers">
- <a href="#" wicket:id="deprovisionMembersLink" class="btn"><i class="glyphicon glyphicon-fast-backward" alt="Deprovision icon" title="Deprovision members"></i></a>
- </wicket:fragment>
-
- <wicket:fragment wicket:id="fragmentProvisionMembers">
- <a href="#" wicket:id="provisionMembersLink" class="btn"><i class="glyphicon glyphicon-fast-forward" alt="Provision icon" title="Provision members"></i></a>
- </wicket:fragment>
-
- <wicket:fragment wicket:id="fragmentZoomIn">
- <a href="#" wicket:id="zoomInLink" class="btn"><i class="fa fa-search-plus" alt="zoom in icon" title="Zoom In"></i></a>
- </wicket:fragment>
-
- <wicket:fragment wicket:id="fragmentZoomOut">
- <a href="#" wicket:id="zoomOutLink" class="btn"><i class="fa fa-search-minus" alt="zoom out icon" title="Zoom Out"></i></a>
- </wicket:fragment>
-
- <wicket:fragment wicket:id="fragmentWorkflowModeler">
- <a wicket:id="workflowModelerLink" class="btn"><i class="fa fa-picture-o" alt="picture icon" title="Workflow Modeler"></i></a>
- </wicket:fragment>
-
- <wicket:fragment wicket:id="emptyFragment">
- </wicket:fragment>
- </wicket:panel>
-</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/ActionLinksTogglePanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/ActionLinksTogglePanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/ActionLinksTogglePanel.html
new file mode 100644
index 0000000..79679d2
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/ActionLinksTogglePanel.html
@@ -0,0 +1,30 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:extend>
+ <div wicket:id="container">
+ <wicket:container wicket:id="actions" />
+ </div>
+
+ <wicket:fragment wicket:id="emptyFragment"></wicket:fragment>
+ <wicket:fragment wicket:id="actionsFragment">
+ <div wicket:id="actions"></div>
+ </wicket:fragment>
+ </wicket:extend>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/ActionPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/ActionPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/ActionPanel.html
new file mode 100644
index 0000000..51eb251
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/ActionPanel.html
@@ -0,0 +1,30 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:panel>
+ <li>
+ <a href="#" wicket:id="action" class="btn">
+ <i wicket:id="actionIcon"></i>
+ <wicket:enclosure child="label">
+ <label wicket:id="label">[LABEL]</label>
+ </wicket:enclosure>
+ </a>
+ </li>
+ </wicket:panel>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/ActionPanel.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/ActionPanel.properties b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/ActionPanel.properties
new file mode 100644
index 0000000..3eff230
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/ActionPanel.properties
@@ -0,0 +1,227 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+mapping.class=fa fa-exchange
+mapping.title=mapping
+mapping.alt=mapping icon
+
+mustchangepassword.class=fa fa-lock
+mustchangepassword.title=set must change password
+mustchangepassword.alt=must change password icon
+
+set_latest_sync_token.class=fa fa-hourglass-start
+set_latest_sync_token.title=set last sync token
+set_latest_sync_token.alt=set last sync token icon
+
+remove_sync_token.class=fa fa-hourglass-o
+remove_sync_token.title=remove sync token
+remove_sync_token.alt=remove sync token icon
+
+clone.class=fa fa-clone
+clone.title=clone
+clone.alt=clone icon
+
+create.class=glyphicon glyphicon-plus
+create.title=create
+create.alt=create icon
+
+template.class=fa fa-list-alt
+template.title=template
+template.alt=template icon
+
+edit.class=glyphicon glyphicon-pencil
+edit.title=edit
+edit.alt=edit icon
+
+type_extensions.class=fa fa-expand
+type_extensions.title=extensions
+type_extensions.alt=extensions icon
+
+fo_edit.class=fa fa-file-code-o
+fo_edit.title=fo
+fo_edit.alt=fo icon
+
+html.class=fa fa-file-code-o
+html.title=html
+html.alt=html icon
+
+text.class=fa fa-file-text-o
+text.title=text
+text.alt=text icon
+
+compose.class=fa fa-puzzle-piece
+compose.title=compose
+compose.alt=compose icon
+
+layout_edit.class=fa fa-object-ungroup
+layout_edit.title=layout
+layout_edit.alt=layout icon
+
+reset.class=fa fa-shield
+reset.title=reset
+reset.alt=reset icon
+
+enable.class=fa fa-toggle-on
+enable.title=enable
+enable.alt=enable icon
+
+not_found.class=fa fa-eye-slash
+not_found.title=not found
+not_found.alt=not found icon
+
+view.class=fa fa-eye
+view.title=view
+view.alt=view icon
+
+members.class=fa fa-users
+members.title=members
+members.alt=members icon
+
+search.class=glyphicon glyphicon-search
+search.title=search
+search.alt=search icon
+
+delete.class=glyphicon glyphicon-minus
+delete.title=delete
+delete.alt=delete icon
+
+execute.class=fa fa-gear
+execute.title=execute
+execute.alt=execute icon
+
+password_reset.class=fa fa-shield
+password_reset.title=password reset
+password_reset.alt=password reset icon
+
+dryrun.class=fa fa-gears
+dryrun.title=dry-run
+dryrun.alt=dry-run icon
+
+claim.class=fa fa-ticket
+claim.title=claim
+claim.alt=claim icon
+
+select.class=glyphicon glyphicon-ok
+select.title=select
+select.alt=select icon
+
+close.class=fa fa-sign-out
+close.title=close
+close.alt=close icon
+
+export.class=fa fa-floppy-o
+export.title=export
+export.alt=export icon
+
+export_csv.class=fa fa-file-text-o
+export_csv.title=export as csv
+export_csv.alt=export as csv icon
+
+export_html.class=fa fa-file-code-o
+export_html.title=export as html
+export_html.alt=export as html icon
+
+export_pdf.class=fa fa-file-pdf-o
+export_pdf.title=export as pdf
+export_pdf.alt=export as pdf icon
+
+export_rtf.class=fa fa-file-word-o
+export_rtf.title=export as rtf
+export_rtf.alt=export as rtf icon
+
+export_xml.class=fa fa-file-excel-o
+export_xml.title=export as xml
+export_xml.alt=export as xml icon
+
+suspend.class=glyphicon glyphicon-ban-circle
+suspend.title=suspend
+suspend.alt=suspend icon
+
+reactivate.class=glyphicon glyphicon-ok-sign
+reactivate.title=reactivate
+reactivate.alt=reactivate icon
+
+reload.class=fa fa-repeat
+reload.title=reload
+reload.alt=reload icon
+
+change_view.class=fa fa-list"
+change_view.title=change view
+change_view.alt=change view icon
+
+unlink.class=fa fa-unlink
+unlink.title=unlink
+unlink.alt=unlink icon
+
+link.class=fa fa-link
+link.title=link
+link.alt=link icon
+
+unassign.class=glyphicon glyphicon-resize-full
+unassign.title=unassign
+unassign.alt=unassign icon
+
+assign.class=glyphicon glyphicon-resize-small
+assign.title=assign
+assign.alt=assign icon
+
+deprovision.class=glyphicon glyphicon-fast-backward
+deprovision.title=deprovision
+deprovision.alt=deprovision icon
+
+provision.class=glyphicon glyphicon-fast-forward
+provision.title=provision
+provision.alt=provision icon
+
+deprovision_members.class=glyphicon glyphicon-fast-backward
+deprovision_members.title=deprovision members
+deprovision_members.alt=deprovision members icon
+
+provision_members.class=glyphicon glyphicon-fast-forward
+provision_members.title=provision members
+provision_members.alt=provision members icon
+
+manage_resources.class=fa fa-sitemap
+manage_resources.title=manage resources
+manage_resources.alt=manage resources icon
+
+manage_users.class=fa fa-users
+manage_users.title=manage users
+manage_users.alt=manage users icon
+
+manage_groups.class=fa fa-users
+manage_groups.title=manage groups
+manage_groups.alt=manage groups icon
+
+propagation_tasks.class=fa fa-arrow-right
+propagation_tasks.title=propagation tasks
+propagation_tasks.alt=propagation tasks icon
+
+notification_tasks.class=fa fa-envelope-o
+notification_tasks.title=notification tasks
+notification_tasks.alt=notification tasks icon
+
+zoom_in.class=fa fa-search-plus
+zoom_in.title=zoom-in
+zoom_in.alt=zoom-in icon
+
+zoom_out.class=fa fa-search-minus
+zoom_out.title=zoom-out
+zoom_out.alt=zoom-out icon
+
+workflow_modeler.class=fa fa-picture-o
+workflow_modeler.title=workflow modeler
+workflow_modeler.alt=workflow modeler icon
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/ActionPanel_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/ActionPanel_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/ActionPanel_it.properties
new file mode 100644
index 0000000..e23ad28
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/ActionPanel_it.properties
@@ -0,0 +1,226 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+mapping.class=fa fa-exchange
+mapping.title=mapping
+mapping.alt=mapping icon
+
+mustchangepassword.class=fa fa-lock
+mustchangepassword.title=set must change password
+mustchangepassword.alt=must change password icon
+
+set_latest_sync_token.class=fa fa-hourglass-start
+set_latest_sync_token.title=set last sync token
+set_latest_sync_token.alt=set last sync token icon
+
+remove_sync_token.class=fa fa-hourglass-o
+remove_sync_token.title=remove sync token
+remove_sync_token.alt=remove sync token icon
+
+clone.class=fa fa-clone
+clone.title=clone
+clone.alt=clone icon
+
+create.class=glyphicon glyphicon-plus
+create.title=create
+create.alt=create icon
+
+template.class=fa fa-list-alt
+template.title=template
+template.alt=template icon
+
+edit.class=glyphicon glyphicon-pencil
+edit.title=edit
+edit.alt=edit icon
+
+type_extensions.class=fa fa-expand
+type_extensions.title=extensions
+type_extensions.alt=extensions icon
+
+fo_edit.class=fa fa-file-code-o
+fo_edit.title=fo
+fo_edit.alt=fo icon
+
+html.class=fa fa-file-code-o
+html.title=html
+html.alt=html icon
+
+text.class=fa fa-file-text-o
+text.title=text
+text.alt=text icon
+
+compose.class=fa fa-puzzle-piece
+compose.title=compose
+compose.alt=compose icon
+
+layout_edit.class=fa fa-object-ungroup
+layout_edit.title=layout
+layout_edit.alt=layout icon
+
+reset.class=fa fa-shield
+reset.title=reset
+reset.alt=reset icon
+
+enable.class=fa fa-toggle-on
+enable.title=enable
+enable.alt=enable icon
+
+not_found.class=fa fa-eye-slash
+not_found.title=not found
+not_found.alt=not found icon
+
+view.class=fa fa-eye
+view.title=view
+view.alt=view icon
+
+members.class=fa fa-users
+members.title=members
+members.alt=members icon
+
+search.class=glyphicon glyphicon-search
+search.title=search
+search.alt=search icon
+
+delete.class=glyphicon glyphicon-minus
+delete.title=delete
+delete.alt=delete icon
+
+execute.class=fa fa-gear
+execute.title=execute
+execute.alt=execute icon
+
+password_reset.class=fa fa-shield
+password_reset.title=password reset
+password_reset.alt=password reset icon
+
+dryrun.class=fa fa-gears
+dryrun.title=dry-run
+dryrun.alt=dry-run icon
+
+claim.class=fa fa-ticket
+claim.title=claim
+claim.alt=claim icon
+
+select.class=glyphicon glyphicon-ok
+select.title=select
+select.alt=select icon
+
+close.class=fa fa-sign-out
+close.title=close
+close.alt=close icon
+
+export.class=fa fa-floppy-o
+export.title=export
+export.alt=export icon
+
+export_csv.class=fa fa-file-text-o
+export_csv.title=export as csv
+export_csv.alt=export as csv icon
+
+export_html.class=fa fa-file-code-o
+export_html.title=export as html
+export_html.alt=export as html icon
+
+export_pdf.class=fa fa-file-pdf-o
+export_pdf.title=export as pdf
+export_pdf.alt=export as pdf icon
+
+export_rtf.class=fa fa-file-word-o
+export_rtf.title=export as rtf
+export_rtf.alt=export as rtf icon
+
+export_xml.class=fa fa-file-excel-o
+export_xml.title=export as xml
+export_xml.alt=export as xml icon
+
+suspend.class=glyphicon glyphicon-ban-circle
+suspend.title=suspend
+suspend.alt=suspend icon
+
+reactivate.class=glyphicon glyphicon-ok-sign
+reactivate.title=reactivate
+reactivate.alt=reactivate icon
+
+reload.class=fa fa-repeat
+reload.title=reload
+reload.alt=reload icon
+
+change_view.class=fa fa-list"
+change_view.title=change view
+change_view.alt=change view icon
+
+unlink.class=fa fa-unlink
+unlink.title=unlink
+unlink.alt=unlink icon
+
+link.class=fa fa-link
+link.title=link
+link.alt=link icon
+
+unassign.class=glyphicon glyphicon-resize-full
+unassign.title=unassign
+unassign.alt=unassign icon
+
+assign.class=glyphicon glyphicon-resize-small
+assign.title=assign
+assign.alt=assign icon
+
+deprovision.class=glyphicon glyphicon-fast-backward
+deprovision.title=deprovision
+deprovision.alt=deprovision icon
+
+provision.class=glyphicon glyphicon-fast-forward
+provision.title=provision
+provision.alt=provision icon
+
+deprovision_members.class=glyphicon glyphicon-fast-backward
+deprovision_members.title=deprovision members
+deprovision_members.alt=deprovision members icon
+
+provision_members.class=glyphicon glyphicon-fast-forward
+provision_members.title=provision members
+provision_members.alt=provision members icon
+
+manage_resources.class=fa fa-sitemap
+manage_resources.title=manage resources
+manage_resources.alt=manage resources icon
+
+manage_users.class=fa fa-users
+manage_users.title=manage users
+manage_users.alt=manage users icon
+
+manage_groups.class=fa fa-users
+manage_groups.title=manage groups
+manage_groups.alt=manage groups icon
+
+propagation_tasks.class=fa fa-arrow-right
+propagation_tasks.title=propagation tasks
+propagation_tasks.alt=propagation tasks icon
+
+notification_tasks.class=fa fa-envelope-o
+notification_tasks.title=notification tasks
+notification_tasks.alt=notification tasks icon
+
+zoom_in.class=fa fa-search-plus
+zoom_in.title=zoom-in
+zoom_in.alt=zoom-in icon
+
+zoom_out.class=fa fa-search-minus
+zoom_out.title=zoom-out
+zoom_out.alt=zoom-out icon
+workflow_modeler.class=fa fa-picture-o
+workflow_modeler.title=workflow modeler
+workflow_modeler.alt=workflow modeler icon
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/ActionPanel_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/ActionPanel_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/ActionPanel_pt_BR.properties
new file mode 100644
index 0000000..e23ad28
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/ActionPanel_pt_BR.properties
@@ -0,0 +1,226 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+mapping.class=fa fa-exchange
+mapping.title=mapping
+mapping.alt=mapping icon
+
+mustchangepassword.class=fa fa-lock
+mustchangepassword.title=set must change password
+mustchangepassword.alt=must change password icon
+
+set_latest_sync_token.class=fa fa-hourglass-start
+set_latest_sync_token.title=set last sync token
+set_latest_sync_token.alt=set last sync token icon
+
+remove_sync_token.class=fa fa-hourglass-o
+remove_sync_token.title=remove sync token
+remove_sync_token.alt=remove sync token icon
+
+clone.class=fa fa-clone
+clone.title=clone
+clone.alt=clone icon
+
+create.class=glyphicon glyphicon-plus
+create.title=create
+create.alt=create icon
+
+template.class=fa fa-list-alt
+template.title=template
+template.alt=template icon
+
+edit.class=glyphicon glyphicon-pencil
+edit.title=edit
+edit.alt=edit icon
+
+type_extensions.class=fa fa-expand
+type_extensions.title=extensions
+type_extensions.alt=extensions icon
+
+fo_edit.class=fa fa-file-code-o
+fo_edit.title=fo
+fo_edit.alt=fo icon
+
+html.class=fa fa-file-code-o
+html.title=html
+html.alt=html icon
+
+text.class=fa fa-file-text-o
+text.title=text
+text.alt=text icon
+
+compose.class=fa fa-puzzle-piece
+compose.title=compose
+compose.alt=compose icon
+
+layout_edit.class=fa fa-object-ungroup
+layout_edit.title=layout
+layout_edit.alt=layout icon
+
+reset.class=fa fa-shield
+reset.title=reset
+reset.alt=reset icon
+
+enable.class=fa fa-toggle-on
+enable.title=enable
+enable.alt=enable icon
+
+not_found.class=fa fa-eye-slash
+not_found.title=not found
+not_found.alt=not found icon
+
+view.class=fa fa-eye
+view.title=view
+view.alt=view icon
+
+members.class=fa fa-users
+members.title=members
+members.alt=members icon
+
+search.class=glyphicon glyphicon-search
+search.title=search
+search.alt=search icon
+
+delete.class=glyphicon glyphicon-minus
+delete.title=delete
+delete.alt=delete icon
+
+execute.class=fa fa-gear
+execute.title=execute
+execute.alt=execute icon
+
+password_reset.class=fa fa-shield
+password_reset.title=password reset
+password_reset.alt=password reset icon
+
+dryrun.class=fa fa-gears
+dryrun.title=dry-run
+dryrun.alt=dry-run icon
+
+claim.class=fa fa-ticket
+claim.title=claim
+claim.alt=claim icon
+
+select.class=glyphicon glyphicon-ok
+select.title=select
+select.alt=select icon
+
+close.class=fa fa-sign-out
+close.title=close
+close.alt=close icon
+
+export.class=fa fa-floppy-o
+export.title=export
+export.alt=export icon
+
+export_csv.class=fa fa-file-text-o
+export_csv.title=export as csv
+export_csv.alt=export as csv icon
+
+export_html.class=fa fa-file-code-o
+export_html.title=export as html
+export_html.alt=export as html icon
+
+export_pdf.class=fa fa-file-pdf-o
+export_pdf.title=export as pdf
+export_pdf.alt=export as pdf icon
+
+export_rtf.class=fa fa-file-word-o
+export_rtf.title=export as rtf
+export_rtf.alt=export as rtf icon
+
+export_xml.class=fa fa-file-excel-o
+export_xml.title=export as xml
+export_xml.alt=export as xml icon
+
+suspend.class=glyphicon glyphicon-ban-circle
+suspend.title=suspend
+suspend.alt=suspend icon
+
+reactivate.class=glyphicon glyphicon-ok-sign
+reactivate.title=reactivate
+reactivate.alt=reactivate icon
+
+reload.class=fa fa-repeat
+reload.title=reload
+reload.alt=reload icon
+
+change_view.class=fa fa-list"
+change_view.title=change view
+change_view.alt=change view icon
+
+unlink.class=fa fa-unlink
+unlink.title=unlink
+unlink.alt=unlink icon
+
+link.class=fa fa-link
+link.title=link
+link.alt=link icon
+
+unassign.class=glyphicon glyphicon-resize-full
+unassign.title=unassign
+unassign.alt=unassign icon
+
+assign.class=glyphicon glyphicon-resize-small
+assign.title=assign
+assign.alt=assign icon
+
+deprovision.class=glyphicon glyphicon-fast-backward
+deprovision.title=deprovision
+deprovision.alt=deprovision icon
+
+provision.class=glyphicon glyphicon-fast-forward
+provision.title=provision
+provision.alt=provision icon
+
+deprovision_members.class=glyphicon glyphicon-fast-backward
+deprovision_members.title=deprovision members
+deprovision_members.alt=deprovision members icon
+
+provision_members.class=glyphicon glyphicon-fast-forward
+provision_members.title=provision members
+provision_members.alt=provision members icon
+
+manage_resources.class=fa fa-sitemap
+manage_resources.title=manage resources
+manage_resources.alt=manage resources icon
+
+manage_users.class=fa fa-users
+manage_users.title=manage users
+manage_users.alt=manage users icon
+
+manage_groups.class=fa fa-users
+manage_groups.title=manage groups
+manage_groups.alt=manage groups icon
+
+propagation_tasks.class=fa fa-arrow-right
+propagation_tasks.title=propagation tasks
+propagation_tasks.alt=propagation tasks icon
+
+notification_tasks.class=fa fa-envelope-o
+notification_tasks.title=notification tasks
+notification_tasks.alt=notification tasks icon
+
+zoom_in.class=fa fa-search-plus
+zoom_in.title=zoom-in
+zoom_in.alt=zoom-in icon
+
+zoom_out.class=fa fa-search-minus
+zoom_out.title=zoom-out
+zoom_out.alt=zoom-out icon
+workflow_modeler.class=fa fa-picture-o
+workflow_modeler.title=workflow modeler
+workflow_modeler.alt=workflow modeler icon
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/ActionPanel_ru.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/ActionPanel_ru.properties b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/ActionPanel_ru.properties
new file mode 100644
index 0000000..e23ad28
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/ActionPanel_ru.properties
@@ -0,0 +1,226 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+mapping.class=fa fa-exchange
+mapping.title=mapping
+mapping.alt=mapping icon
+
+mustchangepassword.class=fa fa-lock
+mustchangepassword.title=set must change password
+mustchangepassword.alt=must change password icon
+
+set_latest_sync_token.class=fa fa-hourglass-start
+set_latest_sync_token.title=set last sync token
+set_latest_sync_token.alt=set last sync token icon
+
+remove_sync_token.class=fa fa-hourglass-o
+remove_sync_token.title=remove sync token
+remove_sync_token.alt=remove sync token icon
+
+clone.class=fa fa-clone
+clone.title=clone
+clone.alt=clone icon
+
+create.class=glyphicon glyphicon-plus
+create.title=create
+create.alt=create icon
+
+template.class=fa fa-list-alt
+template.title=template
+template.alt=template icon
+
+edit.class=glyphicon glyphicon-pencil
+edit.title=edit
+edit.alt=edit icon
+
+type_extensions.class=fa fa-expand
+type_extensions.title=extensions
+type_extensions.alt=extensions icon
+
+fo_edit.class=fa fa-file-code-o
+fo_edit.title=fo
+fo_edit.alt=fo icon
+
+html.class=fa fa-file-code-o
+html.title=html
+html.alt=html icon
+
+text.class=fa fa-file-text-o
+text.title=text
+text.alt=text icon
+
+compose.class=fa fa-puzzle-piece
+compose.title=compose
+compose.alt=compose icon
+
+layout_edit.class=fa fa-object-ungroup
+layout_edit.title=layout
+layout_edit.alt=layout icon
+
+reset.class=fa fa-shield
+reset.title=reset
+reset.alt=reset icon
+
+enable.class=fa fa-toggle-on
+enable.title=enable
+enable.alt=enable icon
+
+not_found.class=fa fa-eye-slash
+not_found.title=not found
+not_found.alt=not found icon
+
+view.class=fa fa-eye
+view.title=view
+view.alt=view icon
+
+members.class=fa fa-users
+members.title=members
+members.alt=members icon
+
+search.class=glyphicon glyphicon-search
+search.title=search
+search.alt=search icon
+
+delete.class=glyphicon glyphicon-minus
+delete.title=delete
+delete.alt=delete icon
+
+execute.class=fa fa-gear
+execute.title=execute
+execute.alt=execute icon
+
+password_reset.class=fa fa-shield
+password_reset.title=password reset
+password_reset.alt=password reset icon
+
+dryrun.class=fa fa-gears
+dryrun.title=dry-run
+dryrun.alt=dry-run icon
+
+claim.class=fa fa-ticket
+claim.title=claim
+claim.alt=claim icon
+
+select.class=glyphicon glyphicon-ok
+select.title=select
+select.alt=select icon
+
+close.class=fa fa-sign-out
+close.title=close
+close.alt=close icon
+
+export.class=fa fa-floppy-o
+export.title=export
+export.alt=export icon
+
+export_csv.class=fa fa-file-text-o
+export_csv.title=export as csv
+export_csv.alt=export as csv icon
+
+export_html.class=fa fa-file-code-o
+export_html.title=export as html
+export_html.alt=export as html icon
+
+export_pdf.class=fa fa-file-pdf-o
+export_pdf.title=export as pdf
+export_pdf.alt=export as pdf icon
+
+export_rtf.class=fa fa-file-word-o
+export_rtf.title=export as rtf
+export_rtf.alt=export as rtf icon
+
+export_xml.class=fa fa-file-excel-o
+export_xml.title=export as xml
+export_xml.alt=export as xml icon
+
+suspend.class=glyphicon glyphicon-ban-circle
+suspend.title=suspend
+suspend.alt=suspend icon
+
+reactivate.class=glyphicon glyphicon-ok-sign
+reactivate.title=reactivate
+reactivate.alt=reactivate icon
+
+reload.class=fa fa-repeat
+reload.title=reload
+reload.alt=reload icon
+
+change_view.class=fa fa-list"
+change_view.title=change view
+change_view.alt=change view icon
+
+unlink.class=fa fa-unlink
+unlink.title=unlink
+unlink.alt=unlink icon
+
+link.class=fa fa-link
+link.title=link
+link.alt=link icon
+
+unassign.class=glyphicon glyphicon-resize-full
+unassign.title=unassign
+unassign.alt=unassign icon
+
+assign.class=glyphicon glyphicon-resize-small
+assign.title=assign
+assign.alt=assign icon
+
+deprovision.class=glyphicon glyphicon-fast-backward
+deprovision.title=deprovision
+deprovision.alt=deprovision icon
+
+provision.class=glyphicon glyphicon-fast-forward
+provision.title=provision
+provision.alt=provision icon
+
+deprovision_members.class=glyphicon glyphicon-fast-backward
+deprovision_members.title=deprovision members
+deprovision_members.alt=deprovision members icon
+
+provision_members.class=glyphicon glyphicon-fast-forward
+provision_members.title=provision members
+provision_members.alt=provision members icon
+
+manage_resources.class=fa fa-sitemap
+manage_resources.title=manage resources
+manage_resources.alt=manage resources icon
+
+manage_users.class=fa fa-users
+manage_users.title=manage users
+manage_users.alt=manage users icon
+
+manage_groups.class=fa fa-users
+manage_groups.title=manage groups
+manage_groups.alt=manage groups icon
+
+propagation_tasks.class=fa fa-arrow-right
+propagation_tasks.title=propagation tasks
+propagation_tasks.alt=propagation tasks icon
+
+notification_tasks.class=fa fa-envelope-o
+notification_tasks.title=notification tasks
+notification_tasks.alt=notification tasks icon
+
+zoom_in.class=fa fa-search-plus
+zoom_in.title=zoom-in
+zoom_in.alt=zoom-in icon
+
+zoom_out.class=fa fa-search-minus
+zoom_out.title=zoom-out
+zoom_out.alt=zoom-out icon
+workflow_modeler.class=fa fa-picture-o
+workflow_modeler.title=workflow modeler
+workflow_modeler.alt=workflow modeler icon
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/ActionsPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/ActionsPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/ActionsPanel.html
new file mode 100644
index 0000000..54d2423
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/ActionsPanel.html
@@ -0,0 +1,34 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" >
+ <wicket:head>
+ <style type="text/css">
+ div#actionsTogglePanel div.toggle-menu {
+ top: 0px !important;
+ }
+ </style>
+ </wicket:head>
+ <wicket:panel>
+ <ul class="menu">
+ <wicket:container wicket:id="actionRepeater">
+ <wicket:container wicket:id="action"/>
+ </wicket:container>
+ </ul>
+ </wicket:panel>
+</html>
[05/10] syncope git commit: [SYNCOPE-1047] Replaces ActionLinksPanel
with TogglePanel
Posted by fm...@apache.org.
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/ActionLinksPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/ActionLinksPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/ActionLinksPanel.java
deleted file mode 100644
index c9a632d..0000000
--- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/ActionLinksPanel.java
+++ /dev/null
@@ -1,1459 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.client.console.wicket.markup.html.form;
-
-import java.io.Serializable;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Map.Entry;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.commons.lang3.tuple.Triple;
-import org.apache.syncope.client.console.wicket.markup.html.link.VeilPopupSettings;
-import org.apache.wicket.ajax.AjaxRequestTarget;
-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.link.BookmarkablePageLink;
-import org.apache.wicket.markup.html.panel.Fragment;
-import org.apache.wicket.markup.html.panel.Panel;
-import org.apache.wicket.model.IModel;
-import org.apache.wicket.model.Model;
-
-/**
- * This empty class must exist because there not seems to be alternative to provide specialized HTML for edit links.
- *
- * @param <T> model object type.
- */
-public final class ActionLinksPanel<T extends Serializable> extends Panel {
-
- private static final long serialVersionUID = 322966537010107771L;
-
- private final IModel<T> model;
-
- private boolean disableIndicator = false;
-
- private ActionLinksPanel(final String componentId, final IModel<T> model) {
- super(componentId, model);
- this.model = model;
-
- setOutputMarkupId(true);
-
- super.add(new Fragment("panelClaim", "emptyFragment", this));
- super.add(new Fragment("panelManageResources", "emptyFragment", this));
- super.add(new Fragment("panelManageUsers", "emptyFragment", this));
- super.add(new Fragment("panelManageGroups", "emptyFragment", this));
- super.add(new Fragment("panelMapping", "emptyFragment", this));
- super.add(new Fragment("panelMustChangePassword", "emptyFragment", this));
- super.add(new Fragment("panelSetLatestSyncToken", "emptyFragment", this));
- super.add(new Fragment("panelRemoveSyncToken", "emptyFragment", this));
- super.add(new Fragment("panelClone", "emptyFragment", this));
- super.add(new Fragment("panelCreate", "emptyFragment", this));
- super.add(new Fragment("panelTemplate", "emptyFragment", this));
- super.add(new Fragment("panelEdit", "emptyFragment", this));
- super.add(new Fragment("panelTypeExtensions", "emptyFragment", this));
- super.add(new Fragment("panelFoEdit", "emptyFragment", this));
- super.add(new Fragment("panelHtml", "emptyFragment", this));
- super.add(new Fragment("panelText", "emptyFragment", this));
- super.add(new Fragment("panelCompose", "emptyFragment", this));
- super.add(new Fragment("panelLayoutEdit", "emptyFragment", this));
- super.add(new Fragment("panelReset", "emptyFragment", this));
- super.add(new Fragment("panelEnable", "emptyFragment", this));
- super.add(new Fragment("panelNotFound", "emptyFragment", this));
- super.add(new Fragment("panelView", "emptyFragment", this));
- super.add(new Fragment("panelMembers", "emptyFragment", this));
- super.add(new Fragment("panelSearch", "emptyFragment", this));
- super.add(new Fragment("panelDelete", "emptyFragment", this));
- super.add(new Fragment("panelExecute", "emptyFragment", this));
- super.add(new Fragment("panelPasswordReset", "emptyFragment", this));
- super.add(new Fragment("panelDryRun", "emptyFragment", this));
- super.add(new Fragment("panelSelect", "emptyFragment", this));
- super.add(new Fragment("panelClose", "emptyFragment", this));
- super.add(new Fragment("panelExport", "emptyFragment", this));
- super.add(new Fragment("panelExportCSV", "emptyFragment", this));
- super.add(new Fragment("panelExportHTML", "emptyFragment", this));
- super.add(new Fragment("panelExportPDF", "emptyFragment", this));
- super.add(new Fragment("panelExportRTF", "emptyFragment", this));
- super.add(new Fragment("panelExportXML", "emptyFragment", this));
- super.add(new Fragment("panelSuspend", "emptyFragment", this));
- super.add(new Fragment("panelReactivate", "emptyFragment", this));
- super.add(new Fragment("panelReload", "emptyFragment", this));
- super.add(new Fragment("panelChangeView", "emptyFragment", this));
- super.add(new Fragment("panelUnlink", "emptyFragment", this));
- super.add(new Fragment("panelLink", "emptyFragment", this));
- super.add(new Fragment("panelUnassign", "emptyFragment", this));
- super.add(new Fragment("panelAssign", "emptyFragment", this));
- super.add(new Fragment("panelDeprovision", "emptyFragment", this));
- super.add(new Fragment("panelProvision", "emptyFragment", this));
- super.add(new Fragment("panelDeprovisionMembers", "emptyFragment", this));
- super.add(new Fragment("panelProvisionMembers", "emptyFragment", this));
- super.add(new Fragment("panelPropagationTasks", "emptyFragment", this));
- super.add(new Fragment("panelNotificationTasks", "emptyFragment", this));
- super.add(new Fragment("panelZoomIn", "emptyFragment", this));
- super.add(new Fragment("panelZoomOut", "emptyFragment", this));
- super.add(new Fragment("panelWorkflowModeler", "emptyFragment", this));
- }
-
- public ActionLinksPanel<T> add(
- final ActionLink<T> link,
- final ActionLink.ActionType type,
- final String entitlements,
- final boolean enabled) {
-
- Fragment fragment = null;
-
- switch (type) {
-
- case CLAIM:
- fragment = new Fragment("panelClaim", "fragmentClaim", this);
-
- fragment.addOrReplace(new IndicatingAjaxLink<Void>("claimLink") {
-
- private static final long serialVersionUID = -7978723352517770644L;
-
- @Override
- public void onClick(final AjaxRequestTarget target) {
- link.onClick(target, model.getObject());
- }
-
- @Override
- public String getAjaxIndicatorMarkupId() {
- return disableIndicator || !link.isIndicatorEnabled()
- ? StringUtils.EMPTY : super.getAjaxIndicatorMarkupId();
- }
- }.setVisible(link.isEnabled(model.getObject())));
- break;
-
- case MANAGE_RESOURCES:
- fragment = new Fragment("panelManageResources", "fragmentManageResources", this);
-
- fragment.addOrReplace(new IndicatingAjaxLink<Void>("manageResourcesLink") {
-
- private static final long serialVersionUID = -6957616042924610291L;
-
- @Override
- public void onClick(final AjaxRequestTarget target) {
- link.onClick(target, model.getObject());
- }
-
- @Override
- public String getAjaxIndicatorMarkupId() {
- return disableIndicator || !link.isIndicatorEnabled()
- ? StringUtils.EMPTY : super.getAjaxIndicatorMarkupId();
- }
- }.setVisible(link.isEnabled(model.getObject())));
- break;
-
- case MANAGE_USERS:
- fragment = new Fragment("panelManageUsers", "fragmentManageUsers", this);
-
- fragment.addOrReplace(new IndicatingAjaxLink<Void>("manageUsersLink") {
-
- private static final long serialVersionUID = -6957616042924610292L;
-
- @Override
- public void onClick(final AjaxRequestTarget target) {
- link.onClick(target, model.getObject());
- }
-
- @Override
- public String getAjaxIndicatorMarkupId() {
- return disableIndicator || !link.isIndicatorEnabled()
- ? StringUtils.EMPTY : super.getAjaxIndicatorMarkupId();
- }
- }.setVisible(link.isEnabled(model.getObject())));
- break;
-
- case MANAGE_GROUPS:
- fragment = new Fragment("panelManageGroups", "fragmentManageGroups", this);
-
- fragment.addOrReplace(new IndicatingAjaxLink<Void>("manageGroupsLink") {
-
- private static final long serialVersionUID = -6957616042924610293L;
-
- @Override
- public void onClick(final AjaxRequestTarget target) {
- link.onClick(target, model.getObject());
- }
-
- @Override
- public String getAjaxIndicatorMarkupId() {
- return disableIndicator || !link.isIndicatorEnabled()
- ? StringUtils.EMPTY : super.getAjaxIndicatorMarkupId();
- }
- }.setVisible(link.isEnabled(model.getObject())));
- break;
-
- case MAPPING:
- fragment = new Fragment("panelMapping", "fragmentMapping", this);
-
- fragment.addOrReplace(new IndicatingAjaxLink<Void>("mappingLink") {
-
- private static final long serialVersionUID = -7978723352517770644L;
-
- @Override
- public void onClick(final AjaxRequestTarget target) {
- link.onClick(target, model.getObject());
- }
-
- @Override
- public String getAjaxIndicatorMarkupId() {
- return disableIndicator || !link.isIndicatorEnabled()
- ? StringUtils.EMPTY : super.getAjaxIndicatorMarkupId();
- }
- }.setVisible(link.isEnabled(model.getObject())));
- break;
-
- case MUSTCHANGEPASSWORD:
- fragment = new Fragment("panelMustChangePassword", "fragmentMustChangePassword", this);
-
- fragment.addOrReplace(new IndicatingAjaxLink<Void>("MustChangePasswordLink") {
-
- private static final long serialVersionUID = -7978723352517770644L;
-
- @Override
- public void onClick(final AjaxRequestTarget target) {
- link.onClick(target, model.getObject());
- }
-
- @Override
- public String getAjaxIndicatorMarkupId() {
- return disableIndicator || !link.isIndicatorEnabled()
- ? StringUtils.EMPTY : super.getAjaxIndicatorMarkupId();
- }
- }.setVisible(link.isEnabled(model.getObject())));
- break;
-
- case SET_LATEST_SYNC_TOKEN:
- fragment = new Fragment("panelSetLatestSyncToken", "fragmentSetLatestSyncToken", this);
-
- fragment.addOrReplace(new IndicatingAjaxLink<Void>("setLatestSyncTokenLink") {
-
- private static final long serialVersionUID = -1876519166660008562L;
-
- @Override
- public void onClick(final AjaxRequestTarget target) {
- link.onClick(target, model.getObject());
- }
-
- @Override
- public String getAjaxIndicatorMarkupId() {
- return disableIndicator || !link.isIndicatorEnabled()
- ? StringUtils.EMPTY : super.getAjaxIndicatorMarkupId();
- }
- }.setVisible(link.isEnabled(model.getObject())));
- break;
-
- case REMOVE_SYNC_TOKEN:
- fragment = new Fragment("panelRemoveSyncToken", "fragmentRemoveSyncToken", this);
-
- fragment.addOrReplace(new IndicatingAjaxLink<Void>("removeSyncTokenLink") {
-
- private static final long serialVersionUID = -7978723352517770644L;
-
- @Override
- public void onClick(final AjaxRequestTarget target) {
- link.onClick(target, model.getObject());
- }
-
- @Override
- public String getAjaxIndicatorMarkupId() {
- return disableIndicator || !link.isIndicatorEnabled()
- ? StringUtils.EMPTY : super.getAjaxIndicatorMarkupId();
- }
- }.setVisible(link.isEnabled(model.getObject())));
- break;
-
- case CLONE:
- fragment = new Fragment("panelClone", "fragmentClone", this);
-
- fragment.addOrReplace(new IndicatingAjaxLink<Void>("cloneLink") {
-
- private static final long serialVersionUID = -7978723352517770644L;
-
- @Override
- public void onClick(final AjaxRequestTarget target) {
- link.onClick(target, model.getObject());
- }
-
- @Override
- public String getAjaxIndicatorMarkupId() {
- return disableIndicator || !link.isIndicatorEnabled()
- ? StringUtils.EMPTY : super.getAjaxIndicatorMarkupId();
- }
- }.setVisible(link.isEnabled(model.getObject())));
- break;
-
- case CREATE:
- fragment = new Fragment("panelCreate", "fragmentCreate", this);
-
- fragment.addOrReplace(new IndicatingAjaxLink<Void>("createLink") {
-
- private static final long serialVersionUID = -7978723352517770644L;
-
- @Override
- public void onClick(final AjaxRequestTarget target) {
- link.onClick(target, model.getObject());
- }
-
- @Override
- public String getAjaxIndicatorMarkupId() {
- return disableIndicator || !link.isIndicatorEnabled()
- ? StringUtils.EMPTY : super.getAjaxIndicatorMarkupId();
- }
- }.setVisible(link.isEnabled(model.getObject())));
- break;
-
- case RESET:
- fragment = new Fragment("panelReset", "fragmentReset", this);
-
- fragment.addOrReplace(new IndicatingAjaxLink<Void>("resetLink") {
-
- private static final long serialVersionUID = -6957616042924610290L;
-
- @Override
- public void onClick(final AjaxRequestTarget target) {
- link.onClick(target, model.getObject());
- }
-
- @Override
- public String getAjaxIndicatorMarkupId() {
- return disableIndicator || !link.isIndicatorEnabled()
- ? StringUtils.EMPTY : super.getAjaxIndicatorMarkupId();
- }
- }.setVisible(link.isEnabled(model.getObject())));
- break;
-
- case TEMPLATE:
- fragment = new Fragment("panelTemplate", "fragmentTemplate", this);
-
- fragment.addOrReplace(new IndicatingAjaxLink<Void>("templateLink") {
-
- private static final long serialVersionUID = -7978723352517770644L;
-
- @Override
- public void onClick(final AjaxRequestTarget target) {
- link.onClick(target, model.getObject());
- }
-
- @Override
- public String getAjaxIndicatorMarkupId() {
- return disableIndicator || !link.isIndicatorEnabled()
- ? StringUtils.EMPTY : super.getAjaxIndicatorMarkupId();
- }
- }.setVisible(link.isEnabled(model.getObject())));
- break;
-
- case EDIT:
- fragment = new Fragment("panelEdit", "fragmentEdit", this);
-
- fragment.addOrReplace(new IndicatingAjaxLink<Void>("editLink") {
-
- private static final long serialVersionUID = -7978723352517770644L;
-
- @Override
- public void onClick(final AjaxRequestTarget target) {
- link.onClick(target, model.getObject());
- }
-
- @Override
- public String getAjaxIndicatorMarkupId() {
- return disableIndicator || !link.isIndicatorEnabled()
- ? StringUtils.EMPTY : super.getAjaxIndicatorMarkupId();
- }
- }.setVisible(link.isEnabled(model.getObject())));
- break;
-
- case TYPE_EXTENSIONS:
- fragment = new Fragment("panelTypeExtensions", "fragmentTypeExtensions", this);
-
- fragment.addOrReplace(new IndicatingAjaxLink<Void>("typeExtensionsLink") {
-
- private static final long serialVersionUID = -1876519166660008562L;
-
- @Override
- public void onClick(final AjaxRequestTarget target) {
- link.onClick(target, model.getObject());
- }
-
- @Override
- public String getAjaxIndicatorMarkupId() {
- return disableIndicator || !link.isIndicatorEnabled()
- ? StringUtils.EMPTY : super.getAjaxIndicatorMarkupId();
- }
- }.setVisible(link.isEnabled(model.getObject())));
- break;
-
- case FO_EDIT:
- fragment = new Fragment("panelFoEdit", "fragmentFoEdit", this);
-
- fragment.addOrReplace(new IndicatingAjaxLink<Void>("foEditLink") {
-
- private static final long serialVersionUID = -7978723352517770644L;
-
- @Override
- public void onClick(final AjaxRequestTarget target) {
- link.onClick(target, model.getObject());
- }
-
- @Override
- public String getAjaxIndicatorMarkupId() {
- return disableIndicator || !link.isIndicatorEnabled()
- ? StringUtils.EMPTY : super.getAjaxIndicatorMarkupId();
- }
- }.setVisible(link.isEnabled(model.getObject())));
- break;
-
- case HTML:
- fragment = new Fragment("panelHtml", "fragmentHtml", this);
-
- fragment.addOrReplace(new IndicatingAjaxLink<Void>("htmlLink") {
-
- private static final long serialVersionUID = -7978723352517770644L;
-
- @Override
- public void onClick(final AjaxRequestTarget target) {
- link.onClick(target, model.getObject());
- }
-
- @Override
- public String getAjaxIndicatorMarkupId() {
- return disableIndicator || !link.isIndicatorEnabled()
- ? StringUtils.EMPTY : super.getAjaxIndicatorMarkupId();
- }
- }.setVisible(link.isEnabled(model.getObject())));
- break;
-
- case TEXT:
- fragment = new Fragment("panelText", "fragmentText", this);
-
- fragment.addOrReplace(new IndicatingAjaxLink<Void>("textLink") {
-
- private static final long serialVersionUID = -7978723352517770644L;
-
- @Override
- public void onClick(final AjaxRequestTarget target) {
- link.onClick(target, model.getObject());
- }
-
- @Override
- public String getAjaxIndicatorMarkupId() {
- return disableIndicator || !link.isIndicatorEnabled()
- ? StringUtils.EMPTY : super.getAjaxIndicatorMarkupId();
- }
- }.setVisible(link.isEnabled(model.getObject())));
- break;
-
- case COMPOSE:
- fragment = new Fragment("panelCompose", "fragmentCompose", this);
-
- fragment.addOrReplace(new IndicatingAjaxLink<Void>("composeLink") {
-
- private static final long serialVersionUID = -1876519166660008562L;
-
- @Override
- public void onClick(final AjaxRequestTarget target) {
- link.onClick(target, model.getObject());
- }
-
- @Override
- public String getAjaxIndicatorMarkupId() {
- return disableIndicator || !link.isIndicatorEnabled()
- ? StringUtils.EMPTY : super.getAjaxIndicatorMarkupId();
- }
- }.setVisible(link.isEnabled(model.getObject())));
- break;
-
- case LAYOUT_EDIT:
- fragment = new Fragment("panelLayoutEdit", "fragmentLayoutEdit", this);
-
- fragment.addOrReplace(new IndicatingAjaxLink<Void>("layoutEditLink") {
-
- private static final long serialVersionUID = -1876519166660008562L;
-
- @Override
- public void onClick(final AjaxRequestTarget target) {
- link.onClick(target, model.getObject());
- }
-
- @Override
- public String getAjaxIndicatorMarkupId() {
- return disableIndicator || !link.isIndicatorEnabled()
- ? StringUtils.EMPTY : super.getAjaxIndicatorMarkupId();
- }
- }.setVisible(link.isEnabled(model.getObject())));
- break;
-
- case ENABLE:
- fragment = new Fragment("panelEnable", "fragmentEnable", this);
-
- fragment.addOrReplace(new IndicatingAjaxLink<Void>("enableLink") {
-
- private static final long serialVersionUID = -7978723352517770644L;
-
- @Override
- public void onClick(final AjaxRequestTarget target) {
- link.onClick(target, model.getObject());
- }
-
- @Override
- public String getAjaxIndicatorMarkupId() {
- return disableIndicator || !link.isIndicatorEnabled()
- ? StringUtils.EMPTY : super.getAjaxIndicatorMarkupId();
- }
- }.setVisible(link.isEnabled(model.getObject())));
- break;
-
- case NOT_FOND:
- fragment = new Fragment("panelNotFound", "fragmentNotFound", this);
- break;
-
- case VIEW:
- fragment = new Fragment("panelView", "fragmentView", this);
- fragment.addOrReplace(new IndicatingAjaxLink<Void>("viewLink") {
-
- private static final long serialVersionUID = -1876519166660008562L;
-
- @Override
- public void onClick(final AjaxRequestTarget target) {
- link.onClick(target, model.getObject());
- }
-
- @Override
- public String getAjaxIndicatorMarkupId() {
- return disableIndicator || !link.isIndicatorEnabled()
- ? StringUtils.EMPTY : super.getAjaxIndicatorMarkupId();
- }
- }.setVisible(link.isEnabled(model.getObject())));
- break;
-
- case MEMBERS:
- fragment = new Fragment("panelMembers", "fragmentMembers", this);
- fragment.addOrReplace(new IndicatingAjaxLink<Void>("membersLink") {
-
- private static final long serialVersionUID = -1876519166660008562L;
-
- @Override
- public void onClick(final AjaxRequestTarget target) {
- link.onClick(target, model.getObject());
- }
-
- @Override
- public String getAjaxIndicatorMarkupId() {
- return disableIndicator || !link.isIndicatorEnabled()
- ? StringUtils.EMPTY : super.getAjaxIndicatorMarkupId();
- }
- }.setVisible(link.isEnabled(model.getObject())));
- break;
-
- case SEARCH:
- fragment = new Fragment("panelSearch", "fragmentSearch", this);
-
- fragment.addOrReplace(new IndicatingAjaxLink<Void>("searchLink") {
-
- private static final long serialVersionUID = -7978723352517770644L;
-
- @Override
- public void onClick(final AjaxRequestTarget target) {
- link.onClick(target, model.getObject());
- }
-
- @Override
- public String getAjaxIndicatorMarkupId() {
- return disableIndicator || !link.isIndicatorEnabled()
- ? StringUtils.EMPTY : super.getAjaxIndicatorMarkupId();
- }
- }.setVisible(link.isEnabled(model.getObject())));
- break;
-
- case EXECUTE:
- fragment = new Fragment("panelExecute", "fragmentExecute", this);
-
- fragment.addOrReplace(new IndicatingAjaxLink<Void>("executeLink") {
-
- private static final long serialVersionUID = -7978723352517770644L;
-
- @Override
- public void onClick(final AjaxRequestTarget target) {
- link.onClick(target, model.getObject());
- }
-
- @Override
- public String getAjaxIndicatorMarkupId() {
- return disableIndicator || !link.isIndicatorEnabled()
- ? StringUtils.EMPTY : super.getAjaxIndicatorMarkupId();
- }
- }.setVisible(link.isEnabled(model.getObject())));
- break;
-
- case PASSWORD_RESET:
- fragment = new Fragment("panelPasswordReset", "fragmentPasswordReset", this);
-
- fragment.addOrReplace(new IndicatingAjaxLink<Void>("passwordResetLink") {
-
- private static final long serialVersionUID = -7978723352517770644L;
-
- @Override
- public void onClick(final AjaxRequestTarget target) {
- link.onClick(target, model.getObject());
- }
-
- @Override
- public String getAjaxIndicatorMarkupId() {
- return disableIndicator || !link.isIndicatorEnabled()
- ? StringUtils.EMPTY : super.getAjaxIndicatorMarkupId();
- }
- }.setVisible(link.isEnabled(model.getObject())));
- break;
-
- case DRYRUN:
- fragment = new Fragment("panelDryRun", "fragmentDryRun", this);
-
- fragment.addOrReplace(new IndicatingAjaxLink<Void>("dryRunLink") {
-
- private static final long serialVersionUID = -7978723352517770644L;
-
- @Override
- public void onClick(final AjaxRequestTarget target) {
- link.onClick(target, model.getObject());
- }
-
- @Override
- public String getAjaxIndicatorMarkupId() {
- return disableIndicator || !link.isIndicatorEnabled()
- ? StringUtils.EMPTY : super.getAjaxIndicatorMarkupId();
- }
- }.setVisible(link.isEnabled(model.getObject())));
- break;
-
- case DELETE:
- fragment = new Fragment("panelDelete", "fragmentDelete", this);
-
- fragment.addOrReplace(new IndicatingOnConfirmAjaxLink<Void>("deleteLink", enabled) {
-
- private static final long serialVersionUID = -7978723352517770644L;
-
- @Override
- public void onClick(final AjaxRequestTarget target) {
- link.onClick(target, model.getObject());
- }
-
- @Override
- public String getAjaxIndicatorMarkupId() {
- return disableIndicator || !link.isIndicatorEnabled()
- ? StringUtils.EMPTY : super.getAjaxIndicatorMarkupId();
- }
- }).setVisible(link.isEnabled(model.getObject()));
-
- break;
-
- case SELECT:
- fragment = new Fragment("panelSelect", "fragmentSelect", this);
-
- fragment.addOrReplace(new IndicatingAjaxLink<Void>("selectLink") {
-
- private static final long serialVersionUID = -7978723352517770644L;
-
- @Override
- public void onClick(final AjaxRequestTarget target) {
- link.onClick(target, model.getObject());
- }
-
- @Override
- public String getAjaxIndicatorMarkupId() {
- return disableIndicator || !link.isIndicatorEnabled()
- ? StringUtils.EMPTY : super.getAjaxIndicatorMarkupId();
- }
- }).setVisible(link.isEnabled(model.getObject()));
-
- break;
- case CLOSE:
- fragment = new Fragment("panelClose", "fragmentClose", this);
-
- fragment.addOrReplace(new IndicatingAjaxLink<Void>("closeLink") {
-
- private static final long serialVersionUID = -7978723352517770644L;
-
- @Override
- public void onClick(final AjaxRequestTarget target) {
- link.onClick(target, model.getObject());
- }
-
- @Override
- public String getAjaxIndicatorMarkupId() {
- return disableIndicator || !link.isIndicatorEnabled()
- ? StringUtils.EMPTY : super.getAjaxIndicatorMarkupId();
- }
- }).setVisible(link.isEnabled(model.getObject()));
-
- break;
-
- case EXPORT:
- fragment = new Fragment("panelExport", "fragmentExport", this);
-
- fragment.addOrReplace(new IndicatingAjaxLink<Void>("exportLink") {
-
- private static final long serialVersionUID = -7978723352517770644L;
-
- @Override
- public void onClick(final AjaxRequestTarget target) {
- link.onClick(target, model.getObject());
- }
-
- @Override
- public String getAjaxIndicatorMarkupId() {
- return disableIndicator || !link.isIndicatorEnabled()
- ? StringUtils.EMPTY : super.getAjaxIndicatorMarkupId();
- }
- }.setVisible(link.isEnabled(model.getObject())));
- break;
-
- case EXPORT_CSV:
- fragment = new Fragment("panelExportCSV", "fragmentExportCSV", this);
-
- fragment.addOrReplace(new IndicatingAjaxLink<Void>("exportCSVLink") {
-
- private static final long serialVersionUID = -7978723352517770644L;
-
- @Override
- public void onClick(final AjaxRequestTarget target) {
- link.onClick(target, model.getObject());
- }
-
- @Override
- public String getAjaxIndicatorMarkupId() {
- return disableIndicator || !link.isIndicatorEnabled()
- ? StringUtils.EMPTY : super.getAjaxIndicatorMarkupId();
- }
- }.setVisible(link.isEnabled(model.getObject())));
- break;
-
- case EXPORT_HTML:
- fragment = new Fragment("panelExportHTML", "fragmentExportHTML", this);
-
- fragment.addOrReplace(new IndicatingAjaxLink<Void>("exportHTMLLink") {
-
- private static final long serialVersionUID = -7978723352517770644L;
-
- @Override
- public void onClick(final AjaxRequestTarget target) {
- link.onClick(target, model.getObject());
- }
-
- @Override
- public String getAjaxIndicatorMarkupId() {
- return disableIndicator || !link.isIndicatorEnabled()
- ? StringUtils.EMPTY : super.getAjaxIndicatorMarkupId();
- }
- }.setVisible(link.isEnabled(model.getObject())));
- break;
-
- case EXPORT_PDF:
- fragment = new Fragment("panelExportPDF", "fragmentExportPDF", this);
-
- fragment.addOrReplace(new IndicatingAjaxLink<Void>("exportPDFLink") {
-
- private static final long serialVersionUID = -7978723352517770644L;
-
- @Override
- public void onClick(final AjaxRequestTarget target) {
- link.onClick(target, model.getObject());
- }
-
- @Override
- public String getAjaxIndicatorMarkupId() {
- return disableIndicator || !link.isIndicatorEnabled()
- ? StringUtils.EMPTY : super.getAjaxIndicatorMarkupId();
- }
- }.setVisible(link.isEnabled(model.getObject())));
- break;
-
- case EXPORT_RTF:
- fragment = new Fragment("panelExportRTF", "fragmentExportRTF", this);
-
- fragment.addOrReplace(new IndicatingAjaxLink<Void>("exportRTFLink") {
-
- private static final long serialVersionUID = -7978723352517770644L;
-
- @Override
- public void onClick(final AjaxRequestTarget target) {
- link.onClick(target, model.getObject());
- }
-
- @Override
- public String getAjaxIndicatorMarkupId() {
- return disableIndicator || !link.isIndicatorEnabled()
- ? StringUtils.EMPTY : super.getAjaxIndicatorMarkupId();
- }
- }.setVisible(link.isEnabled(model.getObject())));
- break;
-
- case EXPORT_XML:
- fragment = new Fragment("panelExportXML", "fragmentExportXML", this);
-
- fragment.addOrReplace(new IndicatingAjaxLink<Void>("exportXMLLink") {
-
- private static final long serialVersionUID = -7978723352517770644L;
-
- @Override
- public void onClick(final AjaxRequestTarget target) {
- link.onClick(target, model.getObject());
- }
-
- @Override
- public String getAjaxIndicatorMarkupId() {
- return disableIndicator || !link.isIndicatorEnabled()
- ? StringUtils.EMPTY : super.getAjaxIndicatorMarkupId();
- }
- }.setVisible(link.isEnabled(model.getObject())));
- break;
-
- case SUSPEND:
- fragment = new Fragment("panelSuspend", "fragmentSuspend", this);
-
- fragment.addOrReplace(new IndicatingAjaxLink<Void>("suspendLink") {
-
- private static final long serialVersionUID = -6957616042924610291L;
-
- @Override
- public void onClick(final AjaxRequestTarget target) {
- link.onClick(target, model.getObject());
- }
-
- @Override
- public String getAjaxIndicatorMarkupId() {
- return disableIndicator || !link.isIndicatorEnabled()
- ? StringUtils.EMPTY : super.getAjaxIndicatorMarkupId();
- }
- }.setVisible(link.isEnabled(model.getObject())));
- break;
-
- case REACTIVATE:
- fragment = new Fragment("panelReactivate", "fragmentReactivate", this);
-
- fragment.addOrReplace(new IndicatingAjaxLink<Void>("reactivateLink") {
-
- private static final long serialVersionUID = -6957616042924610292L;
-
- @Override
- public void onClick(final AjaxRequestTarget target) {
- link.onClick(target, model.getObject());
- }
-
- @Override
- public String getAjaxIndicatorMarkupId() {
- return disableIndicator || !link.isIndicatorEnabled()
- ? StringUtils.EMPTY : super.getAjaxIndicatorMarkupId();
- }
- }.setVisible(link.isEnabled(model.getObject())));
- break;
-
- case RELOAD:
- fragment = new Fragment("panelReload", "fragmentReload", this);
-
- fragment.addOrReplace(new IndicatingAjaxLink<Void>("reloadLink") {
-
- private static final long serialVersionUID = -6957616042924610293L;
-
- @Override
- public void onClick(final AjaxRequestTarget target) {
- link.onClick(target, model.getObject());
- }
-
- @Override
- public String getAjaxIndicatorMarkupId() {
- return disableIndicator || !link.isIndicatorEnabled()
- ? StringUtils.EMPTY : super.getAjaxIndicatorMarkupId();
- }
- }.setVisible(link.isEnabled(model.getObject())));
- break;
-
- case CHANGE_VIEW:
- fragment = new Fragment("panelChangeView", "fragmentChangeView", this);
-
- fragment.addOrReplace(new IndicatingAjaxLink<Void>("changeViewLink") {
-
- private static final long serialVersionUID = -6957616042924610292L;
-
- @Override
- public void onClick(final AjaxRequestTarget target) {
- link.onClick(target, model.getObject());
- }
-
- @Override
- public String getAjaxIndicatorMarkupId() {
- return disableIndicator || !link.isIndicatorEnabled()
- ? StringUtils.EMPTY : super.getAjaxIndicatorMarkupId();
- }
- }.setVisible(link.isEnabled(model.getObject())));
- break;
-
- case UNLINK:
- fragment = new Fragment("panelUnlink", "fragmentUnlink", this);
-
- fragment.addOrReplace(new IndicatingOnConfirmAjaxLink<Void>("unlinkLink", "confirmUnlink", enabled) {
-
- private static final long serialVersionUID = -6957616042924610293L;
-
- @Override
- public void onClick(final AjaxRequestTarget target) {
- link.onClick(target, model.getObject());
- }
-
- @Override
- public String getAjaxIndicatorMarkupId() {
- return disableIndicator || !link.isIndicatorEnabled()
- ? StringUtils.EMPTY : super.getAjaxIndicatorMarkupId();
- }
- }.setVisible(link.isEnabled(model.getObject())));
- break;
-
- case LINK:
- fragment = new Fragment("panelLink", "fragmentLink", this);
-
- fragment.addOrReplace(new IndicatingAjaxLink<Void>("linkLink") {
-
- private static final long serialVersionUID = -6957616042924610303L;
-
- @Override
- public void onClick(final AjaxRequestTarget target) {
- link.onClick(target, model.getObject());
- }
-
- @Override
- public String getAjaxIndicatorMarkupId() {
- return disableIndicator || !link.isIndicatorEnabled()
- ? StringUtils.EMPTY : super.getAjaxIndicatorMarkupId();
- }
- }.setVisible(link.isEnabled(model.getObject())));
- break;
-
- case UNASSIGN:
- fragment = new Fragment("panelUnassign", "fragmentUnassign", this);
-
- fragment.addOrReplace(
- new IndicatingOnConfirmAjaxLink<Void>("unassignLink", "confirmUnassign", enabled) {
-
- private static final long serialVersionUID = -6957616042924610294L;
-
- @Override
- public void onClick(final AjaxRequestTarget target) {
- link.onClick(target, model.getObject());
- }
-
- @Override
- public String getAjaxIndicatorMarkupId() {
- return disableIndicator || !link.isIndicatorEnabled()
- ? StringUtils.EMPTY : super.getAjaxIndicatorMarkupId();
- }
- }.setVisible(link.isEnabled(model.getObject())));
- break;
-
- case ASSIGN:
- fragment = new Fragment("panelAssign", "fragmentAssign", this);
-
- fragment.addOrReplace(new IndicatingAjaxLink<Void>("assignLink") {
-
- private static final long serialVersionUID = -6957616042924610304L;
-
- @Override
- public void onClick(final AjaxRequestTarget target) {
- link.onClick(target, model.getObject());
- }
-
- @Override
- public String getAjaxIndicatorMarkupId() {
- return disableIndicator || !link.isIndicatorEnabled()
- ? StringUtils.EMPTY : super.getAjaxIndicatorMarkupId();
- }
- }.setVisible(link.isEnabled(model.getObject())));
- break;
-
- case DEPROVISION:
- fragment = new Fragment("panelDeprovision", "fragmentDeprovision", this);
-
- fragment.addOrReplace(new IndicatingAjaxLink<Void>("deprovisionLink") {
-
- private static final long serialVersionUID = -6957616042924610295L;
-
- @Override
- public void onClick(final AjaxRequestTarget target) {
- link.onClick(target, model.getObject());
- }
-
- @Override
- public String getAjaxIndicatorMarkupId() {
- return disableIndicator || !link.isIndicatorEnabled()
- ? StringUtils.EMPTY : super.getAjaxIndicatorMarkupId();
- }
- }.setVisible(link.isEnabled(model.getObject())));
- break;
-
- case PROVISION:
- fragment = new Fragment("panelProvision", "fragmentProvision", this);
-
- fragment.addOrReplace(new IndicatingAjaxLink<Void>("provisionLink") {
-
- private static final long serialVersionUID = -1876519166660008562L;
-
- @Override
- public void onClick(final AjaxRequestTarget target) {
- link.onClick(target, model.getObject());
- }
-
- @Override
- public String getAjaxIndicatorMarkupId() {
- return disableIndicator || !link.isIndicatorEnabled()
- ? StringUtils.EMPTY : super.getAjaxIndicatorMarkupId();
- }
- }.setVisible(link.isEnabled(model.getObject())));
- break;
-
- case DEPROVISION_MEMBERS:
- fragment = new Fragment("panelDeprovisionMembers", "fragmentDeprovisionMembers", this);
-
- fragment.addOrReplace(new IndicatingAjaxLink<Void>("deprovisionMembersLink") {
-
- private static final long serialVersionUID = -6957616042924610295L;
-
- @Override
- public void onClick(final AjaxRequestTarget target) {
- link.onClick(target, model.getObject());
- }
-
- @Override
- public String getAjaxIndicatorMarkupId() {
- return disableIndicator || !link.isIndicatorEnabled()
- ? StringUtils.EMPTY : super.getAjaxIndicatorMarkupId();
- }
- }.setVisible(link.isEnabled(model.getObject())));
- break;
-
- case PROVISION_MEMBERS:
- fragment = new Fragment("panelProvisionMembers", "fragmentProvisionMembers", this);
-
- fragment.addOrReplace(new IndicatingAjaxLink<Void>("provisionMembersLink") {
-
- private static final long serialVersionUID = -1876519166660008562L;
-
- @Override
- public void onClick(final AjaxRequestTarget target) {
- link.onClick(target, model.getObject());
- }
-
- @Override
- public String getAjaxIndicatorMarkupId() {
- return disableIndicator || !link.isIndicatorEnabled()
- ? StringUtils.EMPTY : super.getAjaxIndicatorMarkupId();
- }
- }.setVisible(link.isEnabled(model.getObject())));
- break;
-
- case PROPAGATION_TASKS:
- fragment = new Fragment("panelPropagationTasks", "fragmentPropagationTasks", this);
-
- fragment.addOrReplace(new IndicatingAjaxLink<Void>("propagationTasksLink") {
-
- private static final long serialVersionUID = -1876519166660008562L;
-
- @Override
- public void onClick(final AjaxRequestTarget target) {
- link.onClick(target, model.getObject());
- }
-
- @Override
- public String getAjaxIndicatorMarkupId() {
- return disableIndicator || !link.isIndicatorEnabled()
- ? StringUtils.EMPTY : super.getAjaxIndicatorMarkupId();
- }
- }.setVisible(link.isEnabled(model.getObject())));
- break;
-
- case NOTIFICATION_TASKS:
- fragment = new Fragment("panelNotificationTasks", "fragmentNotificationTasks", this);
-
- fragment.addOrReplace(new IndicatingAjaxLink<Void>("notificationTasksLink") {
-
- private static final long serialVersionUID = -1876519166660008562L;
-
- @Override
- public void onClick(final AjaxRequestTarget target) {
- link.onClick(target, model.getObject());
- }
-
- @Override
- public String getAjaxIndicatorMarkupId() {
- return disableIndicator || !link.isIndicatorEnabled()
- ? StringUtils.EMPTY : super.getAjaxIndicatorMarkupId();
- }
- }.setVisible(link.isEnabled(model.getObject())));
- break;
-
- case ZOOM_IN:
- fragment = new Fragment("panelZoomIn", "fragmentZoomIn", this);
-
- fragment.addOrReplace(new IndicatingAjaxLink<Void>("zoomInLink") {
-
- private static final long serialVersionUID = -6957616042924610305L;
-
- @Override
- public void onClick(final AjaxRequestTarget target) {
- link.onClick(target, model.getObject());
- }
-
- @Override
- public String getAjaxIndicatorMarkupId() {
- return disableIndicator || !link.isIndicatorEnabled()
- ? StringUtils.EMPTY : super.getAjaxIndicatorMarkupId();
- }
- }.setVisible(link.isEnabled(model.getObject())));
- break;
-
- case ZOOM_OUT:
- fragment = new Fragment("panelZoomOut", "fragmentZoomOut", this);
-
- fragment.addOrReplace(new IndicatingAjaxLink<Void>("zoomOutLink") {
-
- private static final long serialVersionUID = -6957616042924610305L;
-
- @Override
- public void onClick(final AjaxRequestTarget target) {
- link.onClick(target, model.getObject());
- }
-
- @Override
- public String getAjaxIndicatorMarkupId() {
- return disableIndicator || !link.isIndicatorEnabled()
- ? StringUtils.EMPTY : super.getAjaxIndicatorMarkupId();
- }
- }.setVisible(link.isEnabled(model.getObject())));
- break;
-
- case WORKFLOW_MODELER:
- fragment = new Fragment("panelWorkflowModeler", "fragmentWorkflowModeler", this);
-
- fragment.addOrReplace(new BookmarkablePageLink<>(
- "workflowModelerLink", link.getPageClass(), link.getPageParameters()).
- setPopupSettings(new VeilPopupSettings().setHeight(600).setWidth(800)).
- setVisible(link.isEnabled(model.getObject())));
- break;
-
- default:
- // do nothing
- }
-
- if (fragment != null) {
- fragment.setEnabled(enabled);
- if (StringUtils.isNotBlank(entitlements)) {
- MetaDataRoleAuthorizationStrategy.authorize(fragment, RENDER, entitlements);
- }
- super.addOrReplace(fragment);
- }
-
- return this;
- }
-
- public void remove(final ActionLink.ActionType type) {
- switch (type) {
- case CLAIM:
- super.addOrReplace(new Fragment("panelClaim", "emptyFragment", this));
- break;
-
- case MANAGE_RESOURCES:
- super.addOrReplace(new Fragment("panelManageResources", "emptyFragment", this));
- break;
-
- case MANAGE_USERS:
- super.addOrReplace(new Fragment("panelManageUsers", "emptyFragment", this));
- break;
-
- case MANAGE_GROUPS:
- super.addOrReplace(new Fragment("panelManageGroups", "emptyFragment", this));
- break;
-
- case MAPPING:
- super.addOrReplace(new Fragment("panelMapping", "emptyFragment", this));
- break;
-
- case MUSTCHANGEPASSWORD:
- super.addOrReplace(new Fragment("panelMustChangePassword", "emptyFragment", this));
- break;
-
- case SET_LATEST_SYNC_TOKEN:
- super.addOrReplace(new Fragment("panelSetLatestSyncToken", "emptyFragment", this));
- break;
-
- case REMOVE_SYNC_TOKEN:
- super.addOrReplace(new Fragment("panelRemoveSyncToken", "emptyFragment", this));
- break;
-
- case CLONE:
- super.addOrReplace(new Fragment("panelClone", "emptyFragment", this));
- break;
-
- case CREATE:
- super.addOrReplace(new Fragment("panelCreate", "emptyFragment", this));
- break;
-
- case COMPOSE:
- super.addOrReplace(new Fragment("panelCompose", "emptyFragment", this));
- break;
-
- case TEMPLATE:
- super.addOrReplace(new Fragment("panelTemplate", "emptyFragment", this));
- break;
-
- case EDIT:
- super.addOrReplace(new Fragment("panelEdit", "emptyFragment", this));
- break;
-
- case FO_EDIT:
- super.addOrReplace(new Fragment("panelFoEdit", "emptyFragment", this));
- break;
-
- case HTML:
- super.addOrReplace(new Fragment("panelHtml", "emptyFragment", this));
- break;
-
- case TEXT:
- super.addOrReplace(new Fragment("panelTestEdit", "emptyFragment", this));
- break;
-
- case VIEW:
- super.addOrReplace(new Fragment("panelView", "emptyFragment", this));
- break;
-
- case MEMBERS:
- super.addOrReplace(new Fragment("panelMembers", "emptyFragment", this));
- break;
-
- case SEARCH:
- super.addOrReplace(new Fragment("panelSearch", "emptyFragment", this));
- break;
-
- case EXECUTE:
- super.addOrReplace(new Fragment("panelExecute", "emptyFragment", this));
- break;
-
- case PASSWORD_RESET:
- super.addOrReplace(new Fragment("panelPasswordReset", "emptyFragment", this));
- break;
-
- case DRYRUN:
- super.addOrReplace(new Fragment("panelDryRun", "emptyFragment", this));
- break;
-
- case DELETE:
- super.addOrReplace(new Fragment("panelDelete", "emptyFragment", this));
- break;
-
- case SELECT:
- super.addOrReplace(new Fragment("panelSelect", "emptyFragment", this));
- break;
-
- case CLOSE:
- super.addOrReplace(new Fragment("panelClose", "emptyFragment", this));
- break;
-
- case EXPORT:
- super.addOrReplace(new Fragment("panelExport", "emptyFragment", this));
- break;
-
- case EXPORT_CSV:
- super.addOrReplace(new Fragment("panelExportCSV", "emptyFragment", this));
- break;
-
- case EXPORT_HTML:
- super.addOrReplace(new Fragment("panelExportHTML", "emptyFragment", this));
- break;
-
- case EXPORT_PDF:
- super.addOrReplace(new Fragment("panelExportPDF", "emptyFragment", this));
- break;
-
- case EXPORT_RTF:
- super.addOrReplace(new Fragment("panelExportRTF", "emptyFragment", this));
- break;
- case EXPORT_XML:
- super.addOrReplace(new Fragment("panelExportXML", "emptyFragment", this));
- break;
-
- case SUSPEND:
- super.addOrReplace(new Fragment("panelSuspend", "emptyFragment", this));
- break;
-
- case REACTIVATE:
- super.addOrReplace(new Fragment("panelReactivate", "emptyFragment", this));
- break;
-
- case RELOAD:
- super.addOrReplace(new Fragment("panelReload", "emptyFragment", this));
- break;
-
- case CHANGE_VIEW:
- super.addOrReplace(new Fragment("panelChangeView", "emptyFragment", this));
- break;
-
- case UNLINK:
- super.addOrReplace(new Fragment("panelUnlink", "emptyFragment", this));
- break;
-
- case LINK:
- super.addOrReplace(new Fragment("panelLink", "emptyFragment", this));
- break;
-
- case UNASSIGN:
- super.addOrReplace(new Fragment("panelUnassign", "emptyFragment", this));
- break;
-
- case ASSIGN:
- super.addOrReplace(new Fragment("panelAssign", "emptyFragment", this));
- break;
-
- case DEPROVISION:
- super.addOrReplace(new Fragment("panelDeprovision", "emptyFragment", this));
- break;
-
- case PROVISION:
- super.addOrReplace(new Fragment("panelProvision", "emptyFragment", this));
- break;
-
- case PROPAGATION_TASKS:
- super.addOrReplace(new Fragment("panelPropagationTasks", "emptyFragment", this));
- break;
-
- case NOTIFICATION_TASKS:
- super.addOrReplace(new Fragment("panelNotificationTasks", "emptyFragment", this));
- break;
-
- case ZOOM_IN:
- super.addOrReplace(new Fragment("panelZoomIn", "emptyFragment", this));
- break;
-
- case ZOOM_OUT:
- super.addOrReplace(new Fragment("panelZoomOut", "emptyFragment", this));
- break;
-
- case WORKFLOW_MODELER:
- super.addOrReplace(new Fragment("panelWorkflowModelert", "emptyFragment", this));
- break;
-
- default:
- // do nothing
- }
- }
-
- private ActionLinksPanel<T> setDisableIndicator(final boolean disableIndicator) {
- this.disableIndicator = disableIndicator;
- return this;
- }
-
- public static <T extends Serializable> Builder<T> builder() {
- return new Builder<>();
- }
-
- /**
- * ActionLinksPanel builder.
- *
- * @param <T> model object type.
- */
- public static final class Builder<T extends Serializable> implements Serializable {
-
- private static final long serialVersionUID = 2998390938134582025L;
-
- private final Map<ActionLink.ActionType, Triple<ActionLink<T>, String, Boolean>> actions = new HashMap<>();
-
- private boolean disableIndicator = false;
-
- public Builder<T> setDisableIndicator(final boolean disableIndicator) {
- this.disableIndicator = disableIndicator;
- return this;
- }
-
- public Builder<T> add(final ActionLink<T> link, final ActionLink.ActionType type) {
- return addWithRoles(link, type, null, true);
- }
-
- public Builder<T> add(
- final ActionLink<T> link,
- final ActionLink.ActionType type,
- final String entitlements) {
-
- return addWithRoles(link, type, entitlements, true);
- }
-
- public Builder<T> add(
- final ActionLink<T> link,
- final ActionLink.ActionType type,
- final String entitlement,
- final boolean enabled) {
-
- return addWithRoles(link, type, entitlement, enabled);
- }
-
- public Builder<T> addWithRoles(
- final ActionLink<T> link,
- final ActionLink.ActionType type,
- final String entitlements) {
-
- return addWithRoles(link, type, entitlements, true);
- }
-
- public Builder<T> addWithRoles(
- final ActionLink<T> link,
- final ActionLink.ActionType type,
- final String entitlements,
- final boolean enabled) {
- actions.put(type, Triple.of(link, entitlements, enabled));
- return this;
- }
-
- /**
- * Use this method to build an ation panel without any model reference.
- *
- * @param id Component id.
- * @return Action link panel.
- */
- public ActionLinksPanel<T> build(final String id) {
- return build(id, null);
- }
-
- /**
- * Use this methos to build an action panel including a model reference.
- *
- * @param id Component id.
- * @param modelObject model object.
- * @return Action link panel.
- */
- public ActionLinksPanel<T> build(final String id, final T modelObject) {
- final ActionLinksPanel<T> panel = modelObject == null
- ? new ActionLinksPanel<>(id, new Model<T>())
- : new ActionLinksPanel<>(id, new Model<>(modelObject));
-
- panel.setDisableIndicator(disableIndicator);
-
- for (Entry<ActionLink.ActionType, Triple<ActionLink<T>, String, Boolean>> action : actions.entrySet()) {
- panel.add(
- action.getValue().getLeft(),
- action.getKey(),
- action.getValue().getMiddle(),
- action.getValue().getRight());
- }
- return panel;
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/ActionLinksTogglePanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/ActionLinksTogglePanel.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/ActionLinksTogglePanel.java
new file mode 100644
index 0000000..70f674c
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/ActionLinksTogglePanel.java
@@ -0,0 +1,129 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.client.console.wicket.markup.html.form;
+
+import de.agilecoders.wicket.core.markup.html.bootstrap.dialog.Modal;
+import java.io.Serializable;
+import java.util.UUID;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.syncope.client.console.commons.status.StatusBean;
+import org.apache.syncope.client.console.panels.TogglePanel;
+import org.apache.syncope.client.console.policies.PolicyRuleDirectoryPanel.PolicyRuleWrapper;
+import org.apache.syncope.client.console.reports.ReportletDirectoryPanel.ReportletWrapper;
+import org.apache.syncope.common.lib.to.AnyObjectTO;
+import org.apache.syncope.common.lib.to.EntityTO;
+import org.apache.syncope.common.lib.to.GroupTO;
+import org.apache.syncope.common.lib.to.ReportTO;
+import org.apache.syncope.common.lib.to.UserTO;
+import org.apache.syncope.common.lib.to.AttrTO;
+import org.apache.syncope.common.lib.to.SecurityQuestionTO;
+import org.apache.syncope.common.lib.policy.AbstractPolicyTO;
+import org.apache.syncope.common.lib.to.AccessTokenTO;
+import org.apache.syncope.common.lib.to.ExecTO;
+import org.apache.syncope.common.lib.to.WorkflowDefinitionTO;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.panel.Fragment;
+import org.apache.wicket.model.ResourceModel;
+
+public class ActionLinksTogglePanel<T extends Serializable> extends TogglePanel<Serializable> {
+
+ private static final long serialVersionUID = -2025535531121434056L;
+
+ private final WebMarkupContainer container;
+
+ public ActionLinksTogglePanel(final String id, final PageReference pageRef) {
+ super(id, UUID.randomUUID().toString(), pageRef);
+
+ modal.size(Modal.Size.Large);
+ setFooterVisibility(false);
+
+ container = new WebMarkupContainer("container");
+ container.setOutputMarkupPlaceholderTag(true);
+ addInnerObject(container);
+
+ container.add(getEmptyFragment());
+ }
+
+ public void toggleWithContent(
+ final AjaxRequestTarget target, final ActionsPanel<T> actionsPanel, final T modelObject) {
+ final String header;
+ if (modelObject == null) {
+ header = new ResourceModel("actions", StringUtils.EMPTY).getObject();
+ } else if (modelObject instanceof UserTO) {
+ header = ((UserTO) modelObject).getUsername();
+ } else if (modelObject instanceof GroupTO) {
+ header = ((GroupTO) modelObject).getName();
+ } else if (modelObject instanceof ReportTO) {
+ header = ((ReportTO) modelObject).getName();
+ } else if (modelObject instanceof AnyObjectTO) {
+ header = ((AnyObjectTO) modelObject).getName();
+ } else if (modelObject instanceof AttrTO) {
+ header = ((AttrTO) modelObject).getSchema();
+ } else if (modelObject instanceof AbstractPolicyTO) {
+ header = ((AbstractPolicyTO) modelObject).getDescription();
+ } else if (modelObject instanceof SecurityQuestionTO) {
+ header = ((SecurityQuestionTO) modelObject).getContent();
+ } else if (modelObject instanceof AccessTokenTO) {
+ header = ((AccessTokenTO) modelObject).getOwner();
+ } else if (modelObject instanceof ExecTO) {
+ header = ((ExecTO) modelObject).getRefDesc();
+ } else if (modelObject instanceof WorkflowDefinitionTO) {
+ header = ((WorkflowDefinitionTO) modelObject).getName();
+ } else if (modelObject instanceof EntityTO) {
+ header = ((EntityTO) modelObject).getKey();
+ } else if (modelObject instanceof StatusBean) {
+ header = ((StatusBean) modelObject).getResourceName();
+ } else if (modelObject instanceof PolicyRuleWrapper) {
+ header = ((PolicyRuleWrapper) modelObject).getName();
+ } else if (modelObject instanceof PolicyRuleWrapper) {
+ header = ((PolicyRuleWrapper) modelObject).getName();
+ } else if (modelObject instanceof ReportletWrapper) {
+ header = ((ReportletWrapper) modelObject).getName();
+ } else {
+ header = new ResourceModel("actions", StringUtils.EMPTY).getObject();
+ }
+ setHeader(target, StringUtils.abbreviate(header, 25));
+
+ 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);
+
+ this.toggle(target, true);
+ }
+
+ private Fragment getEmptyFragment() {
+ return new Fragment("actions", "emptyFragment", this);
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/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
new file mode 100644
index 0000000..a3c9aef
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/ActionPanel.java
@@ -0,0 +1,160 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.client.console.wicket.markup.html.form;
+
+import java.io.Serializable;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink.ActionType;
+import org.apache.wicket.AttributeModifier;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.markup.html.AjaxLink;
+import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxLink;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.panel.Panel;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.ResourceModel;
+
+/**
+ * This empty class must exist because there not seems to be alternative to provide specialized HTML for edit links.
+ *
+ * @param <T> model object type.
+ */
+public final class ActionPanel<T extends Serializable> extends Panel {
+
+ private static final long serialVersionUID = 322966537010107771L;
+
+ private final Label actionIcon;
+
+ private final Label actionLabel;
+
+ private boolean disableIndicator = false;
+
+ public ActionPanel(final IModel<T> model, final Action<T> action) {
+ this("action", model, action);
+ }
+
+ public ActionPanel(final String componentId, final IModel<T> model, final Action<T> action) {
+ super(componentId);
+ setOutputMarkupId(true);
+
+ final T obj;
+ if (model == null) {
+ obj = null;
+ } else {
+ obj = model.getObject();
+ }
+
+ final boolean enabled;
+ final AjaxLink<Void> actionLink;
+
+ if (action.getLink() == null || action.getType() == ActionType.NOT_FOUND) {
+ enabled = true;
+ actionLink = new IndicatingAjaxLink<Void>("action") {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public boolean isEnabled() {
+ return false;
+ }
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ }
+ };
+ } else {
+ enabled = action.getLink().isEnabled(obj);
+
+ actionLink = action.isOnConfirm()
+ ? new IndicatingOnConfirmAjaxLink<Void>("action", enabled) {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ action.getLink().onClick(target, obj);
+ }
+
+ @Override
+ public String getAjaxIndicatorMarkupId() {
+ return disableIndicator || !action.getLink().isIndicatorEnabled()
+ ? StringUtils.EMPTY : super.getAjaxIndicatorMarkupId();
+ }
+ }
+ : new IndicatingAjaxLink<Void>("action") {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ action.getLink().onClick(target, obj);
+ }
+
+ @Override
+ public String getAjaxIndicatorMarkupId() {
+ return disableIndicator || !action.getLink().isIndicatorEnabled()
+ ? StringUtils.EMPTY : super.getAjaxIndicatorMarkupId();
+ }
+ };
+ }
+
+ actionLink.setVisible(enabled);
+
+ actionIcon = new Label("actionIcon", "");
+ actionLink.add(actionIcon);
+
+ final String clazz = action.getType().name().toLowerCase() + ".class";
+ actionIcon.add(new AttributeModifier("class", new ResourceModel(clazz, clazz)));
+
+ final String title = action.getType().name().toLowerCase() + ".title";
+ final IModel<String> titleModel = new ResourceModel(title, title);
+ actionIcon.add(new AttributeModifier("title", titleModel));
+
+ final String alt = action.getType().name().toLowerCase() + ".alt";
+ actionIcon.add(new AttributeModifier("alt", new ResourceModel(alt, alt)));
+
+ actionLabel = new Label("label", titleModel);
+ actionLink.add(actionLabel);
+ add(actionLink);
+
+ // ---------------------------
+ // Action configuration
+ // ---------------------------
+ actionLabel.setVisible(action.isVisibleLabel());
+
+ if (action.getLabel() != null) {
+ actionLabel.setDefaultModel(action.getLabel());
+ }
+
+ if (action.getTitle() != null) {
+ actionIcon.add(new AttributeModifier("title", action.getTitle()));
+ }
+
+ if (action.getAlt() != null) {
+ actionIcon.add(new AttributeModifier("alt", action.getAlt()));
+ }
+
+ if (action.getIcon() != null) {
+ actionIcon.add(new AttributeModifier("class", action.getIcon()));
+ }
+
+ this.disableIndicator = !action.hasIndicator();
+ // ---------------------------
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/ActionsPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/ActionsPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/ActionsPanel.java
new file mode 100644
index 0000000..6c26aa9
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/ActionsPanel.java
@@ -0,0 +1,88 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.client.console.wicket.markup.html.form;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.wicket.markup.html.list.ListItem;
+import org.apache.wicket.markup.html.list.ListView;
+import org.apache.wicket.markup.html.panel.Panel;
+import org.apache.wicket.model.IModel;
+
+/**
+ * This empty class must exist because there not seems to be alternative to provide specialized HTML for edit links.
+ *
+ * @param <T> model object type.
+ */
+public final class ActionsPanel<T extends Serializable> extends Panel {
+
+ private static final long serialVersionUID = 322966537010107771L;
+
+ private final List<Action<T>> actions = new ArrayList<>();
+
+ private IModel<T> model;
+
+ public ActionsPanel(final String componentId, final IModel<T> model) {
+ super(componentId, model);
+ setOutputMarkupId(true);
+ this.model = model;
+
+ add(new ListView<Action<T>>("actionRepeater", actions) {
+
+ private static final long serialVersionUID = -9180479401817023838L;
+
+ @Override
+ protected void populateItem(final ListItem<Action<T>> item) {
+ item.add(new ActionPanel<T>(ActionsPanel.this.model, item.getModelObject()));
+ }
+
+ }.setRenderBodyOnly(true));
+ }
+
+ public Action<T> add(
+ final ActionLink<T> link,
+ final ActionLink.ActionType type,
+ final String entitlements) {
+ return add(link, type, entitlements, false);
+ }
+
+ public Action<T> add(
+ final ActionLink<T> link,
+ final ActionLink.ActionType type,
+ final String entitlements,
+ final boolean onConfirm) {
+
+ final Action<T> action = new Action<>(link, type);
+ action.setEntitlements(entitlements);
+ action.setOnConfirm(onConfirm);
+ actions.add(action);
+ return action;
+ }
+
+ public ActionsPanel<T> clone(final String componentId, final IModel<T> model) {
+ final ActionsPanel<T> panel = new ActionsPanel<>(componentId, model);
+ panel.actions.addAll(actions);
+ return panel;
+ }
+
+ public boolean isEmpty() {
+ return this.actions.isEmpty();
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/java/org/apache/syncope/client/console/widgets/JobWidget.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/widgets/JobWidget.java b/client/console/src/main/java/org/apache/syncope/client/console/widgets/JobWidget.java
index 1129ea6..7eaac21 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/widgets/JobWidget.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/widgets/JobWidget.java
@@ -37,12 +37,11 @@ import org.apache.syncope.client.console.rest.NotificationRestClient;
import org.apache.syncope.client.console.rest.ReportRestClient;
import org.apache.syncope.client.console.rest.TaskRestClient;
import org.apache.syncope.client.console.wicket.ajax.IndicatorAjaxTimerBehavior;
-import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.ActionColumn;
import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.BooleanPropertyColumn;
import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.DatePropertyColumn;
import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
-import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionsPanel;
import org.apache.syncope.client.console.wizards.WizardMgtPanel;
import org.apache.syncope.common.lib.to.ExecTO;
import org.apache.syncope.common.lib.to.JobTO;
@@ -379,8 +378,8 @@ public class JobWidget extends BaseWidget {
}
}
- private class RecentExecPanel extends DirectoryPanel<
- ExecTO, ExecTO, RecentExecProvider, BaseRestClient> {
+ private class RecentExecPanel
+ extends DirectoryPanel<ExecTO, ExecTO, RecentExecPanel.RecentExecProvider, BaseRestClient> {
private static final long serialVersionUID = -8214546246301342868L;
@@ -426,81 +425,58 @@ public class JobWidget extends BaseWidget {
columns.add(new PropertyColumn<ExecTO, String>(new ResourceModel("status"), "status", "status"));
- columns.add(new ActionColumn<ExecTO, String>(new ResourceModel("actions")) {
-
- private static final long serialVersionUID = -3503023501954863131L;
-
- @Override
- public ActionLinksPanel<ExecTO> getActions(final String componentId, final IModel<ExecTO> model) {
-
- final ActionLinksPanel.Builder<ExecTO> panel = ActionLinksPanel.<ExecTO>builder().
- add(new ActionLink<ExecTO>() {
+ return columns;
+ }
- private static final long serialVersionUID = -3722207913631435501L;
+ @Override
+ public ActionsPanel<ExecTO> getActions(final IModel<ExecTO> model) {
+ final ActionsPanel<ExecTO> panel = super.getActions(model);
- @Override
- public void onClick(final AjaxRequestTarget target, final ExecTO ignore) {
+ panel.add(new ActionLink<ExecTO>() {
- StringResourceModel stringResourceModel =
- new StringResourceModel("execution.view", JobWidget.this, model);
- detailModal.header(stringResourceModel);
- detailModal.setContent(new ExecMessageModal(model.getObject().getMessage()));
- detailModal.show(true);
- target.add(detailModal);
- }
- }, ActionLink.ActionType.VIEW, StandardEntitlement.TASK_READ);
- return panel.build(componentId, model.getObject());
- }
+ private static final long serialVersionUID = -3722207913631435501L;
@Override
- public ActionLinksPanel<Serializable> getHeader(final String componentId) {
- final ActionLinksPanel.Builder<Serializable> panel = ActionLinksPanel.builder();
-
- return panel.add(new ActionLink<Serializable>() {
-
- private static final long serialVersionUID = -7978723352517770644L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final Serializable ignore) {
- if (target != null) {
- target.add(container);
- }
- }
- }, ActionLink.ActionType.RELOAD, StandardEntitlement.TASK_LIST).build(componentId);
+ public void onClick(final AjaxRequestTarget target, final ExecTO ignore) {
+
+ StringResourceModel stringResourceModel = new StringResourceModel("execution.view", JobWidget.this,
+ model);
+ detailModal.header(stringResourceModel);
+ detailModal.setContent(new ExecMessageModal(model.getObject().getMessage()));
+ detailModal.show(true);
+ target.add(detailModal);
}
- });
-
- return columns;
+ }, ActionLink.ActionType.VIEW, StandardEntitlement.TASK_READ);
+ return panel;
}
- }
-
- protected final class RecentExecProvider extends DirectoryDataProvider<ExecTO> {
+ protected final class RecentExecProvider extends DirectoryDataProvider<ExecTO> {
- private static final long serialVersionUID = 2835707012690698633L;
+ private static final long serialVersionUID = 2835707012690698633L;
- private final SortableDataProviderComparator<ExecTO> comparator;
+ private final SortableDataProviderComparator<ExecTO> comparator;
- private RecentExecProvider() {
- super(ROWS);
- setSort("end", SortOrder.DESCENDING);
- comparator = new SortableDataProviderComparator<>(this);
- }
+ private RecentExecProvider() {
+ super(ROWS);
+ setSort("end", SortOrder.DESCENDING);
+ comparator = new SortableDataProviderComparator<>(this);
+ }
- @Override
- public Iterator<ExecTO> iterator(final long first, final long count) {
- Collections.sort(recent, comparator);
- return recent.subList((int) first, (int) first + (int) count).iterator();
- }
+ @Override
+ public Iterator<ExecTO> iterator(final long first, final long count) {
+ Collections.sort(recent, comparator);
+ return recent.subList((int) first, (int) first + (int) count).iterator();
+ }
- @Override
- public long size() {
- return recent.size();
- }
+ @Override
+ public long size() {
+ return recent.size();
+ }
- @Override
- public IModel<ExecTO> model(final ExecTO object) {
- return new CompoundPropertyModel<>(object);
+ @Override
+ public IModel<ExecTO> model(final ExecTO object) {
+ return new CompoundPropertyModel<>(object);
+ }
}
}
}
[03/10] syncope git commit: [SYNCOPE-1047] Replaces ActionLinksPanel
with TogglePanel
Posted by fm...@apache.org.
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/ActionsPanel.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/ActionsPanel.properties b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/ActionsPanel.properties
new file mode 100644
index 0000000..79692d8
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/ActionsPanel.properties
@@ -0,0 +1,223 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+mapping.class=fa fa-exchange
+mapping.title=mapping
+mapping.alt=mapping icon
+
+mustchangepassword.class=fa fa-lock
+mustchangepassword.title=set must change password
+mustchangepassword.alt=must change password icon
+
+set_latest_sync_token.class=fa fa-hourglass-start
+set_latest_sync_token.title=set last sync token
+set_latest_sync_token.alt=set last sync token icon
+
+remove_sync_token.class=fa fa-hourglass-o
+remove_sync_token.title=remove sync token
+remove_sync_token.alt=remove sync token icon
+
+clone.class=fa fa-clone
+clone.title=clone
+clone.alt=clone icon
+
+create.class=glyphicon glyphicon-plus
+create.title=create
+create.alt=create icon
+
+template.class=fa fa-list-alt
+template.title=template
+template.alt=template icon
+
+edit.class=glyphicon glyphicon-pencil
+edit.title=edit
+edit.alt=edit icon
+
+type_extensions.class=fa fa-expand
+type_extensions.title=extensions
+type_extensions.alt=extensions icon
+
+fo_edit.class=fa fa-file-code-o
+fo_edit.title=fo
+fo_edit.alt=fo icon
+
+html.class=fa fa-file-code-o
+html.title=html
+html.alt=html icon
+
+text.class=fa fa-file-text-o
+text.title=text
+text.alt=text icon
+
+compose.class=fa fa-puzzle-piece
+compose.title=compose
+compose.alt=compose icon
+
+layout_edit.class=fa fa-object-ungroup
+layout_edit.title=layout
+layout_edit.alt=layout icon
+
+reset.class=fa fa-shield
+reset.title=reset
+reset.alt=reset icon
+
+enable.class=fa fa-toggle-on
+enable.title=enable
+enable.alt=enable icon
+
+not_found.class=fa fa-eye-slash
+not_found.title=not found
+not_found.alt=not found icon
+
+view.class=fa fa-eye
+view.title=view
+view.alt=view icon
+
+members.class=fa fa-users
+members.title=members
+members.alt=members icon
+
+search.class=glyphicon glyphicon-search
+search.title=search
+search.alt=search icon
+
+delete.class=glyphicon glyphicon-minus
+delete.title=delete
+delete.alt=delete icon
+
+execute.class=fa fa-gear
+execute.title=execute
+execute.alt=execute icon
+
+password_reset.class=fa fa-shield
+password_reset.title=password reset
+password_reset.alt=password reset icon
+
+dryrun.class=fa fa-gears
+dryrun.title=dry-run
+dryrun.alt=dry-run icon
+
+claim.class=fa fa-ticket
+claim.title=claim
+claim.alt=claim icon
+
+select.class=glyphicon glyphicon-ok
+select.title=select
+select.alt=select icon
+
+close.class=fa fa-sign-out
+close.title=close
+close.alt=close icon
+
+export.class=fa fa-floppy-o
+export.title=export
+export.alt=export icon
+
+export_csv.class=fa fa-file-text-o
+export_csv.title=export as csv
+export_csv.alt=export as csv icon
+
+export_html.class=fa fa-file-code-o
+export_html.title=export as html
+export_html.alt=export as html icon
+
+export_pdf.class=fa fa-file-pdf-o
+export_pdf.title=export as pdf
+export_pdf.alt=export as pdf icon
+
+export_rtf.class=fa fa-file-word-o
+export_rtf.title=export as rtf
+export_rtf.alt=export as rtf icon
+
+export_xml.class=fa fa-file-excel-o
+export_xml.title=export as xml
+export_xml.alt=export as xml icon
+
+suspend.class=glyphicon glyphicon-ban-circle
+suspend.title=suspend
+suspend.alt=suspend icon
+
+reactivate.class=glyphicon glyphicon-ok-sign
+reactivate.title=reactivate
+reactivate.alt=reactivate icon
+
+reload.class=fa fa-repeat
+reload.title=reload
+reload.alt=reload icon
+
+change_view.class=fa fa-list
+change_view.title=change view
+change_view.alt=change view icon
+
+unlink.class=fa fa-unlink
+unlink.title=unlink
+unlink.alt=unlink icon
+
+link.class=fa fa-link
+link.title=link
+link.alt=link icon
+
+unassign.class=glyphicon glyphicon-resize-full
+unassign.title=unassign
+unassign.alt=unassign icon
+
+assign.class=glyphicon glyphicon-resize-small
+assign.title=assign
+assign.alt=assign icon
+
+deprovision.class=glyphicon glyphicon-fast-backward
+deprovision.title=deprovision
+deprovision.alt=deprovision icon
+
+provision.class=glyphicon glyphicon-fast-forward
+provision.title=provision
+provision.alt=provision icon
+
+deprovision_members.class=glyphicon glyphicon-fast-backward
+deprovision_members.title=deprovision members
+deprovision_members.alt=deprovision members icon
+
+provision_members.class=glyphicon glyphicon-fast-forward
+provision_members.title=provision members
+provision_members.alt=provision members icon
+
+manage_resources.class=fa fa-sitemap
+manage_resources.title=manage resources
+manage_resources.alt=manage resources icon
+
+manage_users.class=fa fa-users
+manage_users.title=manage users
+manage_users.alt=manage users icon
+
+manage_groups.class=fa fa-users
+manage_groups.title=manage groups
+manage_groups.alt=manage groups icon
+
+propagation_tasks.class=fa fa-arrow-right
+propagation_tasks.title=propagation tasks
+propagation_tasks.alt=propagation tasks icon
+
+notification_tasks.class=fa fa-envelope-o
+notification_tasks.title=notification tasks
+notification_tasks.alt=notification tasks icon
+
+zoom_in.class=fa fa-search-plus
+zoom_in.title=zoom-in
+zoom_in.alt=zoom-in icon
+
+zoom_out.class=fa fa-search-minus
+zoom_out.title=zoom-out
+zoom_out.alt=zoom-out icon
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/ActionsPanel_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/ActionsPanel_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/ActionsPanel_it.properties
new file mode 100644
index 0000000..cffac92
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/ActionsPanel_it.properties
@@ -0,0 +1,223 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+mapping.class=fa fa-exchange
+mapping.title=mapping
+mapping.alt=mapping icon
+
+mustchangepassword.class=fa fa-lock
+mustchangepassword.title=set must change password
+mustchangepassword.alt=must change password icon
+
+set_latest_sync_token.class=fa fa-hourglass-start
+set_latest_sync_token.title=set last sync token
+set_latest_sync_token.alt=set last sync token icon
+
+remove_sync_token.class=fa fa-hourglass-o
+remove_sync_token.title=remove sync token
+remove_sync_token.alt=remove sync token icon
+
+clone.class=fa fa-clone
+clone.title=clone
+clone.alt=clone icon
+
+create.class=glyphicon glyphicon-plus
+create.title=create
+create.alt=create icon
+
+template.class=fa fa-list-alt
+template.title=template
+template.alt=template icon
+
+edit.class=glyphicon glyphicon-pencil
+edit.title=edit
+edit.alt=edit icon
+
+type_extensions.class=fa fa-expand
+type_extensions.title=extensions
+type_extensions.alt=extensions icon
+
+fo_edit.class=fa fa-file-code-o
+fo_edit.title=fo
+fo_edit.alt=fo icon
+
+html.class=fa fa-file-code-o
+html.title=html
+html.alt=html icon
+
+text.class=fa fa-file-text-o
+text.title=text
+text.alt=text icon
+
+compose.class=fa fa-puzzle-piece
+compose.title=compose
+compose.alt=compose icon
+
+layout_edit.class=fa fa-object-ungroup
+layout_edit.title=layout
+layout_edit.alt=layout icon
+
+reset.class=fa fa-shield
+reset.title=reset
+reset.alt=reset icon
+
+enable.class=fa fa-toggle-on
+enable.title=enable
+enable.alt=enable icon
+
+not_found.class=fa fa-eye-slash
+not_found.title=not found
+not_found.alt=not found icon
+
+view.class=fa fa-eye
+view.title=view
+view.alt=view icon
+
+members.class=fa fa-users
+members.title=members
+members.alt=members icon
+
+search.class=glyphicon glyphicon-search
+search.title=search
+search.alt=search icon
+
+delete.class=glyphicon glyphicon-minus
+delete.title=delete
+delete.alt=delete icon
+
+execute.class=fa fa-gear
+execute.title=execute
+execute.alt=execute icon
+
+password_reset.class=fa fa-shield
+password_reset.title=password reset
+password_reset.alt=password reset icon
+
+dryrun.class=fa fa-gears
+dryrun.title=dry-run
+dryrun.alt=dry-run icon
+
+claim.class=fa fa-ticket
+claim.title=claim
+claim.alt=claim icon
+
+select.class=glyphicon glyphicon-ok
+select.title=select
+select.alt=select icon
+
+close.class=fa fa-sign-out
+close.title=close
+close.alt=close icon
+
+export.class=fa fa-floppy-o
+export.title=export
+export.alt=export icon
+
+export_csv.class=fa fa-file-text-o
+export_csv.title=export as csv
+export_csv.alt=export as csv icon
+
+export_html.class=fa fa-file-code-o
+export_html.title=export as html
+export_html.alt=export as html icon
+
+export_pdf.class=fa fa-file-pdf-o
+export_pdf.title=export as pdf
+export_pdf.alt=export as pdf icon
+
+export_rtf.class=fa fa-file-word-o
+export_rtf.title=export as rtf
+export_rtf.alt=export as rtf icon
+
+export_xml.class=fa fa-file-excel-o
+export_xml.title=export as xml
+export_xml.alt=export as xml icon
+
+suspend.class=glyphicon glyphicon-ban-circle
+suspend.title=suspend
+suspend.alt=suspend icon
+
+reactivate.class=glyphicon glyphicon-ok-sign
+reactivate.title=reactivate
+reactivate.alt=reactivate icon
+
+reload.class=fa fa-repeat
+reload.title=reload
+reload.alt=reload icon
+
+change_view.class=fa fa-list"
+change_view.title=change view
+change_view.alt=change view icon
+
+unlink.class=fa fa-unlink
+unlink.title=unlink
+unlink.alt=unlink icon
+
+link.class=fa fa-link
+link.title=link
+link.alt=link icon
+
+unassign.class=glyphicon glyphicon-resize-full
+unassign.title=unassign
+unassign.alt=unassign icon
+
+assign.class=glyphicon glyphicon-resize-small
+assign.title=assign
+assign.alt=assign icon
+
+deprovision.class=glyphicon glyphicon-fast-backward
+deprovision.title=deprovision
+deprovision.alt=deprovision icon
+
+provision.class=glyphicon glyphicon-fast-forward
+provision.title=provision
+provision.alt=provision icon
+
+deprovision_members.class=glyphicon glyphicon-fast-backward
+deprovision_members.title=deprovision members
+deprovision_members.alt=deprovision members icon
+
+provision_members.class=glyphicon glyphicon-fast-forward
+provision_members.title=provision members
+provision_members.alt=provision members icon
+
+manage_resources.class=fa fa-sitemap
+manage_resources.title=manage resources
+manage_resources.alt=manage resources icon
+
+manage_users.class=fa fa-users
+manage_users.title=manage users
+manage_users.alt=manage users icon
+
+manage_groups.class=fa fa-users
+manage_groups.title=manage groups
+manage_groups.alt=manage groups icon
+
+propagation_tasks.class=fa fa-arrow-right
+propagation_tasks.title=propagation tasks
+propagation_tasks.alt=propagation tasks icon
+
+notification_tasks.class=fa fa-envelope-o
+notification_tasks.title=notification tasks
+notification_tasks.alt=notification tasks icon
+
+zoom_in.class=fa fa-search-plus
+zoom_in.title=zoom-in
+zoom_in.alt=zoom-in icon
+
+zoom_out.class=fa fa-search-minus
+zoom_out.title=zoom-out
+zoom_out.alt=zoom-out icon
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/ActionsPanel_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/ActionsPanel_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/ActionsPanel_pt_BR.properties
new file mode 100644
index 0000000..cffac92
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/ActionsPanel_pt_BR.properties
@@ -0,0 +1,223 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+mapping.class=fa fa-exchange
+mapping.title=mapping
+mapping.alt=mapping icon
+
+mustchangepassword.class=fa fa-lock
+mustchangepassword.title=set must change password
+mustchangepassword.alt=must change password icon
+
+set_latest_sync_token.class=fa fa-hourglass-start
+set_latest_sync_token.title=set last sync token
+set_latest_sync_token.alt=set last sync token icon
+
+remove_sync_token.class=fa fa-hourglass-o
+remove_sync_token.title=remove sync token
+remove_sync_token.alt=remove sync token icon
+
+clone.class=fa fa-clone
+clone.title=clone
+clone.alt=clone icon
+
+create.class=glyphicon glyphicon-plus
+create.title=create
+create.alt=create icon
+
+template.class=fa fa-list-alt
+template.title=template
+template.alt=template icon
+
+edit.class=glyphicon glyphicon-pencil
+edit.title=edit
+edit.alt=edit icon
+
+type_extensions.class=fa fa-expand
+type_extensions.title=extensions
+type_extensions.alt=extensions icon
+
+fo_edit.class=fa fa-file-code-o
+fo_edit.title=fo
+fo_edit.alt=fo icon
+
+html.class=fa fa-file-code-o
+html.title=html
+html.alt=html icon
+
+text.class=fa fa-file-text-o
+text.title=text
+text.alt=text icon
+
+compose.class=fa fa-puzzle-piece
+compose.title=compose
+compose.alt=compose icon
+
+layout_edit.class=fa fa-object-ungroup
+layout_edit.title=layout
+layout_edit.alt=layout icon
+
+reset.class=fa fa-shield
+reset.title=reset
+reset.alt=reset icon
+
+enable.class=fa fa-toggle-on
+enable.title=enable
+enable.alt=enable icon
+
+not_found.class=fa fa-eye-slash
+not_found.title=not found
+not_found.alt=not found icon
+
+view.class=fa fa-eye
+view.title=view
+view.alt=view icon
+
+members.class=fa fa-users
+members.title=members
+members.alt=members icon
+
+search.class=glyphicon glyphicon-search
+search.title=search
+search.alt=search icon
+
+delete.class=glyphicon glyphicon-minus
+delete.title=delete
+delete.alt=delete icon
+
+execute.class=fa fa-gear
+execute.title=execute
+execute.alt=execute icon
+
+password_reset.class=fa fa-shield
+password_reset.title=password reset
+password_reset.alt=password reset icon
+
+dryrun.class=fa fa-gears
+dryrun.title=dry-run
+dryrun.alt=dry-run icon
+
+claim.class=fa fa-ticket
+claim.title=claim
+claim.alt=claim icon
+
+select.class=glyphicon glyphicon-ok
+select.title=select
+select.alt=select icon
+
+close.class=fa fa-sign-out
+close.title=close
+close.alt=close icon
+
+export.class=fa fa-floppy-o
+export.title=export
+export.alt=export icon
+
+export_csv.class=fa fa-file-text-o
+export_csv.title=export as csv
+export_csv.alt=export as csv icon
+
+export_html.class=fa fa-file-code-o
+export_html.title=export as html
+export_html.alt=export as html icon
+
+export_pdf.class=fa fa-file-pdf-o
+export_pdf.title=export as pdf
+export_pdf.alt=export as pdf icon
+
+export_rtf.class=fa fa-file-word-o
+export_rtf.title=export as rtf
+export_rtf.alt=export as rtf icon
+
+export_xml.class=fa fa-file-excel-o
+export_xml.title=export as xml
+export_xml.alt=export as xml icon
+
+suspend.class=glyphicon glyphicon-ban-circle
+suspend.title=suspend
+suspend.alt=suspend icon
+
+reactivate.class=glyphicon glyphicon-ok-sign
+reactivate.title=reactivate
+reactivate.alt=reactivate icon
+
+reload.class=fa fa-repeat
+reload.title=reload
+reload.alt=reload icon
+
+change_view.class=fa fa-list"
+change_view.title=change view
+change_view.alt=change view icon
+
+unlink.class=fa fa-unlink
+unlink.title=unlink
+unlink.alt=unlink icon
+
+link.class=fa fa-link
+link.title=link
+link.alt=link icon
+
+unassign.class=glyphicon glyphicon-resize-full
+unassign.title=unassign
+unassign.alt=unassign icon
+
+assign.class=glyphicon glyphicon-resize-small
+assign.title=assign
+assign.alt=assign icon
+
+deprovision.class=glyphicon glyphicon-fast-backward
+deprovision.title=deprovision
+deprovision.alt=deprovision icon
+
+provision.class=glyphicon glyphicon-fast-forward
+provision.title=provision
+provision.alt=provision icon
+
+deprovision_members.class=glyphicon glyphicon-fast-backward
+deprovision_members.title=deprovision members
+deprovision_members.alt=deprovision members icon
+
+provision_members.class=glyphicon glyphicon-fast-forward
+provision_members.title=provision members
+provision_members.alt=provision members icon
+
+manage_resources.class=fa fa-sitemap
+manage_resources.title=manage resources
+manage_resources.alt=manage resources icon
+
+manage_users.class=fa fa-users
+manage_users.title=manage users
+manage_users.alt=manage users icon
+
+manage_groups.class=fa fa-users
+manage_groups.title=manage groups
+manage_groups.alt=manage groups icon
+
+propagation_tasks.class=fa fa-arrow-right
+propagation_tasks.title=propagation tasks
+propagation_tasks.alt=propagation tasks icon
+
+notification_tasks.class=fa fa-envelope-o
+notification_tasks.title=notification tasks
+notification_tasks.alt=notification tasks icon
+
+zoom_in.class=fa fa-search-plus
+zoom_in.title=zoom-in
+zoom_in.alt=zoom-in icon
+
+zoom_out.class=fa fa-search-minus
+zoom_out.title=zoom-out
+zoom_out.alt=zoom-out icon
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/ActionsPanel_ru.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/ActionsPanel_ru.properties b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/ActionsPanel_ru.properties
new file mode 100644
index 0000000..cffac92
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/ActionsPanel_ru.properties
@@ -0,0 +1,223 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+mapping.class=fa fa-exchange
+mapping.title=mapping
+mapping.alt=mapping icon
+
+mustchangepassword.class=fa fa-lock
+mustchangepassword.title=set must change password
+mustchangepassword.alt=must change password icon
+
+set_latest_sync_token.class=fa fa-hourglass-start
+set_latest_sync_token.title=set last sync token
+set_latest_sync_token.alt=set last sync token icon
+
+remove_sync_token.class=fa fa-hourglass-o
+remove_sync_token.title=remove sync token
+remove_sync_token.alt=remove sync token icon
+
+clone.class=fa fa-clone
+clone.title=clone
+clone.alt=clone icon
+
+create.class=glyphicon glyphicon-plus
+create.title=create
+create.alt=create icon
+
+template.class=fa fa-list-alt
+template.title=template
+template.alt=template icon
+
+edit.class=glyphicon glyphicon-pencil
+edit.title=edit
+edit.alt=edit icon
+
+type_extensions.class=fa fa-expand
+type_extensions.title=extensions
+type_extensions.alt=extensions icon
+
+fo_edit.class=fa fa-file-code-o
+fo_edit.title=fo
+fo_edit.alt=fo icon
+
+html.class=fa fa-file-code-o
+html.title=html
+html.alt=html icon
+
+text.class=fa fa-file-text-o
+text.title=text
+text.alt=text icon
+
+compose.class=fa fa-puzzle-piece
+compose.title=compose
+compose.alt=compose icon
+
+layout_edit.class=fa fa-object-ungroup
+layout_edit.title=layout
+layout_edit.alt=layout icon
+
+reset.class=fa fa-shield
+reset.title=reset
+reset.alt=reset icon
+
+enable.class=fa fa-toggle-on
+enable.title=enable
+enable.alt=enable icon
+
+not_found.class=fa fa-eye-slash
+not_found.title=not found
+not_found.alt=not found icon
+
+view.class=fa fa-eye
+view.title=view
+view.alt=view icon
+
+members.class=fa fa-users
+members.title=members
+members.alt=members icon
+
+search.class=glyphicon glyphicon-search
+search.title=search
+search.alt=search icon
+
+delete.class=glyphicon glyphicon-minus
+delete.title=delete
+delete.alt=delete icon
+
+execute.class=fa fa-gear
+execute.title=execute
+execute.alt=execute icon
+
+password_reset.class=fa fa-shield
+password_reset.title=password reset
+password_reset.alt=password reset icon
+
+dryrun.class=fa fa-gears
+dryrun.title=dry-run
+dryrun.alt=dry-run icon
+
+claim.class=fa fa-ticket
+claim.title=claim
+claim.alt=claim icon
+
+select.class=glyphicon glyphicon-ok
+select.title=select
+select.alt=select icon
+
+close.class=fa fa-sign-out
+close.title=close
+close.alt=close icon
+
+export.class=fa fa-floppy-o
+export.title=export
+export.alt=export icon
+
+export_csv.class=fa fa-file-text-o
+export_csv.title=export as csv
+export_csv.alt=export as csv icon
+
+export_html.class=fa fa-file-code-o
+export_html.title=export as html
+export_html.alt=export as html icon
+
+export_pdf.class=fa fa-file-pdf-o
+export_pdf.title=export as pdf
+export_pdf.alt=export as pdf icon
+
+export_rtf.class=fa fa-file-word-o
+export_rtf.title=export as rtf
+export_rtf.alt=export as rtf icon
+
+export_xml.class=fa fa-file-excel-o
+export_xml.title=export as xml
+export_xml.alt=export as xml icon
+
+suspend.class=glyphicon glyphicon-ban-circle
+suspend.title=suspend
+suspend.alt=suspend icon
+
+reactivate.class=glyphicon glyphicon-ok-sign
+reactivate.title=reactivate
+reactivate.alt=reactivate icon
+
+reload.class=fa fa-repeat
+reload.title=reload
+reload.alt=reload icon
+
+change_view.class=fa fa-list"
+change_view.title=change view
+change_view.alt=change view icon
+
+unlink.class=fa fa-unlink
+unlink.title=unlink
+unlink.alt=unlink icon
+
+link.class=fa fa-link
+link.title=link
+link.alt=link icon
+
+unassign.class=glyphicon glyphicon-resize-full
+unassign.title=unassign
+unassign.alt=unassign icon
+
+assign.class=glyphicon glyphicon-resize-small
+assign.title=assign
+assign.alt=assign icon
+
+deprovision.class=glyphicon glyphicon-fast-backward
+deprovision.title=deprovision
+deprovision.alt=deprovision icon
+
+provision.class=glyphicon glyphicon-fast-forward
+provision.title=provision
+provision.alt=provision icon
+
+deprovision_members.class=glyphicon glyphicon-fast-backward
+deprovision_members.title=deprovision members
+deprovision_members.alt=deprovision members icon
+
+provision_members.class=glyphicon glyphicon-fast-forward
+provision_members.title=provision members
+provision_members.alt=provision members icon
+
+manage_resources.class=fa fa-sitemap
+manage_resources.title=manage resources
+manage_resources.alt=manage resources icon
+
+manage_users.class=fa fa-users
+manage_users.title=manage users
+manage_users.alt=manage users icon
+
+manage_groups.class=fa fa-users
+manage_groups.title=manage groups
+manage_groups.alt=manage groups icon
+
+propagation_tasks.class=fa fa-arrow-right
+propagation_tasks.title=propagation tasks
+propagation_tasks.alt=propagation tasks icon
+
+notification_tasks.class=fa fa-envelope-o
+notification_tasks.title=notification tasks
+notification_tasks.alt=notification tasks icon
+
+zoom_in.class=fa fa-search-plus
+zoom_in.title=zoom-in
+zoom_in.alt=zoom-in icon
+
+zoom_out.class=fa fa-search-minus
+zoom_out.title=zoom-out
+zoom_out.alt=zoom-out icon
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/resources/org/apache/syncope/client/console/wizards/AbstractMappingPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/AbstractMappingPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/AbstractMappingPanel.html
index ddca6f7..538d804 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/AbstractMappingPanel.html
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/AbstractMappingPanel.html
@@ -75,7 +75,7 @@ under the License.
</div>
</td>
<td>
- <div>
+ <div id="inline-actions">
<span wicket:id="toRemove"/>
</div>
</td>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/ResultPage.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/ResultPage.html b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/ResultPage.html
index 558f3b3..cf43602 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/ResultPage.html
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/ResultPage.html
@@ -21,7 +21,7 @@ under the License.
<body>
<wicket:panel>
<span wicket:id="customResultBody"/>
- <div class="modal-footer circular-actions">
+ <div id="inline-actions" class="modal-footer circular-actions">
<span wicket:id="action"/>
</div>
</wicket:panel>
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/common/lib/src/main/java/org/apache/syncope/common/lib/to/JobTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/JobTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/JobTO.java
index 7838535..2cb5690 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/to/JobTO.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/JobTO.java
@@ -40,8 +40,6 @@ public class JobTO extends AbstractBaseBean {
private boolean scheduled;
- private String status;
-
private Date start;
public JobType getType() {
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/ext/camel/client-console/src/main/java/org/apache/syncope/client/console/panels/CamelRoutesDirectoryPanel.java
----------------------------------------------------------------------
diff --git a/ext/camel/client-console/src/main/java/org/apache/syncope/client/console/panels/CamelRoutesDirectoryPanel.java b/ext/camel/client-console/src/main/java/org/apache/syncope/client/console/panels/CamelRoutesDirectoryPanel.java
index a4b4df5..f6f37a6 100644
--- a/ext/camel/client-console/src/main/java/org/apache/syncope/client/console/panels/CamelRoutesDirectoryPanel.java
+++ b/ext/camel/client-console/src/main/java/org/apache/syncope/client/console/panels/CamelRoutesDirectoryPanel.java
@@ -30,10 +30,9 @@ import org.apache.syncope.client.console.commons.SortableDataProviderComparator;
import org.apache.syncope.client.console.pages.BasePage;
import org.apache.syncope.client.console.panels.CamelRoutesDirectoryPanel.CamelRoutesProvider;
import org.apache.syncope.client.console.rest.CamelRoutesRestClient;
-import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.ActionColumn;
import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
-import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionsPanel;
import org.apache.syncope.client.console.wicket.markup.html.form.XMLEditorPanel;
import org.apache.syncope.client.console.wizards.WizardMgtPanel;
import org.apache.syncope.common.lib.to.CamelRouteTO;
@@ -101,75 +100,49 @@ public class CamelRoutesDirectoryPanel extends DirectoryPanel<
@Override
protected List<IColumn<CamelRouteTO, String>> getColumns() {
- List<IColumn<CamelRouteTO, String>> columns = new ArrayList<>();
-
+ final List<IColumn<CamelRouteTO, String>> columns = new ArrayList<>();
columns.add(new PropertyColumn<CamelRouteTO, String>(new ResourceModel("key"), "key", "key"));
+ return columns;
+ }
- columns.add(new ActionColumn<CamelRouteTO, String>(new ResourceModel("actions", "")) {
+ @Override
+ public ActionsPanel<CamelRouteTO> getActions(final IModel<CamelRouteTO> model) {
+ final ActionsPanel<CamelRouteTO> panel = super.getActions(model);
- private static final long serialVersionUID = 906457126287899096L;
+ panel.add(new ActionLink<CamelRouteTO>() {
- @Override
- public ActionLinksPanel<CamelRouteTO> getActions(
- final String componentId, final IModel<CamelRouteTO> model) {
-
- ActionLinksPanel<CamelRouteTO> panel = ActionLinksPanel.<CamelRouteTO>builder().
- add(new ActionLink<CamelRouteTO>() {
-
- private static final long serialVersionUID = -3722207913631435501L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final CamelRouteTO ignore) {
- final CamelRouteTO route = restClient.read(model.getObject().getKey());
-
- utilityModal.header(Model.of(route.getKey()));
- utilityModal.setContent(new XMLEditorPanel(
- utilityModal, new PropertyModel<String>(route, "content"), filtered, pageRef) {
-
- private static final long serialVersionUID = 5488080606102212554L;
-
- @Override
- public void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
- try {
- restClient.update(route);
- info(getString(Constants.OPERATION_SUCCEEDED));
- modal.close(target);
- } catch (Exception e) {
- LOG.error("While creating or updating CamelRouteTO", e);
- error(getString(Constants.ERROR) + ": " + e.getMessage());
- }
- ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target);
- }
-
- });
- utilityModal.show(true);
- target.add(utilityModal);
- }
- }, ActionLink.ActionType.EDIT, CamelEntitlement.ROUTE_UPDATE).
- build(componentId);
-
- return panel;
- }
+ private static final long serialVersionUID = -3722207913631435501L;
@Override
- public ActionLinksPanel<CamelRouteTO> getHeader(final String componentId) {
- final ActionLinksPanel.Builder<CamelRouteTO> panel = ActionLinksPanel.builder();
+ public void onClick(final AjaxRequestTarget target, final CamelRouteTO ignore) {
+ final CamelRouteTO route = restClient.read(model.getObject().getKey());
- return panel.add(new ActionLink<CamelRouteTO>() {
+ utilityModal.header(Model.of(route.getKey()));
+ utilityModal.setContent(new XMLEditorPanel(
+ utilityModal, new PropertyModel<String>(route, "content"), filtered, pageRef) {
- private static final long serialVersionUID = -1140254463922516111L;
+ private static final long serialVersionUID = 5488080606102212554L;
@Override
- public void onClick(final AjaxRequestTarget target, final CamelRouteTO ignore) {
- if (target != null) {
- target.add(container);
+ public void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
+ try {
+ restClient.update(route);
+ info(getString(Constants.OPERATION_SUCCEEDED));
+ modal.close(target);
+ } catch (Exception e) {
+ LOG.error("While creating or updating CamelRouteTO", e);
+ error(getString(Constants.ERROR) + ": " + e.getMessage());
}
+ ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target);
}
- }, ActionLink.ActionType.RELOAD).build(componentId);
+
+ });
+ utilityModal.show(true);
+ target.add(utilityModal);
}
- });
+ }, ActionLink.ActionType.EDIT, CamelEntitlement.ROUTE_UPDATE);
- return columns;
+ return panel;
}
protected final class CamelRoutesProvider extends DirectoryDataProvider<CamelRouteTO> {
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/ext/saml2sp/client-console/src/main/java/org/apache/syncope/client/console/panels/SAML2IdPsDirectoryPanel.java
----------------------------------------------------------------------
diff --git a/ext/saml2sp/client-console/src/main/java/org/apache/syncope/client/console/panels/SAML2IdPsDirectoryPanel.java b/ext/saml2sp/client-console/src/main/java/org/apache/syncope/client/console/panels/SAML2IdPsDirectoryPanel.java
index be93d28..caa70bf 100644
--- a/ext/saml2sp/client-console/src/main/java/org/apache/syncope/client/console/panels/SAML2IdPsDirectoryPanel.java
+++ b/ext/saml2sp/client-console/src/main/java/org/apache/syncope/client/console/panels/SAML2IdPsDirectoryPanel.java
@@ -33,12 +33,11 @@ import org.apache.syncope.client.console.commons.SortableDataProviderComparator;
import org.apache.syncope.client.console.pages.BasePage;
import org.apache.syncope.client.console.panels.SAML2IdPsDirectoryPanel.SAML2IdPsProvider;
import org.apache.syncope.client.console.rest.SAML2IdPsRestClient;
-import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.ActionColumn;
import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.BooleanPropertyColumn;
import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.KeyPropertyColumn;
import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
-import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionsPanel;
import org.apache.syncope.client.console.wicket.markup.html.form.XMLEditorPanel;
import org.apache.syncope.client.console.wizards.AjaxWizard;
import org.apache.syncope.client.console.wizards.WizardMgtPanel;
@@ -135,7 +134,6 @@ public class SAML2IdPsDirectoryPanel extends DirectoryPanel<
List<IColumn<SAML2IdPTO, String>> columns = new ArrayList<>();
columns.add(new KeyPropertyColumn<SAML2IdPTO>(new ResourceModel("key"), "key", "key"));
-
columns.add(new PropertyColumn<SAML2IdPTO, String>(new ResourceModel("name"), "name", "name"));
columns.add(new PropertyColumn<SAML2IdPTO, String>(new ResourceModel("entityID"), "entityID", "entityID"));
columns.add(new BooleanPropertyColumn<SAML2IdPTO>(
@@ -145,85 +143,61 @@ public class SAML2IdPsDirectoryPanel extends DirectoryPanel<
columns.add(new BooleanPropertyColumn<SAML2IdPTO>(
new ResourceModel("logoutSupported"), "logoutSupported", "logoutSupported"));
- columns.add(new ActionColumn<SAML2IdPTO, String>(new ResourceModel("actions", "")) {
+ return columns;
+ }
+
+ @Override
+ public ActionsPanel<SAML2IdPTO> getActions(final IModel<SAML2IdPTO> model) {
+ final ActionsPanel<SAML2IdPTO> panel = super.getActions(model);
+
+ panel.add(new ActionLink<SAML2IdPTO>() {
- private static final long serialVersionUID = 906457126287899096L;
+ private static final long serialVersionUID = -3722207913631435501L;
@Override
- public ActionLinksPanel<SAML2IdPTO> getActions(
- final String componentId, final IModel<SAML2IdPTO> model) {
-
- ActionLinksPanel<SAML2IdPTO> panel = ActionLinksPanel.<SAML2IdPTO>builder().
- add(new ActionLink<SAML2IdPTO>() {
-
- private static final long serialVersionUID = -3722207913631435501L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final SAML2IdPTO ignore) {
- SAML2IdPTO object = restClient.read(model.getObject().getKey());
- send(SAML2IdPsDirectoryPanel.this, Broadcast.EXACT,
- new AjaxWizard.EditItemActionEvent<>(object, target));
- }
- }, ActionLink.ActionType.EDIT, SAML2SPEntitlement.IDP_UPDATE).
- add(new ActionLink<SAML2IdPTO>() {
-
- private static final long serialVersionUID = -7978723352517770645L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final SAML2IdPTO ignore) {
- SAML2IdPTO object = restClient.read(model.getObject().getKey());
- metadataModal.header(Model.of(object.getName() + " - Metadata"));
- metadataModal.setContent(new XMLEditorPanel(
- metadataModal,
- Model.of(new String(Base64.decodeBase64(object.getMetadata()))),
- true,
- pageRef));
- metadataModal.show(true);
- target.add(metadataModal);
- }
- }, ActionLink.ActionType.HTML, SAML2SPEntitlement.IDP_READ).
- add(new ActionLink<SAML2IdPTO>() {
-
- private static final long serialVersionUID = -5467832321897812767L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final SAML2IdPTO ignore) {
- try {
- restClient.delete(model.getObject().getKey());
- SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));
- target.add(container);
- } catch (SyncopeClientException e) {
- LOG.error("While deleting object {}", model.getObject().getKey(), e);
- SyncopeConsoleSession.get().error(StringUtils.isBlank(e.getMessage())
- ? e.getClass().getName() : e.getMessage());
- }
- ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target);
- }
- }, ActionLink.ActionType.DELETE, SAML2SPEntitlement.IDP_DELETE).
- build(componentId);
-
- return panel;
+ public void onClick(final AjaxRequestTarget target, final SAML2IdPTO ignore) {
+ SAML2IdPTO object = restClient.read(model.getObject().getKey());
+ send(SAML2IdPsDirectoryPanel.this, Broadcast.EXACT,
+ new AjaxWizard.EditItemActionEvent<>(object, target));
}
+ }, ActionLink.ActionType.EDIT, SAML2SPEntitlement.IDP_UPDATE);
+ panel.add(new ActionLink<SAML2IdPTO>() {
- @Override
- public ActionLinksPanel<SAML2IdPTO> getHeader(final String componentId) {
- final ActionLinksPanel.Builder<SAML2IdPTO> panel = ActionLinksPanel.builder();
+ private static final long serialVersionUID = -7978723352517770645L;
- return panel.add(new ActionLink<SAML2IdPTO>() {
+ @Override
+ public void onClick(final AjaxRequestTarget target, final SAML2IdPTO ignore) {
+ SAML2IdPTO object = restClient.read(model.getObject().getKey());
+ metadataModal.header(Model.of(object.getName() + " - Metadata"));
+ metadataModal.setContent(new XMLEditorPanel(
+ metadataModal,
+ Model.of(new String(Base64.decodeBase64(object.getMetadata()))),
+ true,
+ pageRef));
+ metadataModal.show(true);
+ target.add(metadataModal);
+ }
+ }, ActionLink.ActionType.HTML, SAML2SPEntitlement.IDP_READ);
+ panel.add(new ActionLink<SAML2IdPTO>() {
- private static final long serialVersionUID = -5467832321897812767L;
+ private static final long serialVersionUID = -5467832321897812767L;
- @Override
- public void onClick(final AjaxRequestTarget target, final SAML2IdPTO ignore) {
- if (target != null) {
- target.add(container);
- }
- }
- }, ActionLink.ActionType.RELOAD).build(componentId);
+ @Override
+ public void onClick(final AjaxRequestTarget target, final SAML2IdPTO ignore) {
+ try {
+ restClient.delete(model.getObject().getKey());
+ SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));
+ target.add(container);
+ } catch (SyncopeClientException e) {
+ LOG.error("While deleting object {}", model.getObject().getKey(), e);
+ SyncopeConsoleSession.get().error(StringUtils.isBlank(e.getMessage())
+ ? e.getClass().getName() : e.getMessage());
+ }
+ ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target);
}
- });
+ }, ActionLink.ActionType.DELETE, SAML2SPEntitlement.IDP_DELETE, true);
- return columns;
+ return panel;
}
protected final class SAML2IdPsProvider extends DirectoryDataProvider<SAML2IdPTO> {
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/fit/core-reference/src/test/java/org/apache/syncope/fit/console/AnyObjectsITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/AnyObjectsITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/AnyObjectsITCase.java
index b6dddcd..75d65bb 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/AnyObjectsITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/AnyObjectsITCase.java
@@ -22,7 +22,6 @@ import static org.junit.Assert.assertNotNull;
import org.apache.wicket.Component;
import org.apache.wicket.markup.html.basic.Label;
-import org.apache.wicket.markup.html.list.ListItem;
import org.apache.wicket.util.tester.FormTester;
import org.junit.Test;
import org.apache.syncope.client.console.commons.Constants;
@@ -69,7 +68,9 @@ public class AnyObjectsITCase extends AbstractConsoleITCase {
"8559d14d-58c2-46eb-a2d4-a7d35161e8f8");
assertNotNull(component);
- TESTER.clickLink(component.getPageRelativePath() + ":cells:4:cell:panelClone:cloneLink");
+ TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
+ TESTER.clickLink(TAB_PANEL + "outerObjectsRepeater:1:outer:container:content:togglePanelContainer:container:"
+ + "actions:actions:actionRepeater:1:action:action");
FormTester formTester = TESTER.newFormTester(TAB_PANEL + "outerObjectsRepeater:0:outer:form:content:form");
assertNotNull(formTester);
@@ -87,8 +88,10 @@ public class AnyObjectsITCase extends AbstractConsoleITCase {
"8559d14d-58c2-46eb-a2d4-a7d35161e8f8");
assertNotNull(component);
- TESTER.clickLink(component.getPageRelativePath() + ":cells:4:cell:panelEdit:editLink");
-
+ TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
+ TESTER.clickLink(TAB_PANEL + "outerObjectsRepeater:1:outer:container:content:togglePanelContainer:container:"
+ + "actions:actions:actionRepeater:0:action:action");
+
FormTester formTester = TESTER.newFormTester(TAB_PANEL + "outerObjectsRepeater:0:outer:form:content:form");
assertNotNull(formTester);
formTester.submit("buttons:next");
@@ -117,7 +120,7 @@ public class AnyObjectsITCase extends AbstractConsoleITCase {
+ "outerObjectsRepeater:0:outer:form:content:customResultBody:resources:"
+ "firstLevelContainer:first:container:content:group:beans:0:fields:0:field", Label.class);
- TESTER.clickLink(TAB_PANEL + "outerObjectsRepeater:0:outer:form:content:action:panelClose:closeLink");
+ TESTER.clickLink(TAB_PANEL + "outerObjectsRepeater:0:outer:form:content:action:actionRepeater:0:action:action");
component = findComponentByProp("key", CONTAINER
+ ":searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable",
@@ -135,7 +138,10 @@ public class AnyObjectsITCase extends AbstractConsoleITCase {
"8559d14d-58c2-46eb-a2d4-a7d35161e8f8");
assertNotNull(component);
- TESTER.assertComponent(component.getPageRelativePath() + ":cells:4:cell:panelDelete:deleteLink",
+ TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
+ TESTER.assertComponent(TAB_PANEL
+ + "outerObjectsRepeater:1:outer:container:content:togglePanelContainer:container:"
+ + "actions:actions:actionRepeater:5:action:action",
IndicatingOnConfirmAjaxLink.class);
}
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/fit/core-reference/src/test/java/org/apache/syncope/fit/console/AnyTypeClassesITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/AnyTypeClassesITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/AnyTypeClassesITCase.java
index 0a7f8e6..d17ee20 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/AnyTypeClassesITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/AnyTypeClassesITCase.java
@@ -22,13 +22,12 @@ import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import de.agilecoders.wicket.core.markup.html.bootstrap.dialog.Modal;
+import org.apache.syncope.client.console.commons.Constants;
import org.apache.syncope.client.console.pages.Types;
import org.apache.syncope.client.console.panels.AjaxDataTablePanel;
import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.AjaxFallbackDataTable;
import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
-import org.apache.syncope.client.console.wicket.markup.html.form.IndicatingOnConfirmAjaxLink;
import org.apache.wicket.Component;
-import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxLink;
import org.apache.wicket.util.tester.FormTester;
import org.junit.Test;
@@ -38,17 +37,14 @@ public class AnyTypeClassesITCase extends AbstractTypesITCase {
public void read() {
browsingToAnyTypeClasses();
- Component result = findComponentByProp(KEY, DATATABLE_PATH, "csv");
- TESTER.assertLabel(
- result.getPageRelativePath() + ":cells:1:cell", "csv");
+ Component component = findComponentByProp(KEY, DATATABLE_PATH, "csv");
+ TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
- TESTER.assertComponent(
- result.getPageRelativePath() + ":cells:6:cell:panelEdit:editLink", IndicatingAjaxLink.class);
+ // click edit
+ TESTER.clickLink("body:content:tabbedPanel:panel:outerObjectsRepeater:1:outer:container:content:"
+ + "togglePanelContainer:container:actions:actions:actionRepeater:0:action:action");
- TESTER.clickLink(result.getPageRelativePath() + ":cells:6:cell:panelEdit:editLink");
-
- TESTER.assertComponent(
- "body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer", BaseModal.class);
+ TESTER.assertComponent("body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer", BaseModal.class);
}
@Test
@@ -58,11 +54,10 @@ public class AnyTypeClassesITCase extends AbstractTypesITCase {
TESTER.clickLink("body:content:tabbedPanel:panel:container:content:add");
- TESTER.assertComponent(
- "body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer", Modal.class);
+ TESTER.assertComponent("body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer", Modal.class);
- FormTester formTester =
- TESTER.newFormTester("body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer:form");
+ FormTester formTester = TESTER.newFormTester(
+ "body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer:form");
formTester.setValue("content:anyTypeClassDetailsPanel:form:key:textField", anyTypeClassTest);
formTester.setValue(
"content:anyTypeClassDetailsPanel:form:container:derSchemas:paletteField:recorder", "mderiveddata");
@@ -89,26 +84,49 @@ public class AnyTypeClassesITCase extends AbstractTypesITCase {
@Test
public void update() {
final String plainSchema = "anyPlainSchema";
+ final String name = "anyTypeClassToUpdate";
+ createAnyTypeClassWithoutSchema(name);
createPlainSchema(plainSchema);
browsingToAnyTypeClasses();
- TESTER.assertComponent(
- DATATABLE_PATH
- + ":tablePanel:groupForm:checkgroup:dataTable:"
- + "body:rows:1:cells:6:cell:panelEdit:editLink", IndicatingAjaxLink.class);
+ Component component = findComponentByProp(KEY, DATATABLE_PATH, name);
+ TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
- TESTER.clickLink(
- DATATABLE_PATH
- + ":tablePanel:groupForm:checkgroup:dataTable:body:rows:1:cells:6:cell:panelEdit:editLink");
+ // click edit
+ TESTER.clickLink("body:content:tabbedPanel:panel:outerObjectsRepeater:1:outer:container:content:"
+ + "togglePanelContainer:container:actions:actions:actionRepeater:0:action:action");
- final FormTester formTester =
- TESTER.newFormTester("body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer:form");
+ final FormTester formTester = TESTER.newFormTester(
+ "body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer:form");
formTester.setValue(
"content:anyTypeClassDetailsPanel:form:container:plainSchemas:paletteField:recorder", plainSchema);
TESTER.clickLink(
"body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer:dialog:footer:inputs:0:submit");
TESTER.assertInfoMessages("Operation executed successfully");
+ TESTER.cleanupFeedbackMessages();
+
+ component = findComponentByProp(KEY, DATATABLE_PATH, name);
+ assertNotNull(component);
+
+ TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
+ TESTER.getRequest().addParameter("confirm", "true");
+
+ // click delete
+ TESTER.clickLink(TESTER.getComponentFromLastRenderedPage(
+ "body:content:tabbedPanel:panel:outerObjectsRepeater:1:outer:container:content:"
+ + "togglePanelContainer:container:actions:actions:actionRepeater:1:action:action"));
+
+ TESTER.executeAjaxEvent(TESTER.getComponentFromLastRenderedPage(
+ "body:content:tabbedPanel:panel:outerObjectsRepeater:1:outer:container:content:"
+ + "togglePanelContainer:container:actions:actions:actionRepeater:1:action:action"),
+ Constants.ON_CLICK);
+
+ TESTER.assertInfoMessages("Operation executed successfully");
+ TESTER.cleanupFeedbackMessages();
+ component = findComponentByProp(KEY, DATATABLE_PATH, name);
+
+ assertNull(component);
}
@Test
@@ -118,24 +136,27 @@ public class AnyTypeClassesITCase extends AbstractTypesITCase {
browsingToAnyTypeClasses();
TESTER.assertComponent(DATATABLE_PATH, AjaxDataTablePanel.class);
- Component result = findComponentByProp(KEY, DATATABLE_PATH, anyTypeClassName);
-
- assertNotNull(result);
- TESTER.assertComponent(
- result.getPageRelativePath() + ":cells:6:cell:panelDelete:deleteLink",
- IndicatingOnConfirmAjaxLink.class);
+ Component component = findComponentByProp(KEY, DATATABLE_PATH, anyTypeClassName);
+ assertNotNull(component);
+ TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
TESTER.getRequest().addParameter("confirm", "true");
+
+ // click delete
TESTER.clickLink(TESTER.getComponentFromLastRenderedPage(
- result.getPageRelativePath() + ":cells:6:cell:panelDelete:deleteLink"));
+ "body:content:tabbedPanel:panel:outerObjectsRepeater:1:outer:container:content:"
+ + "togglePanelContainer:container:actions:actions:actionRepeater:1:action:action"));
TESTER.executeAjaxEvent(TESTER.getComponentFromLastRenderedPage(
- result.getPageRelativePath() + ":cells:6:cell:panelDelete:deleteLink"), "click");
+ "body:content:tabbedPanel:panel:outerObjectsRepeater:1:outer:container:content:"
+ + "togglePanelContainer:container:actions:actions:actionRepeater:1:action:action"),
+ Constants.ON_CLICK);
+
TESTER.assertInfoMessages("Operation executed successfully");
TESTER.cleanupFeedbackMessages();
- result = findComponentByProp(KEY, DATATABLE_PATH, anyTypeClassName);
+ component = findComponentByProp(KEY, DATATABLE_PATH, anyTypeClassName);
- assertNull(result);
+ assertNull(component);
}
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/fit/core-reference/src/test/java/org/apache/syncope/fit/console/AnyTypesITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/AnyTypesITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/AnyTypesITCase.java
index fd65f29..d56c76a 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/AnyTypesITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/AnyTypesITCase.java
@@ -22,12 +22,11 @@ import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import de.agilecoders.wicket.core.markup.html.bootstrap.dialog.Modal;
+import org.apache.syncope.client.console.commons.Constants;
import org.apache.syncope.client.console.pages.Types;
import org.apache.syncope.client.console.panels.AjaxDataTablePanel;
import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
-import org.apache.syncope.client.console.wicket.markup.html.form.IndicatingOnConfirmAjaxLink;
import org.apache.wicket.Component;
-import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxLink;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.util.tester.FormTester;
import org.junit.Test;
@@ -42,13 +41,13 @@ public class AnyTypesITCase extends AbstractTypesITCase {
+ ":tablePanel:groupForm:"
+ "checkgroup:dataTable:body:rows:1:cells:1:cell", Label.class);
- Component result = findComponentByProp(KEY, DATATABLE_PATH, "GROUP");
+ Component component = findComponentByProp(KEY, DATATABLE_PATH, "GROUP");
- TESTER.assertComponent(
- result.getPageRelativePath() + ":cells:4:cell:panelEdit:editLink", IndicatingAjaxLink.class);
+ TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
- TESTER.clickLink(
- result.getPageRelativePath() + ":cells:4:cell:panelEdit:editLink");
+ // click edit
+ TESTER.clickLink("body:content:tabbedPanel:panel:outerObjectsRepeater:1:outer:container:content:"
+ + "togglePanelContainer:container:actions:actions:actionRepeater:0:action:action");
TESTER.assertComponent("body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer", BaseModal.class);
}
@@ -78,10 +77,10 @@ public class AnyTypesITCase extends AbstractTypesITCase {
TESTER.clickLink("body:content:tabbedPanel:tabs-container:tabs:1:link");
TESTER.assertComponent(DATATABLE_PATH, AjaxDataTablePanel.class);
- Component result = findComponentByProp(KEY, DATATABLE_PATH, anyTypeTest);
+ Component component = findComponentByProp(KEY, DATATABLE_PATH, anyTypeTest);
- TESTER.assertLabel(result.getPageRelativePath() + ":cells:1:cell", anyTypeTest);
- TESTER.assertLabel(result.getPageRelativePath() + ":cells:3:cell", "[csv]");
+ TESTER.assertLabel(component.getPageRelativePath() + ":cells:1:cell", anyTypeTest);
+ TESTER.assertLabel(component.getPageRelativePath() + ":cells:3:cell", "[csv]");
}
@Test
@@ -90,14 +89,14 @@ public class AnyTypesITCase extends AbstractTypesITCase {
createAnyTypeClassWithoutSchema(name);
browsingToAnyTypes();
- TESTER.assertComponent(
- DATATABLE_PATH
- + ":tablePanel:groupForm:checkgroup:dataTable:"
- + "body:rows:1:cells:4:cell:panelEdit:editLink", IndicatingAjaxLink.class);
+ Component component = findComponentByProp(KEY, DATATABLE_PATH, "GROUP");
+ assertNotNull(component);
- TESTER.clickLink(
- DATATABLE_PATH
- + ":tablePanel:groupForm:checkgroup:dataTable:body:rows:1:cells:4:cell:panelEdit:editLink");
+ TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
+
+ // click edit
+ TESTER.clickLink("body:content:tabbedPanel:panel:outerObjectsRepeater:1:outer:container:content:"
+ + "togglePanelContainer:container:actions:actions:actionRepeater:0:action:action");
final FormTester formTester = TESTER.newFormTester(
"body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer:form");
@@ -117,24 +116,28 @@ public class AnyTypesITCase extends AbstractTypesITCase {
browsingToAnyTypes();
TESTER.assertComponent(DATATABLE_PATH, AjaxDataTablePanel.class);
- Component result = findComponentByProp(KEY, DATATABLE_PATH, name);
+ Component component = findComponentByProp(KEY, DATATABLE_PATH, name);
+ assertNotNull(component);
- assertNotNull(result);
- TESTER.assertComponent(
- result.getPageRelativePath() + ":cells:4:cell:panelDelete:deleteLink",
- IndicatingOnConfirmAjaxLink.class);
+ TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
TESTER.getRequest().addParameter("confirm", "true");
+
+ // click delete
TESTER.clickLink(TESTER.getComponentFromLastRenderedPage(
- result.getPageRelativePath() + ":cells:4:cell:panelDelete:deleteLink"));
+ "body:content:tabbedPanel:panel:outerObjectsRepeater:1:outer:container:content:"
+ + "togglePanelContainer:container:actions:actions:actionRepeater:1:action:action"));
TESTER.executeAjaxEvent(TESTER.getComponentFromLastRenderedPage(
- result.getPageRelativePath() + ":cells:4:cell:panelDelete:deleteLink"), "onclick");
+ "body:content:tabbedPanel:panel:outerObjectsRepeater:1:outer:container:content:"
+ + "togglePanelContainer:container:actions:actions:actionRepeater:1:action:action"),
+ Constants.ON_CLICK);
+
TESTER.assertInfoMessages("Operation executed successfully");
TESTER.cleanupFeedbackMessages();
- result = findComponentByProp(KEY, DATATABLE_PATH, name);
+ component = findComponentByProp(KEY, DATATABLE_PATH, name);
- assertNull(result);
+ assertNull(component);
}
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/fit/core-reference/src/test/java/org/apache/syncope/fit/console/BulkActionITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/BulkActionITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/BulkActionITCase.java
index 026c85a..d39ed71 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/BulkActionITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/BulkActionITCase.java
@@ -52,8 +52,7 @@ public class BulkActionITCase extends AbstractConsoleITCase {
+ "searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", "rossini");
assertNotNull(component);
- FormTester formTester = TESTER.newFormTester(CONTAINER
- + "searchContainer:resultTable:tablePanel:groupForm");
+ FormTester formTester = TESTER.newFormTester(CONTAINER + "searchContainer:resultTable:tablePanel:groupForm");
assertNotNull(formTester);
formTester.select("checkgroup", 2);
@@ -77,34 +76,37 @@ public class BulkActionITCase extends AbstractConsoleITCase {
+ ":searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", "rossini");
assertNotNull(component);
- TESTER.clickLink(component.getPageRelativePath()
- + ":cells:6:cell:panelManageResources:manageResourcesLink");
+ TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
+ // manage resource
+ TESTER.clickLink("body:content:body:container:content:tabbedPanel:panel:searchResult:outerObjectsRepeater:1"
+ + ":outer:container:content:togglePanelContainer:container:actions:actions:actionRepeater:5:"
+ + "action:action");
- TESTER.assertComponent(TAB_PANEL + "outerObjectsRepeater:1:outer:form:content:status:"
+ TESTER.assertComponent(TAB_PANEL + "outerObjectsRepeater:2:outer:form:content:status:"
+ "firstLevelContainer:first:container:content:searchContainer:resultTable:tablePanel:groupForm:"
+ "checkgroup:dataTable", WebMarkupContainer.class);
component = findComponentByProp("resourceName",
- TAB_PANEL + "outerObjectsRepeater:1:outer:form:content:status:"
+ TAB_PANEL + "outerObjectsRepeater:2:outer:form:content:status:"
+ "firstLevelContainer:first:container:content:searchContainer:resultTable:tablePanel:groupForm:"
+ "checkgroup:dataTable", "resource-csv");
assertNotNull(component);
FormTester formTester = TESTER.newFormTester(
- TAB_PANEL + "outerObjectsRepeater:1:outer:form:content:status:firstLevelContainer:"
+ TAB_PANEL + "outerObjectsRepeater:2:outer:form:content:status:firstLevelContainer:"
+ "first:container:content:searchContainer:resultTable:tablePanel:groupForm");
assertNotNull(formTester);
formTester.select("checkgroup", 2);
- TESTER.executeAjaxEvent(TAB_PANEL + "outerObjectsRepeater:1:outer:form:content:status:"
+ TESTER.executeAjaxEvent(TAB_PANEL + "outerObjectsRepeater:2:outer:form:content:status:"
+ "firstLevelContainer:first:container:content:searchContainer:resultTable:tablePanel:bulkActionLink",
Constants.ON_CLICK);
- TESTER.assertComponent(TAB_PANEL + "outerObjectsRepeater:1:outer:form:content:status:"
+ TESTER.assertComponent(TAB_PANEL + "outerObjectsRepeater:2:outer:form:content:status:"
+ "secondLevelContainer:second:container", WebMarkupContainer.class);
- assertNotNull(findComponentByProp("resourceName", TAB_PANEL + "outerObjectsRepeater:1:outer:"
+ assertNotNull(findComponentByProp("resourceName", TAB_PANEL + "outerObjectsRepeater:2:outer:"
+ "form:content:status:secondLevelContainer:second:container", "resource-csv"));
}
@@ -127,14 +129,18 @@ public class BulkActionITCase extends AbstractConsoleITCase {
+ ":searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", "rossini");
assertNotNull(component);
- TESTER.clickLink(component.getPageRelativePath() + ":cells:6:cell:panelEnable:enableLink");
+ TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
+ // enable
+ TESTER.clickLink("body:content:body:container:content:tabbedPanel:panel:searchResult:outerObjectsRepeater:1"
+ + ":outer:container:content:togglePanelContainer:container:actions:actions:actionRepeater:4:"
+ + "action:action");
- TESTER.assertComponent(TAB_PANEL + "outerObjectsRepeater:1:outer:form:content:status:"
+ TESTER.assertComponent(TAB_PANEL + "outerObjectsRepeater:2:outer:form:content:status:"
+ "firstLevelContainer:first:container:content:searchContainer:resultTable:tablePanel:groupForm:"
+ "checkgroup:dataTable", WebMarkupContainer.class);
component = findComponentByProp("resourceName",
- TAB_PANEL + "outerObjectsRepeater:1:outer:form:content:status:firstLevelContainer:first:container:"
+ TAB_PANEL + "outerObjectsRepeater:2:outer:form:content:status:firstLevelContainer:first:container:"
+ "content:searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", resourceName);
component = TESTER.getComponentFromLastRenderedPage(component.getPageRelativePath() + ":cells:1:cell:check");
@@ -142,36 +148,36 @@ public class BulkActionITCase extends AbstractConsoleITCase {
assertEquals(resourceName, StatusBean.class.cast(component.getDefaultModelObject()).getResourceName());
FormTester formTester = TESTER.newFormTester(
- TAB_PANEL + "outerObjectsRepeater:1:outer:form:content:status:firstLevelContainer:"
+ TAB_PANEL + "outerObjectsRepeater:2:outer:form:content:status:firstLevelContainer:"
+ "first:container:content:searchContainer:resultTable:tablePanel:groupForm");
assertNotNull(formTester);
formTester.select("checkgroup", index);
- TESTER.executeAjaxEvent(TAB_PANEL + "outerObjectsRepeater:1:outer:form:content:status:"
+ TESTER.executeAjaxEvent(TAB_PANEL + "outerObjectsRepeater:2:outer:form:content:status:"
+ "firstLevelContainer:first:container:content:searchContainer:resultTable:tablePanel:bulkActionLink",
Constants.ON_CLICK);
- TESTER.assertComponent(TAB_PANEL + "outerObjectsRepeater:1:outer:form:content:status:"
+ TESTER.assertComponent(TAB_PANEL + "outerObjectsRepeater:2:outer:form:content:status:"
+ "secondLevelContainer:second:container", WebMarkupContainer.class);
- TESTER.executeAjaxEvent(TAB_PANEL + "outerObjectsRepeater:1:outer:form:content:"
- + "status:secondLevelContainer:second:container:actions:panelSuspend:suspendLink",
+ // suspend link
+ TESTER.executeAjaxEvent(TAB_PANEL + "outerObjectsRepeater:2:outer:form:content:status:secondLevelContainer:"
+ + "second:container:actions:actionRepeater:0:action:action",
Constants.ON_CLICK);
TESTER.assertInfoMessages("Operation executed successfully");
TESTER.cleanupFeedbackMessages();
- TESTER.assertLabel(TAB_PANEL + "outerObjectsRepeater:1:outer:form:content:status:"
- + "secondLevelContainer:second:container:selectedObjects:body:rows:1:cells:4:cell", "SUCCESS");
+ TESTER.assertLabel(TAB_PANEL + "outerObjectsRepeater:2:outer:form:content:status:"
+ + "secondLevelContainer:second:container:selectedObjects:body:rows:1:cells:3:cell", "SUCCESS");
- TESTER.
- executeAjaxEvent(TAB_PANEL
- + "outerObjectsRepeater:1:outer:form:content:status:secondLevelContainer:back",
- Constants.ON_CLICK);
+ TESTER.executeAjaxEvent(TAB_PANEL
+ + "outerObjectsRepeater:2:outer:form:content:status:secondLevelContainer:back",
+ Constants.ON_CLICK);
component = findComponentByProp("resourceName",
- TAB_PANEL + "outerObjectsRepeater:1:outer:form:content:status:firstLevelContainer:first:container:"
+ TAB_PANEL + "outerObjectsRepeater:2:outer:form:content:status:firstLevelContainer:first:container:"
+ "content:searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", resourceName);
component = TESTER.getComponentFromLastRenderedPage(component.getPageRelativePath() + ":cells:1:cell:check");
@@ -186,50 +192,54 @@ public class BulkActionITCase extends AbstractConsoleITCase {
+ ":searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", "rossini");
assertNotNull(component);
- TESTER.clickLink(component.getPageRelativePath() + ":cells:6:cell:panelEnable:enableLink");
+ TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
+ // enable
+ TESTER.clickLink("body:content:body:container:content:tabbedPanel:panel:searchResult:outerObjectsRepeater:1"
+ + ":outer:container:content:togglePanelContainer:container:actions:actions:actionRepeater:4:"
+ + "action:action");
- TESTER.assertComponent(TAB_PANEL + "outerObjectsRepeater:1:outer:form:content:status:"
+ TESTER.assertComponent(TAB_PANEL + "outerObjectsRepeater:2:outer:form:content:status:"
+ "firstLevelContainer:first:container:content:searchContainer:resultTable:tablePanel:groupForm:"
+ "checkgroup:dataTable", WebMarkupContainer.class);
formTester = TESTER.newFormTester(
- TAB_PANEL + "outerObjectsRepeater:1:outer:form:content:status:firstLevelContainer:"
+ TAB_PANEL + "outerObjectsRepeater:2:outer:form:content:status:firstLevelContainer:"
+ "first:container:content:searchContainer:resultTable:tablePanel:groupForm");
assertNotNull(formTester);
formTester.select("checkgroup", index);
- TESTER.executeAjaxEvent(TAB_PANEL + "outerObjectsRepeater:1:outer:form:content:status:"
+ TESTER.executeAjaxEvent(TAB_PANEL + "outerObjectsRepeater:2:outer:form:content:status:"
+ "firstLevelContainer:first:container:content:searchContainer:resultTable:tablePanel:bulkActionLink",
Constants.ON_CLICK);
- TESTER.assertComponent(TAB_PANEL + "outerObjectsRepeater:1:outer:form:content:status:"
+ TESTER.assertComponent(TAB_PANEL + "outerObjectsRepeater:2:outer:form:content:status:"
+ "secondLevelContainer:second:container", WebMarkupContainer.class);
- TESTER.executeAjaxEvent(TAB_PANEL + "outerObjectsRepeater:1:outer:form:content:"
- + "status:secondLevelContainer:second:container:actions:panelReactivate:reactivateLink",
+ // suspend link
+ TESTER.executeAjaxEvent(TAB_PANEL + "outerObjectsRepeater:2:outer:form:content:status:secondLevelContainer:"
+ + "second:container:actions:actionRepeater:1:action:action",
Constants.ON_CLICK);
TESTER.assertInfoMessages("Operation executed successfully");
TESTER.cleanupFeedbackMessages();
- TESTER.assertLabel(TAB_PANEL + "outerObjectsRepeater:1:outer:form:content:status:"
- + "secondLevelContainer:second:container:selectedObjects:body:rows:1:cells:4:cell", "SUCCESS");
+ TESTER.assertLabel(TAB_PANEL + "outerObjectsRepeater:2:outer:form:content:status:"
+ + "secondLevelContainer:second:container:selectedObjects:body:rows:1:cells:3:cell", "SUCCESS");
- TESTER.
- executeAjaxEvent(TAB_PANEL
- + "outerObjectsRepeater:1:outer:form:content:status:secondLevelContainer:back",
- Constants.ON_CLICK);
+ TESTER.executeAjaxEvent(TAB_PANEL
+ + "outerObjectsRepeater:2:outer:form:content:status:secondLevelContainer:back",
+ Constants.ON_CLICK);
component = findComponentByProp("resourceName",
- TAB_PANEL + "outerObjectsRepeater:1:outer:form:content:status:firstLevelContainer:first:container:"
+ TAB_PANEL + "outerObjectsRepeater:2:outer:form:content:status:firstLevelContainer:first:container:"
+ "content:searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", resourceName);
component = TESTER.getComponentFromLastRenderedPage(component.getPageRelativePath() + ":cells:1:cell:check");
assertEquals(Status.ACTIVE, StatusBean.class.cast(component.getDefaultModelObject()).getStatus());
assertEquals(resourceName, StatusBean.class.cast(component.getDefaultModelObject()).getResourceName());
- TESTER.executeAjaxEvent(TAB_PANEL + "outerObjectsRepeater:1:outer:dialog:footer:buttons:0:button",
+ TESTER.executeAjaxEvent(TAB_PANEL + "outerObjectsRepeater:2:outer:dialog:footer:buttons:0:button",
Constants.ON_CLICK);
}
@@ -242,38 +252,41 @@ public class BulkActionITCase extends AbstractConsoleITCase {
+ ":searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", "director");
assertNotNull(component);
- TESTER.clickLink(component.getPageRelativePath()
- + ":cells:4:cell:panelManageResources:manageResourcesLink");
+ TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
+ // manage resource
+ TESTER.clickLink("body:content:body:container:content:tabbedPanel:panel:searchResult:outerObjectsRepeater:1"
+ + ":outer:container:content:togglePanelContainer:container:actions:actions:actionRepeater:6:"
+ + "action:action");
- TESTER.assertComponent(TAB_PANEL + "outerObjectsRepeater:1:outer:form:content:status:"
+ TESTER.assertComponent(TAB_PANEL + "outerObjectsRepeater:2:outer:form:content:status:"
+ "firstLevelContainer:first:container:content:searchContainer:resultTable:tablePanel:groupForm:"
+ "checkgroup:dataTable", WebMarkupContainer.class);
- TESTER.clickLink(TAB_PANEL + "outerObjectsRepeater:1:outer:form:content:status:firstLevelContainer:first:"
+ TESTER.clickLink(TAB_PANEL + "outerObjectsRepeater:2:outer:form:content:status:firstLevelContainer:first:"
+ "container:content:searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable:topToolbars:"
+ "toolbars:1:headers:2:header:orderByLink", true);
component = findComponentByProp("resourceName",
- TAB_PANEL + "outerObjectsRepeater:1:outer:form:content:status:"
+ TAB_PANEL + "outerObjectsRepeater:2:outer:form:content:status:"
+ "firstLevelContainer:first:container:content:searchContainer:resultTable:tablePanel:groupForm:"
+ "checkgroup:dataTable", "ws-target-resource-1");
assertNotNull(component);
FormTester formTester = TESTER.newFormTester(
- TAB_PANEL + "outerObjectsRepeater:1:outer:form:content:status:firstLevelContainer:"
+ TAB_PANEL + "outerObjectsRepeater:2:outer:form:content:status:firstLevelContainer:"
+ "first:container:content:searchContainer:resultTable:tablePanel:groupForm");
assertNotNull(formTester);
formTester.select("checkgroup", 7);
- TESTER.executeAjaxEvent(TAB_PANEL + "outerObjectsRepeater:1:outer:form:content:status:"
+ TESTER.executeAjaxEvent(TAB_PANEL + "outerObjectsRepeater:2:outer:form:content:status:"
+ "firstLevelContainer:first:container:content:searchContainer:resultTable:tablePanel:bulkActionLink",
Constants.ON_CLICK);
- TESTER.assertComponent(TAB_PANEL + "outerObjectsRepeater:1:outer:form:content:status:"
+ TESTER.assertComponent(TAB_PANEL + "outerObjectsRepeater:2:outer:form:content:status:"
+ "secondLevelContainer:second:container", WebMarkupContainer.class);
- assertNotNull(findComponentByProp("resourceName", TAB_PANEL + "outerObjectsRepeater:1:outer:"
+ assertNotNull(findComponentByProp("resourceName", TAB_PANEL + "outerObjectsRepeater:2:outer:"
+ "form:content:status:secondLevelContainer:second:container:selectedObjects", "resource-testdb2"));
}
@@ -287,38 +300,41 @@ public class BulkActionITCase extends AbstractConsoleITCase {
"8559d14d-58c2-46eb-a2d4-a7d35161e8f8");
assertNotNull(component);
- TESTER.clickLink(component.getPageRelativePath()
- + ":cells:4:cell:panelManageResources:manageResourcesLink");
+ TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
+ // manage resource
+ TESTER.clickLink("body:content:body:container:content:tabbedPanel:panel:searchResult:outerObjectsRepeater:1"
+ + ":outer:container:content:togglePanelContainer:container:actions:actions:actionRepeater:2:"
+ + "action:action");
- TESTER.assertComponent(TAB_PANEL + "outerObjectsRepeater:1:outer:form:content:status:"
+ TESTER.assertComponent(TAB_PANEL + "outerObjectsRepeater:2:outer:form:content:status:"
+ "firstLevelContainer:first:container:content:searchContainer:resultTable:tablePanel:groupForm:"
+ "checkgroup:dataTable", WebMarkupContainer.class);
- TESTER.clickLink(TAB_PANEL + "outerObjectsRepeater:1:outer:form:content:status:firstLevelContainer:first:"
+ TESTER.clickLink(TAB_PANEL + "outerObjectsRepeater:2:outer:form:content:status:firstLevelContainer:first:"
+ "container:content:searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable:topToolbars:"
+ "toolbars:1:headers:2:header:orderByLink", true);
component = findComponentByProp("resourceName",
- TAB_PANEL + "outerObjectsRepeater:1:outer:form:content:status:"
+ TAB_PANEL + "outerObjectsRepeater:2:outer:form:content:status:"
+ "firstLevelContainer:first:container:content:searchContainer:resultTable:tablePanel:groupForm:"
+ "checkgroup:dataTable", "ws-target-resource-1");
assertNotNull(component);
FormTester formTester = TESTER.newFormTester(
- TAB_PANEL + "outerObjectsRepeater:1:outer:form:content:status:firstLevelContainer:"
+ TAB_PANEL + "outerObjectsRepeater:2:outer:form:content:status:firstLevelContainer:"
+ "first:container:content:searchContainer:resultTable:tablePanel:groupForm");
assertNotNull(formTester);
formTester.select("checkgroup", 7);
- TESTER.executeAjaxEvent(TAB_PANEL + "outerObjectsRepeater:1:outer:form:content:status:"
+ TESTER.executeAjaxEvent(TAB_PANEL + "outerObjectsRepeater:2:outer:form:content:status:"
+ "firstLevelContainer:first:container:content:searchContainer:resultTable:tablePanel:bulkActionLink",
Constants.ON_CLICK);
- TESTER.assertComponent(TAB_PANEL + "outerObjectsRepeater:1:outer:form:content:status:"
+ TESTER.assertComponent(TAB_PANEL + "outerObjectsRepeater:2:outer:form:content:status:"
+ "secondLevelContainer:second:container", WebMarkupContainer.class);
- assertNotNull(findComponentByProp("resourceName", TAB_PANEL + "outerObjectsRepeater:1:outer:"
+ assertNotNull(findComponentByProp("resourceName", TAB_PANEL + "outerObjectsRepeater:2:outer:"
+ "form:content:status:secondLevelContainer:second:container:selectedObjects", "resource-testdb2"));
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/fit/core-reference/src/test/java/org/apache/syncope/fit/console/DisplayAttributesITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/DisplayAttributesITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/DisplayAttributesITCase.java
index cb8e782..7de9a0d 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/DisplayAttributesITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/DisplayAttributesITCase.java
@@ -36,22 +36,20 @@ public class DisplayAttributesITCase extends AbstractConsoleITCase {
@Test
public void readAndSet() {
TESTER.clickLink("body:content:body:container:content:tabbedPanel:tabs-container:tabs:3:link");
- TESTER.clickLink("body:content:body:container:content:tabbedPanel:panel:"
- + "searchResult:container:content:searchContainer:resultTable:"
- + "tablePanel:groupForm:checkgroup:dataTable:topToolbars:"
- + "toolbars:1:headers:4:header:label:panelChangeView:changeViewLink");
+ TESTER.clickLink("body:content:body:container:content:tabbedPanel:panel:searchResult:container:content:"
+ + "searchContainer:tablehandling:actionRepeater:1:action:action");
TESTER.assertComponent(
- "body:content:body:container:content:tabbedPanel:panel:searchResult:outerObjectsRepeater:2:outer",
+ "body:content:body:container:content:tabbedPanel:panel:searchResult:outerObjectsRepeater:3:outer",
Modal.class);
FormTester formTester = TESTER.newFormTester(
- "body:content:body:container:content:tabbedPanel:panel:searchResult:outerObjectsRepeater:2:outer:form");
+ "body:content:body:container:content:tabbedPanel:panel:searchResult:outerObjectsRepeater:3:outer:form");
formTester.setValue("content:container:details:paletteField:recorder", "status");
TESTER.clickLink("body:content:body:container:content:tabbedPanel:panel:searchResult:outerObjectsRepeater:"
- + "2:outer:dialog:footer:inputs:0:submit");
+ + "3:outer:dialog:footer:inputs:0:submit");
TESTER.assertInfoMessages("Operation executed successfully");
TESTER.clearFeedbackMessages();
[09/10] syncope git commit: [SYNCOPE-1047] Replaces ActionLinksPanel
with TogglePanel
Posted by fm...@apache.org.
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/java/org/apache/syncope/client/console/panels/AnyObjectDisplayAttributesModalPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/AnyObjectDisplayAttributesModalPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/AnyObjectDisplayAttributesModalPanel.java
index 39f30ad..6462d11 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/AnyObjectDisplayAttributesModalPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/AnyObjectDisplayAttributesModalPanel.java
@@ -35,7 +35,7 @@ public class AnyObjectDisplayAttributesModalPanel<T extends Serializable> extend
private static final long serialVersionUID = 5194630813773543054L;
- public static final String[] DEFAULT_SELECTION = { "key", "name" };
+ public static final String[] DEFAULT_SELECTION = { "name" };
public AnyObjectDisplayAttributesModalPanel(
final BaseModal<T> modal,
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/java/org/apache/syncope/client/console/panels/AnyTypeClassesPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/AnyTypeClassesPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/AnyTypeClassesPanel.java
index 09edf19..0e489f3 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/AnyTypeClassesPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/AnyTypeClassesPanel.java
@@ -33,10 +33,9 @@ import org.apache.syncope.client.console.commons.DirectoryDataProvider;
import org.apache.syncope.client.console.commons.SortableDataProviderComparator;
import org.apache.syncope.client.console.pages.BasePage;
import org.apache.syncope.client.console.rest.AnyTypeClassRestClient;
-import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.ActionColumn;
import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.BooleanPropertyColumn;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
-import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionsPanel;
import org.apache.syncope.client.console.wizards.AbstractModalPanelBuilder;
import org.apache.syncope.client.console.wizards.AjaxWizard;
import org.apache.syncope.common.lib.to.AnyTypeClassTO;
@@ -153,67 +152,44 @@ public class AnyTypeClassesPanel extends TypesDirectoryPanel<
}
}
- columns.add(new ActionColumn<AnyTypeClassTO, String>(new ResourceModel("actions")) {
-
- private static final long serialVersionUID = 906457126287899096L;
-
- @Override
- public ActionLinksPanel<AnyTypeClassTO> getActions(
- final String componentId, final IModel<AnyTypeClassTO> model) {
+ return columns;
+ }
- ActionLinksPanel<AnyTypeClassTO> panel = ActionLinksPanel.<AnyTypeClassTO>builder().
- add(new ActionLink<AnyTypeClassTO>() {
+ @Override
+ public ActionsPanel<AnyTypeClassTO> getActions(final IModel<AnyTypeClassTO> model) {
+ final ActionsPanel<AnyTypeClassTO> panel = super.getActions(model);
- private static final long serialVersionUID = -3722207913631435501L;
+ panel.add(new ActionLink<AnyTypeClassTO>() {
- @Override
- public void onClick(final AjaxRequestTarget target, final AnyTypeClassTO ignore) {
- send(AnyTypeClassesPanel.this, Broadcast.EXACT,
- new AjaxWizard.EditItemActionEvent<>(model.getObject(), target));
- }
- }, ActionLink.ActionType.EDIT, StandardEntitlement.ANYTYPECLASS_UPDATE).
- add(new ActionLink<AnyTypeClassTO>() {
-
- private static final long serialVersionUID = -3722207913631435501L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final AnyTypeClassTO ignore) {
- try {
- restClient.delete(model.getObject().getKey());
- SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));
- target.add(container);
- } catch (Exception e) {
- LOG.error("While deleting {}", model.getObject(), e);
- SyncopeConsoleSession.get().error(StringUtils.isBlank(e.getMessage())
- ? e.getClass().getName() : e.getMessage());
- }
- ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target);
- }
- }, ActionLink.ActionType.DELETE, StandardEntitlement.ANYTYPECLASS_DELETE).
- build(componentId);
-
- return panel;
- }
+ private static final long serialVersionUID = -3722207913631435501L;
@Override
- public ActionLinksPanel<AnyTypeClassTO> getHeader(final String componentId) {
- final ActionLinksPanel.Builder<AnyTypeClassTO> panel = ActionLinksPanel.builder();
+ public void onClick(final AjaxRequestTarget target, final AnyTypeClassTO ignore) {
+ send(AnyTypeClassesPanel.this, Broadcast.EXACT,
+ new AjaxWizard.EditItemActionEvent<>(model.getObject(), target));
+ }
+ }, ActionLink.ActionType.EDIT, StandardEntitlement.ANYTYPECLASS_UPDATE);
- return panel.add(new ActionLink<AnyTypeClassTO>() {
+ panel.add(new ActionLink<AnyTypeClassTO>() {
- private static final long serialVersionUID = -1140254463922516111L;
+ private static final long serialVersionUID = -3722207913631435501L;
- @Override
- public void onClick(final AjaxRequestTarget target, final AnyTypeClassTO ignore) {
- if (target != null) {
- target.add(container);
- }
- }
- }, ActionLink.ActionType.RELOAD).build(componentId);
+ @Override
+ public void onClick(final AjaxRequestTarget target, final AnyTypeClassTO ignore) {
+ try {
+ restClient.delete(model.getObject().getKey());
+ SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));
+ target.add(container);
+ } catch (Exception e) {
+ LOG.error("While deleting {}", model.getObject(), e);
+ SyncopeConsoleSession.get().error(StringUtils.isBlank(e.getMessage())
+ ? e.getClass().getName() : e.getMessage());
+ }
+ ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target);
}
- });
+ }, ActionLink.ActionType.DELETE, StandardEntitlement.ANYTYPECLASS_DELETE, true);
- return columns;
+ return panel;
}
protected final class AnyTypeClassProvider extends DirectoryDataProvider<AnyTypeClassTO> {
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/java/org/apache/syncope/client/console/panels/AnyTypesPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/AnyTypesPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/AnyTypesPanel.java
index b354055..f08d13e 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/AnyTypesPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/AnyTypesPanel.java
@@ -32,12 +32,10 @@ import org.apache.syncope.client.console.commons.Constants;
import org.apache.syncope.client.console.commons.DirectoryDataProvider;
import org.apache.syncope.client.console.commons.SortableDataProviderComparator;
import org.apache.syncope.client.console.pages.BasePage;
-import org.apache.syncope.client.console.panels.AnyTypesPanel.AnyTypeProvider;
import org.apache.syncope.client.console.rest.AnyTypeRestClient;
-import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.ActionColumn;
import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.BooleanPropertyColumn;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
-import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionsPanel;
import org.apache.syncope.client.console.wizards.AbstractModalPanelBuilder;
import org.apache.syncope.client.console.wizards.AjaxWizard;
import org.apache.syncope.common.lib.to.AnyTypeTO;
@@ -53,7 +51,7 @@ import org.apache.wicket.model.CompoundPropertyModel;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.ResourceModel;
-public class AnyTypesPanel extends TypesDirectoryPanel<AnyTypeTO, AnyTypeProvider, AnyTypeRestClient> {
+public class AnyTypesPanel extends TypesDirectoryPanel<AnyTypeTO, AnyTypesPanel.AnyTypeProvider, AnyTypeRestClient> {
private static final long serialVersionUID = 3905038169553185171L;
@@ -152,69 +150,45 @@ public class AnyTypesPanel extends TypesDirectoryPanel<AnyTypeTO, AnyTypeProvide
}
}
- columns.add(new ActionColumn<AnyTypeTO, String>(new ResourceModel("actions")) {
-
- private static final long serialVersionUID = 906457126287899096L;
-
- @Override
- public ActionLinksPanel<AnyTypeTO> getActions(
- final String componentId, final IModel<AnyTypeTO> model) {
-
- ActionLinksPanel<AnyTypeTO> panel = ActionLinksPanel.<AnyTypeTO>builder().
- add(new ActionLink<AnyTypeTO>() {
+ return columns;
+ }
- private static final long serialVersionUID = -3722207913631435501L;
+ @Override
+ public ActionsPanel<AnyTypeTO> getActions(final IModel<AnyTypeTO> model) {
+ final ActionsPanel<AnyTypeTO> panel = super.getActions(model);
- @Override
- public void onClick(final AjaxRequestTarget target, final AnyTypeTO ignore) {
- send(AnyTypesPanel.this, Broadcast.EXACT,
- new AjaxWizard.EditItemActionEvent<>(model.getObject(), target));
- }
- }, ActionLink.ActionType.EDIT, StandardEntitlement.ANYTYPE_UPDATE).
- add(new ActionLink<AnyTypeTO>() {
-
- private static final long serialVersionUID = -3722207913631435501L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final AnyTypeTO ignore) {
- try {
- restClient.delete(model.getObject().getKey());
- SyncopeConsoleSession.get().refreshAuth();
-
- SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));
- target.add(container);
- } catch (Exception e) {
- LOG.error("While deleting {}", model.getObject(), e);
- SyncopeConsoleSession.get().error(StringUtils.isBlank(e.getMessage())
- ? e.getClass().getName() : e.getMessage());
- }
- ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target);
- }
- }, ActionLink.ActionType.DELETE, StandardEntitlement.ANYTYPE_DELETE).
- build(componentId);
+ panel.add(new ActionLink<AnyTypeTO>() {
- return panel;
- }
+ private static final long serialVersionUID = -3722207913631435501L;
@Override
- public ActionLinksPanel<AnyTypeTO> getHeader(final String componentId) {
- final ActionLinksPanel.Builder<AnyTypeTO> panel = ActionLinksPanel.builder();
-
- return panel.add(new ActionLink<AnyTypeTO>() {
+ public void onClick(final AjaxRequestTarget target, final AnyTypeTO ignore) {
+ send(AnyTypesPanel.this, Broadcast.EXACT,
+ new AjaxWizard.EditItemActionEvent<>(model.getObject(), target));
+ }
+ }, ActionLink.ActionType.EDIT, StandardEntitlement.ANYTYPE_UPDATE);
+ panel.add(new ActionLink<AnyTypeTO>() {
- private static final long serialVersionUID = -1140254463922516111L;
+ private static final long serialVersionUID = -3722207913631435501L;
- @Override
- public void onClick(final AjaxRequestTarget target, final AnyTypeTO ignore) {
- if (target != null) {
- target.add(container);
- }
- }
- }, ActionLink.ActionType.RELOAD).build(componentId);
+ @Override
+ public void onClick(final AjaxRequestTarget target, final AnyTypeTO ignore) {
+ try {
+ restClient.delete(model.getObject().getKey());
+ SyncopeConsoleSession.get().refreshAuth();
+
+ SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));
+ target.add(container);
+ } catch (Exception e) {
+ LOG.error("While deleting {}", model.getObject(), e);
+ SyncopeConsoleSession.get().error(StringUtils.isBlank(e.getMessage())
+ ? e.getClass().getName() : e.getMessage());
+ }
+ ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target);
}
- });
+ }, ActionLink.ActionType.DELETE, StandardEntitlement.ANYTYPE_DELETE, true);
- return columns;
+ return panel;
}
protected final class AnyTypeProvider extends DirectoryDataProvider<AnyTypeTO> {
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/java/org/apache/syncope/client/console/panels/DirectoryPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/DirectoryPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/DirectoryPanel.java
index 59af452..ec92a2e 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/DirectoryPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/DirectoryPanel.java
@@ -30,7 +30,10 @@ import org.apache.syncope.client.console.rest.RestClient;
import org.apache.syncope.client.console.wicket.ajax.form.IndicatorAjaxFormComponentUpdatingBehavior;
import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksTogglePanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionsPanel;
import org.apache.syncope.client.console.wizards.WizardMgtPanel;
+import org.apache.syncope.common.lib.types.StandardEntitlement;
import org.apache.wicket.PageReference;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.event.Broadcast;
@@ -40,6 +43,8 @@ import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn;
import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.markup.html.form.DropDownChoice;
import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.Model;
import org.apache.wicket.model.PropertyModel;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -71,7 +76,7 @@ public abstract class DirectoryPanel<
/**
* Specify if results are about a filtered search or not. Using this attribute it is possible to use this panel to
- * show results about user list and user search.
+ * show results about entity list and search.
*/
protected final boolean filtered;
@@ -85,7 +90,7 @@ public abstract class DirectoryPanel<
private AjaxDataTablePanel<T, String> resultTable;
/**
- * Data provider used to search for users.
+ * Data provider used to search for entities.
*/
protected DP dataProvider;
@@ -94,12 +99,14 @@ public abstract class DirectoryPanel<
*/
protected final BasePage page;
- protected String itemKeyFieldName = "key";
+ protected String itemKeyFieldName = Constants.KEY_FIELD_NAME;
protected final BaseModal<W> altDefaultModal = new BaseModal<>("outer");
protected final BaseModal<W> displayAttributeModal = new BaseModal<>("outer");
+ private final ActionLinksTogglePanel<T> actionTogglePanel;
+
/**
* Create simple unfiltered search result panel.
* Use the available builder for powerfull configuration options.
@@ -132,6 +139,9 @@ public abstract class DirectoryPanel<
super(id, wizardInModal);
setOutputMarkupId(true);
+ actionTogglePanel = new ActionLinksTogglePanel<T>("outer", builder.getPageRef());
+ addOuterObject(actionTogglePanel);
+
addOuterObject(altDefaultModal);
addOuterObject(displayAttributeModal);
@@ -144,7 +154,7 @@ public abstract class DirectoryPanel<
this.restClient = builder.restClient;
- // Container for user search result
+ // Container for entity search result
container = new WebMarkupContainer("searchContainer");
container.setOutputMarkupId(true);
addInnerObject(container);
@@ -217,6 +227,29 @@ public abstract class DirectoryPanel<
});
paginatorForm.add(rowsChooser);
// ---------------------------
+
+ // ---------------------------
+ // Table handling
+ // ---------------------------
+ container.add(getHeader("tablehandling"));
+ // ---------------------------
+ }
+
+ protected ActionsPanel<Serializable> getHeader(final String componentId) {
+ final ActionsPanel<Serializable> panel = new ActionsPanel<>(componentId, null);
+
+ panel.add(new ActionLink<Serializable>() {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target, final Serializable ignore) {
+ if (target != null) {
+ target.add(container);
+ }
+ }
+ }, ActionLink.ActionType.RELOAD, StandardEntitlement.USER_SEARCH).hideLabel();
+ return panel;
}
public void search(final AjaxRequestTarget target) {
@@ -241,8 +274,22 @@ public abstract class DirectoryPanel<
? (create ? (int) resultTable.getPageCount() - 1 : (int) resultTable.getCurrentPage()) : 0;
// take care of restClient handle: maybe not useful to keep into
- AjaxDataTablePanel.Builder<T, String> resultTableBuilder = new AjaxDataTablePanel.Builder<>(
- dataProvider, page.getPageReference()).
+ AjaxDataTablePanel.Builder<T, String> resultTableBuilder = new AjaxDataTablePanel.Builder<T, String>(
+ dataProvider, page.getPageReference()) {
+
+ private static final long serialVersionUID = 2205322679547329123L;
+
+ @Override
+ protected ActionsPanel<T> getActions(final IModel<T> model) {
+ return DirectoryPanel.this.getActions(model);
+ }
+
+ @Override
+ protected ActionLinksTogglePanel<T> getTogglePanel() {
+ return DirectoryPanel.this.getTogglePanel();
+ }
+
+ }.
setColumns(getColumns()).
setRowsPerPage(rows).
setBulkActions(getBulkActions(), restClient, itemKeyFieldName).
@@ -299,6 +346,14 @@ public abstract class DirectoryPanel<
send(getParent(), Broadcast.BREADTH, data);
}
+ protected ActionsPanel<T> getActions(final IModel<T> model) {
+ return model == null ? new ActionsPanel<>("actions", new Model<T>()) : new ActionsPanel<>("actions", model);
+ }
+
+ protected ActionLinksTogglePanel<T> getTogglePanel() {
+ return actionTogglePanel;
+ }
+
public static class EventDataWrapper {
private AjaxRequestTarget target;
@@ -341,7 +396,7 @@ public abstract class DirectoryPanel<
/**
* Specify if results are about a filtered search or not.
- * By using this attribute it is possible to force this panel to show results about user list and user search.
+ * By using this attribute it is possible to force this panel to show results about entity list and search.
*/
protected boolean filtered = false;
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/java/org/apache/syncope/client/console/panels/GroupDirectoryPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/GroupDirectoryPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/GroupDirectoryPanel.java
index 118c415..04ec300 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/GroupDirectoryPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/GroupDirectoryPanel.java
@@ -36,12 +36,12 @@ import org.apache.syncope.client.console.rest.AnyTypeRestClient;
import org.apache.syncope.client.console.rest.GroupRestClient;
import org.apache.syncope.client.console.status.AnyStatusModal;
import org.apache.syncope.client.console.tasks.AnyPropagationTasks;
-import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.ActionColumn;
import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.AttrColumn;
+import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.KeyPropertyColumn;
import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink.ActionType;
-import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionsPanel;
import org.apache.syncope.client.console.wizards.AjaxWizard;
import org.apache.syncope.client.console.wizards.WizardMgtPanel;
import org.apache.syncope.client.console.wizards.any.AnyWrapper;
@@ -183,223 +183,234 @@ public class GroupDirectoryPanel extends AnyDirectoryPanel<GroupTO, GroupRestCli
}
@Override
+ public ActionsPanel<Serializable> getHeader(final String componentId) {
+ final ActionsPanel<Serializable> panel = super.getHeader(componentId);
+
+ panel.add(new ActionLink<Serializable>() {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target, final Serializable ignore) {
+ target.add(displayAttributeModal.setContent(new GroupDisplayAttributesModalPanel<>(
+ displayAttributeModal, page.getPageReference(), pSchemaNames, dSchemaNames)));
+ displayAttributeModal.header(new ResourceModel("any.attr.display"));
+ displayAttributeModal.show(true);
+ }
+ }, ActionType.CHANGE_VIEW, StandardEntitlement.GROUP_READ).hideLabel();
+ return panel;
+ }
+
+ @Override
protected List<IColumn<GroupTO, String>> getColumns() {
+
final List<IColumn<GroupTO, String>> columns = new ArrayList<>();
+ final List<IColumn<GroupTO, String>> prefcolumns = new ArrayList<>();
+
+ columns.add(new KeyPropertyColumn<GroupTO>(
+ new ResourceModel(Constants.KEY_FIELD_NAME, Constants.KEY_FIELD_NAME), Constants.KEY_FIELD_NAME));
for (String name : prefMan.getList(getRequest(), Constants.PREF_GROUP_DETAILS_VIEW)) {
- addPropertyColumn(name, ReflectionUtils.findField(GroupTO.class, name), columns);
+ if (!Constants.KEY_FIELD_NAME.equalsIgnoreCase(name)) {
+ addPropertyColumn(name, ReflectionUtils.findField(GroupTO.class, name), prefcolumns);
+ }
}
for (String name : prefMan.getList(getRequest(), Constants.PREF_GROUP_PLAIN_ATTRS_VIEW)) {
if (pSchemaNames.contains(name)) {
- columns.add(new AttrColumn<GroupTO>(name, SchemaType.PLAIN));
+ prefcolumns.add(new AttrColumn<GroupTO>(name, SchemaType.PLAIN));
}
}
for (String name : prefMan.getList(getRequest(), Constants.PREF_GROUP_DER_ATTRS_VIEW)) {
if (dSchemaNames.contains(name)) {
- columns.add(new AttrColumn<GroupTO>(name, SchemaType.DERIVED));
+ prefcolumns.add(new AttrColumn<GroupTO>(name, SchemaType.DERIVED));
}
}
// Add defaults in case of no selection
- if (columns.isEmpty()) {
+ if (prefcolumns.isEmpty()) {
for (String name : GroupDisplayAttributesModalPanel.DEFAULT_SELECTION) {
- addPropertyColumn(name, ReflectionUtils.findField(GroupTO.class, name), columns);
+ addPropertyColumn(name, ReflectionUtils.findField(GroupTO.class, name), prefcolumns);
}
prefMan.setList(getRequest(), getResponse(), Constants.PREF_GROUP_DETAILS_VIEW,
Arrays.asList(GroupDisplayAttributesModalPanel.DEFAULT_SELECTION));
}
- columns.add(new ActionColumn<GroupTO, String>(new ResourceModel("actions")) {
+ columns.addAll(prefcolumns);
+ return columns;
+ }
- private static final long serialVersionUID = -3503023501954863131L;
+ @Override
+ public ActionsPanel<GroupTO> getActions(final IModel<GroupTO> model) {
+ final ActionsPanel<GroupTO> panel = super.getActions(model);
- @Override
- public ActionLinksPanel<GroupTO> getActions(final String componentId, final IModel<GroupTO> model) {
- final ActionLinksPanel.Builder<GroupTO> panel = ActionLinksPanel.builder();
+ panel.add(new ActionLink<GroupTO>() {
- panel.add(new ActionLink<GroupTO>() {
+ private static final long serialVersionUID = -7978723352517770644L;
- private static final long serialVersionUID = -7978723352517770645L;
+ @Override
+ public void onClick(final AjaxRequestTarget target, final GroupTO ignore) {
+ send(GroupDirectoryPanel.this, Broadcast.EXACT,
+ new AjaxWizard.EditItemActionEvent<>(new GroupWrapper(
+ restClient.read(model.getObject().getKey())), target));
+ }
+ }, ActionType.EDIT, StandardEntitlement.GROUP_READ);
- @Override
- public void onClick(final AjaxRequestTarget target, final GroupTO ignore) {
- templates.setTargetObject(model.getObject());
- templates.toggle(target, true);
- }
+ panel.add(new ActionLink<GroupTO>() {
- @Override
- public boolean isIndicatorEnabled() {
- return false;
- }
- }, ActionType.MEMBERS, StandardEntitlement.GROUP_READ).add(new ActionLink<GroupTO>() {
+ private static final long serialVersionUID = 6242834621660352855L;
- private static final long serialVersionUID = -7978723352517770645L;
+ @Override
+ public void onClick(final AjaxRequestTarget target, final GroupTO ignore) {
+ GroupTO clone = SerializationUtils.clone(model.getObject());
+ clone.setKey(null);
+ send(GroupDirectoryPanel.this, Broadcast.EXACT,
+ new AjaxWizard.NewItemActionEvent<>(new GroupWrapper(clone), target));
+ }
+ }, ActionType.CLONE, StandardEntitlement.GROUP_CREATE);
- @Override
- public void onClick(final AjaxRequestTarget target, final GroupTO ignore) {
- IModel<AnyWrapper<GroupTO>> formModel = new CompoundPropertyModel<>(
- new AnyWrapper<>(model.getObject()));
- altDefaultModal.setFormModel(formModel);
-
- target.add(altDefaultModal.setContent(new AnyStatusModal<>(
- altDefaultModal,
- pageRef,
- formModel.getObject().getInnerObject(),
- "resourceName",
- false)));
-
- altDefaultModal.header(new Model<>(
- getString("any.edit", new Model<>(new AnyWrapper<>(model.getObject())))));
-
- altDefaultModal.show(true);
- }
- }, ActionType.MANAGE_RESOURCES, StandardEntitlement.GROUP_READ).add(new ActionLink<GroupTO>() {
+ panel.add(new ActionLink<GroupTO>() {
- private static final long serialVersionUID = -7978723352517770644L;
+ private static final long serialVersionUID = 6242834621660352855L;
- @Override
- public void onClick(final AjaxRequestTarget target, final GroupTO ignore) {
- send(GroupDirectoryPanel.this, Broadcast.EXACT,
- new AjaxWizard.EditItemActionEvent<>(new GroupWrapper(
- restClient.read(model.getObject().getKey())), target));
- }
- }, ActionType.EDIT, StandardEntitlement.GROUP_READ).add(new ActionLink<GroupTO>() {
+ @Override
+ public void onClick(final AjaxRequestTarget target, final GroupTO ignore) {
+ target.add(typeExtensionsModal.setContent(new TypeExtensionDirectoryPanel(
+ typeExtensionsModal, model.getObject(), pageRef)));
+ typeExtensionsModal.header(new StringResourceModel("typeExtensions", model));
+ typeExtensionsModal.show(true);
+ }
+ }, ActionType.TYPE_EXTENSIONS, StandardEntitlement.GROUP_UPDATE);
- private static final long serialVersionUID = 6242834621660352855L;
+ panel.add(new ActionLink<GroupTO>() {
- @Override
- public void onClick(final AjaxRequestTarget target, final GroupTO ignore) {
- target.add(typeExtensionsModal.setContent(new TypeExtensionDirectoryPanel(
- typeExtensionsModal, model.getObject(), pageRef)));
- typeExtensionsModal.header(new StringResourceModel("typeExtensions", model));
- typeExtensionsModal.show(true);
- }
- }, ActionType.TYPE_EXTENSIONS, StandardEntitlement.GROUP_UPDATE).add(new ActionLink<GroupTO>() {
+ private static final long serialVersionUID = -7978723352517770645L;
- private static final long serialVersionUID = 6242834621660352855L;
+ @Override
+ public void onClick(final AjaxRequestTarget target, final GroupTO ignore) {
+ templates.setTargetObject(model.getObject());
+ templates.toggle(target, true);
+ }
- @Override
- public void onClick(final AjaxRequestTarget target, final GroupTO ignore) {
- GroupTO clone = SerializationUtils.clone(model.getObject());
- clone.setKey(null);
- send(GroupDirectoryPanel.this, Broadcast.EXACT,
- new AjaxWizard.NewItemActionEvent<>(new GroupWrapper(clone), target));
- }
- }, ActionType.CLONE, StandardEntitlement.GROUP_CREATE).add(new ActionLink<GroupTO>() {
+ @Override
+ public boolean isIndicatorEnabled() {
+ return false;
+ }
+ }, ActionType.MEMBERS, StandardEntitlement.GROUP_READ);
- private static final long serialVersionUID = -7978723352517770644L;
+ panel.add(new ActionLink<GroupTO>() {
- @Override
- public void onClick(final AjaxRequestTarget target, final GroupTO ignore) {
- target.add(utilityModal.setContent(new AnyPropagationTasks(
- utilityModal, AnyTypeKind.GROUP, model.getObject().getKey(), pageRef)));
- utilityModal.header(new StringResourceModel("any.propagation.tasks", model));
- utilityModal.show(true);
- }
- }, ActionType.PROPAGATION_TASKS, StandardEntitlement.TASK_LIST).add(new ActionLink<GroupTO>() {
+ private static final long serialVersionUID = -7978723352517770644L;
- private static final long serialVersionUID = -7978723352517770644L;
+ @Override
+ public void onClick(final AjaxRequestTarget target, final GroupTO ignore) {
+ try {
+ restClient.bulkMembersAction(model.getObject().getKey(), BulkMembersActionType.PROVISION);
+ SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));
+ target.add(container);
+ } catch (SyncopeClientException e) {
+ LOG.error("While provisioning members of group {}", model.getObject().getKey(), e);
+ SyncopeConsoleSession.get().error(StringUtils.isBlank(e.getMessage())
+ ? e.getClass().getName() : e.getMessage());
+ }
+ ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target);
+ }
+ }, ActionType.PROVISION_MEMBERS,
+ String.format("%s,%s", StandardEntitlement.TASK_CREATE, StandardEntitlement.TASK_EXECUTE));
- @Override
- public void onClick(final AjaxRequestTarget target, final GroupTO ignore) {
- target.add(utilityModal.setContent(
- new NotificationTasks(AnyTypeKind.GROUP, model.getObject().getKey(), pageRef)));
- utilityModal.header(new StringResourceModel("any.notification.tasks", model));
- utilityModal.show(true);
- }
- }, ActionType.NOTIFICATION_TASKS, StandardEntitlement.TASK_LIST).add(new ActionLink<GroupTO>() {
+ panel.add(
+ new ActionLink<GroupTO>() {
- private static final long serialVersionUID = -7978723352517770644L;
+ private static final long serialVersionUID = -7978723352517770644L;
- @Override
- public void onClick(final AjaxRequestTarget target, final GroupTO ignore) {
- try {
- restClient.delete(model.getObject().getETagValue(), model.getObject().getKey());
- SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));
- target.add(container);
- } catch (SyncopeClientException e) {
- LOG.error("While deleting object {}", model.getObject().getKey(), e);
- SyncopeConsoleSession.get().error(StringUtils.isBlank(e.getMessage())
- ? e.getClass().getName() : e.getMessage());
- }
- ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target);
- }
- }, ActionType.DELETE, StandardEntitlement.GROUP_DELETE).add(new ActionLink<GroupTO>() {
+ @Override
+ public void onClick(final AjaxRequestTarget target, final GroupTO ignore) {
+ try {
+ restClient.bulkMembersAction(model.getObject().getKey(), BulkMembersActionType.DEPROVISION);
+ SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));
+ target.add(container);
+ } catch (SyncopeClientException e) {
+ LOG.error("While provisioning members of group {}", model.getObject().getKey(), e);
+ SyncopeConsoleSession.get().error(StringUtils.isBlank(e.getMessage())
+ ? e.getClass().getName() : e.getMessage());
+ }
+ ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target);
+ }
+ }, ActionType.DEPROVISION_MEMBERS,
+ String.format("%s,%s", StandardEntitlement.TASK_CREATE, StandardEntitlement.TASK_EXECUTE));
- private static final long serialVersionUID = -7978723352517770644L;
+ panel.add(new ActionLink<GroupTO>() {
- @Override
- public void onClick(final AjaxRequestTarget target, final GroupTO ignore) {
- try {
- restClient.bulkMembersAction(model.getObject().getKey(), BulkMembersActionType.PROVISION);
- SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));
- target.add(container);
- } catch (SyncopeClientException e) {
- LOG.error("While provisioning members of group {}", model.getObject().getKey(), e);
- SyncopeConsoleSession.get().error(StringUtils.isBlank(e.getMessage())
- ? e.getClass().getName() : e.getMessage());
- }
- ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target);
- }
- }, ActionType.PROVISION_MEMBERS,
- String.format("%s,%s", StandardEntitlement.TASK_CREATE, StandardEntitlement.TASK_EXECUTE)).add(
- new ActionLink<GroupTO>() {
+ private static final long serialVersionUID = -7978723352517770645L;
- private static final long serialVersionUID = -7978723352517770644L;
+ @Override
+ public void onClick(final AjaxRequestTarget target, final GroupTO ignore) {
+ IModel<AnyWrapper<GroupTO>> formModel = new CompoundPropertyModel<>(
+ new AnyWrapper<>(model.getObject()));
+ altDefaultModal.setFormModel(formModel);
+
+ target.add(altDefaultModal.setContent(new AnyStatusModal<>(
+ altDefaultModal,
+ pageRef,
+ formModel.getObject().getInnerObject(),
+ "resourceName",
+ false)));
+
+ altDefaultModal.header(new Model<>(
+ getString("any.edit", new Model<>(new AnyWrapper<>(model.getObject())))));
+
+ altDefaultModal.show(true);
+ }
+ }, ActionType.MANAGE_RESOURCES, StandardEntitlement.GROUP_READ);
- @Override
- public void onClick(final AjaxRequestTarget target, final GroupTO ignore) {
- try {
- restClient.bulkMembersAction(model.getObject().getKey(), BulkMembersActionType.DEPROVISION);
- SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));
- target.add(container);
- } catch (SyncopeClientException e) {
- LOG.error("While provisioning members of group {}", model.getObject().getKey(), e);
- SyncopeConsoleSession.get().error(StringUtils.isBlank(e.getMessage())
- ? e.getClass().getName() : e.getMessage());
- }
- ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target);
- }
- }, ActionType.DEPROVISION_MEMBERS,
- String.format("%s,%s", StandardEntitlement.TASK_CREATE, StandardEntitlement.TASK_EXECUTE));
+ panel.add(new ActionLink<GroupTO>() {
- return panel.build(componentId);
- }
+ private static final long serialVersionUID = -7978723352517770644L;
@Override
- public ActionLinksPanel<Serializable> getHeader(final String componentId) {
- final ActionLinksPanel.Builder<Serializable> panel = ActionLinksPanel.builder();
+ public void onClick(final AjaxRequestTarget target, final GroupTO ignore) {
+ target.add(utilityModal.setContent(new AnyPropagationTasks(
+ utilityModal, AnyTypeKind.GROUP, model.getObject().getKey(), pageRef)));
+ utilityModal.header(new StringResourceModel("any.propagation.tasks", model));
+ utilityModal.show(true);
+ }
+ }, ActionType.PROPAGATION_TASKS, StandardEntitlement.TASK_LIST);
- return panel.add(new ActionLink<Serializable>() {
+ panel.add(new ActionLink<GroupTO>() {
- private static final long serialVersionUID = -7978723352517770644L;
+ private static final long serialVersionUID = -7978723352517770644L;
- @Override
- public void onClick(final AjaxRequestTarget target, final Serializable ignore) {
- target.add(displayAttributeModal.setContent(new GroupDisplayAttributesModalPanel<>(
- displayAttributeModal, page.getPageReference(), pSchemaNames, dSchemaNames)));
- displayAttributeModal.header(new ResourceModel("any.attr.display"));
- displayAttributeModal.show(true);
- }
- }, ActionType.CHANGE_VIEW, StandardEntitlement.GROUP_READ).add(
- new ActionLink<Serializable>() {
+ @Override
+ public void onClick(final AjaxRequestTarget target, final GroupTO ignore) {
+ target.add(utilityModal.setContent(
+ new NotificationTasks(AnyTypeKind.GROUP, model.getObject().getKey(), pageRef)));
+ utilityModal.header(new StringResourceModel("any.notification.tasks", model));
+ utilityModal.show(true);
+ }
+ }, ActionType.NOTIFICATION_TASKS, StandardEntitlement.TASK_LIST);
- private static final long serialVersionUID = -7978723352517770644L;
+ panel.add(new ActionLink<GroupTO>() {
- @Override
- public void onClick(final AjaxRequestTarget target, final Serializable ignore) {
- if (target != null) {
- target.add(container);
- }
- }
- }, ActionType.RELOAD).build(componentId);
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target, final GroupTO ignore) {
+ try {
+ restClient.delete(model.getObject().getETagValue(), model.getObject().getKey());
+ SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));
+ target.add(container);
+ } catch (SyncopeClientException e) {
+ LOG.error("While deleting object {}", model.getObject().getKey(), e);
+ SyncopeConsoleSession.get().error(StringUtils.isBlank(e.getMessage())
+ ? e.getClass().getName() : e.getMessage());
+ }
+ ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target);
}
- });
+ }, ActionType.DELETE, StandardEntitlement.GROUP_DELETE, true);
- return columns;
+ return panel;
}
public static class Builder extends AnyDirectoryPanel.Builder<GroupTO, GroupRestClient> {
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/java/org/apache/syncope/client/console/panels/GroupDisplayAttributesModalPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/GroupDisplayAttributesModalPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/GroupDisplayAttributesModalPanel.java
index 43b8b93..89d8dc9 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/GroupDisplayAttributesModalPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/GroupDisplayAttributesModalPanel.java
@@ -35,7 +35,7 @@ public class GroupDisplayAttributesModalPanel<T extends Serializable> extends Di
private static final long serialVersionUID = 5194630813773543054L;
- public static final String[] DEFAULT_SELECTION = { "key", "name" };
+ public static final String[] DEFAULT_SELECTION = { "name" };
public GroupDisplayAttributesModalPanel(
final BaseModal<T> modal,
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/java/org/apache/syncope/client/console/panels/ListViewPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/ListViewPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/ListViewPanel.java
index e015621..16c4b77 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/ListViewPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/ListViewPanel.java
@@ -31,7 +31,7 @@ import org.apache.commons.collections4.Predicate;
import org.apache.commons.lang3.StringUtils;
import org.apache.syncope.client.console.wicket.ajax.form.IndicatorAjaxFormChoiceComponentUpdatingBehavior;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
-import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionsPanel;
import org.apache.syncope.client.console.wizards.AjaxWizard;
import org.apache.syncope.client.console.wizards.WizardMgtPanel;
import org.apache.wicket.Component;
@@ -97,7 +97,7 @@ public abstract class ListViewPanel<T extends Serializable> extends WizardMgtPan
final List<T> list,
final Class<T> reference,
final List<String> includes,
- final ActionLinksPanel.Builder<T> actions,
+ final ActionsPanel<T> actions,
final CheckAvailability check,
final boolean reuseItem,
final boolean wizardInModal,
@@ -179,7 +179,7 @@ public abstract class ListViewPanel<T extends Serializable> extends WizardMgtPan
}
};
beanItem.add(fields);
- beanItem.add(actions.build("actions", bean));
+ beanItem.add(actions.clone("actions", new Model<>(bean)));
}
};
beans.setOutputMarkupId(true);
@@ -227,7 +227,7 @@ public abstract class ListViewPanel<T extends Serializable> extends WizardMgtPan
private final List<String> includes = new ArrayList<>();
- private final ActionLinksPanel.Builder<T> actions;
+ private final ActionsPanel<T> actions;
private List<T> items;
@@ -241,7 +241,7 @@ public abstract class ListViewPanel<T extends Serializable> extends WizardMgtPan
super(pageRef);
this.reference = reference;
this.items = null;
- this.actions = ActionLinksPanel.<T>builder();
+ this.actions = new ActionsPanel<T>("actions", null);
}
public Builder<T> setModel(final IModel<? extends Collection<T>> model) {
@@ -313,7 +313,24 @@ public abstract class ListViewPanel<T extends Serializable> extends WizardMgtPan
*/
public Builder<T> addAction(
final ActionLink<T> link, final ActionLink.ActionType type, final String entitlements) {
- actions.add(link, type, entitlements);
+ return addAction(link, type, entitlements, false);
+ }
+
+ /**
+ * Add item action (the given order is ignored.
+ *
+ * @param link action link.
+ * @param type action type.
+ * @param entitlements entitlements.
+ * @param onConfirm specify TRUE to ask for confirmation.
+ * @return current builder object.
+ */
+ public Builder<T> addAction(
+ final ActionLink<T> link,
+ final ActionLink.ActionType type,
+ final String entitlements,
+ final boolean onConfirm) {
+ actions.add(link, type, entitlements, onConfirm).hideLabel();
return this;
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/java/org/apache/syncope/client/console/panels/ParametersDirectoryPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/ParametersDirectoryPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/ParametersDirectoryPanel.java
new file mode 100644
index 0000000..cfac249
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/ParametersDirectoryPanel.java
@@ -0,0 +1,212 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.client.console.panels;
+
+import de.agilecoders.wicket.core.markup.html.bootstrap.dialog.Modal;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.syncope.client.console.SyncopeConsoleSession;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.commons.DirectoryDataProvider;
+import org.apache.syncope.client.console.commons.SortableDataProviderComparator;
+import org.apache.syncope.client.console.pages.BasePage;
+import org.apache.syncope.client.console.rest.ConfRestClient;
+import org.apache.syncope.client.console.rest.SchemaRestClient;
+import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionsPanel;
+import org.apache.syncope.client.console.wizards.AbstractModalPanelBuilder;
+import org.apache.syncope.client.console.wizards.AjaxWizard;
+import org.apache.syncope.client.console.wizards.WizardMgtPanel;
+import org.apache.syncope.common.lib.to.AttrTO;
+import org.apache.syncope.common.lib.types.StandardEntitlement;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow.WindowClosedCallback;
+import org.apache.wicket.extensions.markup.html.repeater.data.sort.SortOrder;
+import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn;
+import org.apache.wicket.extensions.markup.html.repeater.data.table.PropertyColumn;
+import org.apache.wicket.model.CompoundPropertyModel;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.ResourceModel;
+import org.apache.wicket.model.StringResourceModel;
+
+public class ParametersDirectoryPanel
+ extends DirectoryPanel<AttrTO, AttrTO, ParametersDirectoryPanel.ParametersProvider, ConfRestClient> {
+
+ private static final long serialVersionUID = 2765863608539154422L;
+
+ private final SchemaRestClient schemaRestClient = new SchemaRestClient();
+
+ private final BaseModal<AttrTO> modalDetails = new BaseModal<AttrTO>("modalDetails") {
+
+ private static final long serialVersionUID = 389935548143327858L;
+
+ @Override
+ protected void onConfigure() {
+ super.onConfigure();
+ setFooterVisible(true);
+ }
+ };
+
+ public ParametersDirectoryPanel(final String id, final PageReference pageRef) {
+ super(id, new Builder<AttrTO, AttrTO, ConfRestClient>(new ConfRestClient(), pageRef) {
+
+ private static final long serialVersionUID = 8769126634538601689L;
+
+ @Override
+ protected WizardMgtPanel<AttrTO> newInstance(final String id, final boolean wizardInModal) {
+ throw new UnsupportedOperationException();
+ }
+ });
+
+ itemKeyFieldName = "schema";
+ disableCheckBoxes();
+
+ modalDetails.setWindowClosedCallback(new WindowClosedCallback() {
+
+ private static final long serialVersionUID = 8804221891699487139L;
+
+ @Override
+ public void onClose(final AjaxRequestTarget target) {
+ modalDetails.show(false);
+ target.add(container);
+ }
+ });
+
+ addInnerObject(modalDetails);
+
+ this.addNewItemPanelBuilder(new AbstractModalPanelBuilder<AttrTO>(new AttrTO(), pageRef) {
+
+ private static final long serialVersionUID = 1995192603527154740L;
+
+ @Override
+ public WizardModalPanel<AttrTO> build(final String id, final int index, final AjaxWizard.Mode mode) {
+ return new ParametersCreateModalPanel(modal, newModelObject(), pageRef);
+ }
+ }, true);
+ modal.size(Modal.Size.Medium);
+ initResultTable();
+
+ MetaDataRoleAuthorizationStrategy.authorize(addAjaxLink, RENDER, StandardEntitlement.CONFIGURATION_SET);
+ }
+
+ public ParametersDirectoryPanel(final String id, final Builder<AttrTO, AttrTO, ConfRestClient> builder) {
+ super(id, builder);
+ }
+
+ @Override
+ protected ParametersProvider dataProvider() {
+ return new ParametersProvider(rows);
+ }
+
+ @Override
+ protected String paginatorRowsKey() {
+ return Constants.PREF_PARAMETERS_PAGINATOR_ROWS;
+ }
+
+ @Override
+ protected Collection<ActionLink.ActionType> getBulkActions() {
+ return Collections.<ActionLink.ActionType>singletonList(ActionLink.ActionType.DELETE);
+ }
+
+ @Override
+ protected List<IColumn<AttrTO, String>> getColumns() {
+ final List<IColumn<AttrTO, String>> columns = new ArrayList<>();
+ columns.add(new PropertyColumn<AttrTO, String>(new ResourceModel("schema"), "schema"));
+ columns.add(new PropertyColumn<AttrTO, String>(new ResourceModel("values"), "values"));
+ return columns;
+ }
+
+ @Override
+ public ActionsPanel<AttrTO> getActions(final IModel<AttrTO> model) {
+ final ActionsPanel<AttrTO> panel = super.getActions(model);
+
+ panel.add(new ActionLink<AttrTO>() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target, final AttrTO ignore) {
+ target.add(modalDetails);
+ modalDetails.addSubmitButton();
+ modalDetails.header(new StringResourceModel("any.edit"));
+ modalDetails.setContent(new ParametersEditModalPanel(modalDetails, model.getObject(), pageRef));
+ modalDetails.show(true);
+ }
+ }, ActionLink.ActionType.EDIT, StandardEntitlement.CONFIGURATION_SET);
+
+ panel.add(new ActionLink<AttrTO>() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target, final AttrTO ignore) {
+ try {
+ restClient.delete(model.getObject().getSchema());
+ schemaRestClient.deletePlainSchema(model.getObject().getSchema());
+ SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));
+ target.add(container);
+ } catch (Exception e) {
+ LOG.error("While deleting {}", model.getObject(), e);
+ SyncopeConsoleSession.get().error(StringUtils.isBlank(e.getMessage())
+ ? e.getClass().getName() : e.getMessage());
+ }
+ ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target);
+ }
+ }, ActionLink.ActionType.DELETE, StandardEntitlement.CONFIGURATION_DELETE);
+
+ return panel;
+ }
+
+ protected final class ParametersProvider extends DirectoryDataProvider<AttrTO> {
+
+ private static final long serialVersionUID = -185944053385660794L;
+
+ private final SortableDataProviderComparator<AttrTO> comparator;
+
+ private ParametersProvider(final int paginatorRows) {
+ super(paginatorRows);
+ setSort("schema", SortOrder.ASCENDING);
+ comparator = new SortableDataProviderComparator<>(this);
+ }
+
+ @Override
+ public Iterator<AttrTO> iterator(final long first, final long count) {
+ final List<AttrTO> list = restClient.list();
+ Collections.sort(list, comparator);
+ return list.subList((int) first, (int) first + (int) count).iterator();
+ }
+
+ @Override
+ public long size() {
+ return restClient.list().size();
+ }
+
+ @Override
+ public IModel<AttrTO> model(final AttrTO object) {
+ return new CompoundPropertyModel<>(object);
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/java/org/apache/syncope/client/console/panels/ParametersPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/ParametersPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/ParametersPanel.java
deleted file mode 100644
index edfa732..0000000
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/ParametersPanel.java
+++ /dev/null
@@ -1,234 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.client.console.panels;
-
-import de.agilecoders.wicket.core.markup.html.bootstrap.dialog.Modal;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.syncope.client.console.SyncopeConsoleSession;
-import org.apache.syncope.client.console.commons.Constants;
-import org.apache.syncope.client.console.commons.DirectoryDataProvider;
-import org.apache.syncope.client.console.commons.SortableDataProviderComparator;
-import org.apache.syncope.client.console.pages.BasePage;
-import org.apache.syncope.client.console.panels.ParametersPanel.ParametersProvider;
-import org.apache.syncope.client.console.rest.ConfRestClient;
-import org.apache.syncope.client.console.rest.SchemaRestClient;
-import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.ActionColumn;
-import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
-import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
-import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
-import org.apache.syncope.client.console.wizards.AbstractModalPanelBuilder;
-import org.apache.syncope.client.console.wizards.AjaxWizard;
-import org.apache.syncope.client.console.wizards.WizardMgtPanel;
-import org.apache.syncope.common.lib.to.AttrTO;
-import org.apache.syncope.common.lib.types.StandardEntitlement;
-import org.apache.wicket.PageReference;
-import org.apache.wicket.ajax.AjaxRequestTarget;
-import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy;
-import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow.WindowClosedCallback;
-import org.apache.wicket.extensions.markup.html.repeater.data.sort.SortOrder;
-import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn;
-import org.apache.wicket.extensions.markup.html.repeater.data.table.PropertyColumn;
-import org.apache.wicket.model.CompoundPropertyModel;
-import org.apache.wicket.model.IModel;
-import org.apache.wicket.model.ResourceModel;
-import org.apache.wicket.model.StringResourceModel;
-
-public class ParametersPanel extends DirectoryPanel<AttrTO, AttrTO, ParametersProvider, ConfRestClient> {
-
- private static final long serialVersionUID = 2765863608539154422L;
-
- private final SchemaRestClient schemaRestClient = new SchemaRestClient();
-
- private final BaseModal<AttrTO> modalDetails = new BaseModal<AttrTO>("modalDetails") {
-
- private static final long serialVersionUID = 389935548143327858L;
-
- @Override
- protected void onConfigure() {
- super.onConfigure();
- setFooterVisible(true);
- }
- };
-
- public ParametersPanel(final String id, final PageReference pageRef) {
- super(id, new Builder<AttrTO, AttrTO, ConfRestClient>(new ConfRestClient(), pageRef) {
-
- private static final long serialVersionUID = 8769126634538601689L;
-
- @Override
- protected WizardMgtPanel<AttrTO> newInstance(final String id, final boolean wizardInModal) {
- throw new UnsupportedOperationException();
- }
- });
-
- modalDetails.setWindowClosedCallback(new WindowClosedCallback() {
-
- private static final long serialVersionUID = 8804221891699487139L;
-
- @Override
- public void onClose(final AjaxRequestTarget target) {
- modalDetails.show(false);
- target.add(container);
- }
- });
-
- addInnerObject(modalDetails);
-
- this.addNewItemPanelBuilder(new AbstractModalPanelBuilder<AttrTO>(new AttrTO(), pageRef) {
-
- private static final long serialVersionUID = 1995192603527154740L;
-
- @Override
- public WizardModalPanel<AttrTO> build(final String id, final int index, final AjaxWizard.Mode mode) {
- return new ParametersCreateModalPanel(modal, newModelObject(), pageRef);
- }
- }, true);
- modal.size(Modal.Size.Medium);
- initResultTable();
-
- MetaDataRoleAuthorizationStrategy.authorize(addAjaxLink, RENDER, StandardEntitlement.CONFIGURATION_SET);
- }
-
- public ParametersPanel(final String id, final Builder<AttrTO, AttrTO, ConfRestClient> builder) {
- super(id, builder);
- }
-
- @Override
- protected ParametersProvider dataProvider() {
- return new ParametersProvider(rows);
- }
-
- @Override
- protected String paginatorRowsKey() {
- return Constants.PREF_PARAMETERS_PAGINATOR_ROWS;
- }
-
- @Override
- protected Collection<ActionLink.ActionType> getBulkActions() {
- return Collections.<ActionLink.ActionType>emptyList();
- }
-
- @Override
- protected List<IColumn<AttrTO, String>> getColumns() {
- final List<IColumn<AttrTO, String>> columns = new ArrayList<>();
-
- columns.add(new PropertyColumn<AttrTO, String>(new ResourceModel("schema"), "schema", "schema"));
- columns.add(new PropertyColumn<AttrTO, String>(new ResourceModel("values"), "values"));
-
- columns.add(new ActionColumn<AttrTO, String>(new ResourceModel("actions")) {
-
- private static final long serialVersionUID = 906457126287899096L;
-
- @Override
- public ActionLinksPanel<AttrTO> getActions(final String componentId, final IModel<AttrTO> model) {
- ActionLinksPanel<AttrTO> panel = ActionLinksPanel.<AttrTO>builder().
- add(new ActionLink<AttrTO>() {
-
- private static final long serialVersionUID = -3722207913631435501L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final AttrTO ignore) {
- target.add(modalDetails);
- modalDetails.addSubmitButton();
- modalDetails.header(new StringResourceModel("any.edit"));
- modalDetails.setContent(
- new ParametersEditModalPanel(modalDetails, model.getObject(), pageRef));
- modalDetails.show(true);
- }
- }, ActionLink.ActionType.EDIT, StandardEntitlement.CONFIGURATION_SET).
- add(new ActionLink<AttrTO>() {
-
- private static final long serialVersionUID = -3722207913631435501L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final AttrTO ignore) {
- try {
- restClient.delete(model.getObject().getSchema());
- schemaRestClient.deletePlainSchema(model.getObject().getSchema());
- SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));
- target.add(container);
- } catch (Exception e) {
- LOG.error("While deleting {}", model.getObject(), e);
- SyncopeConsoleSession.get().error(StringUtils.isBlank(e.getMessage())
- ? e.getClass().getName() : e.getMessage());
- }
- ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target);
- }
- }, ActionLink.ActionType.DELETE, StandardEntitlement.CONFIGURATION_DELETE).
- build(componentId);
-
- return panel;
- }
-
- @Override
- public ActionLinksPanel<AttrTO> getHeader(final String componentId) {
- final ActionLinksPanel.Builder<AttrTO> panel = ActionLinksPanel.builder();
-
- return panel.add(new ActionLink<AttrTO>() {
-
- private static final long serialVersionUID = -1140254463922516111L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final AttrTO ignore) {
- if (target != null) {
- target.add(container);
- }
- }
- }, ActionLink.ActionType.RELOAD).build(componentId);
- }
- });
-
- return columns;
- }
-
- protected final class ParametersProvider extends DirectoryDataProvider<AttrTO> {
-
- private static final long serialVersionUID = -185944053385660794L;
-
- private final SortableDataProviderComparator<AttrTO> comparator;
-
- private ParametersProvider(final int paginatorRows) {
- super(paginatorRows);
- setSort("schema", SortOrder.ASCENDING);
- comparator = new SortableDataProviderComparator<>(this);
- }
-
- @Override
- public Iterator<AttrTO> iterator(final long first, final long count) {
- final List<AttrTO> list = restClient.list();
- Collections.sort(list, comparator);
- return list.subList((int) first, (int) first + (int) count).iterator();
- }
-
- @Override
- public long size() {
- return restClient.list().size();
- }
-
- @Override
- public IModel<AttrTO> model(final AttrTO object) {
- return new CompoundPropertyModel<>(object);
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/java/org/apache/syncope/client/console/panels/Realm.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/Realm.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/Realm.java
index 4422b51..30c3b21 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/Realm.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/Realm.java
@@ -42,7 +42,7 @@ import org.apache.syncope.client.console.layout.GroupFormLayoutInfo;
import org.apache.syncope.client.console.layout.UserFormLayoutInfo;
import org.apache.syncope.client.console.rest.AnyTypeRestClient;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
-import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionsPanel;
import org.apache.syncope.client.console.wizards.WizardMgtPanel;
import org.apache.syncope.client.console.wizards.any.ConnObjectPanel;
import org.apache.syncope.common.lib.to.AnyTypeTO;
@@ -86,8 +86,8 @@ public abstract class Realm extends WizardMgtPanel<RealmTO> {
setPageRef(pageRef);
- AjaxBootstrapTabbedPanel<ITab> tabbedPanel =
- new AjaxBootstrapTabbedPanel<>("tabbedPanel", buildTabList(pageRef));
+ AjaxBootstrapTabbedPanel<ITab> tabbedPanel
+ = new AjaxBootstrapTabbedPanel<>("tabbedPanel", buildTabList(pageRef));
tabbedPanel.setSelectedTab(selectedIndex);
addInnerObject(tabbedPanel);
this.wizardBuilder = new RealmWizardBuilder(pageRef);
@@ -112,54 +112,57 @@ public abstract class Realm extends WizardMgtPanel<RealmTO> {
@Override
public Panel getPanel(final String panelId) {
- ActionLinksPanel<RealmTO> actionLinksPanel = ActionLinksPanel.<RealmTO>builder().
- add(new ActionLink<RealmTO>(realmTO) {
-
- private static final long serialVersionUID = 2802988981431379827L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final RealmTO modelObject) {
- onClickTemplate(target);
- }
- }, ActionLink.ActionType.TEMPLATE, StandardEntitlement.REALM_UPDATE).
- add(new ActionLink<RealmTO>(realmTO) {
-
- private static final long serialVersionUID = 2802988981431379827L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final RealmTO modelObject) {
- onClickCreate(target);
- }
- }, ActionLink.ActionType.CREATE, StandardEntitlement.REALM_CREATE).
- add(new ActionLink<RealmTO>(realmTO) {
-
- private static final long serialVersionUID = 2802988981431379828L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final RealmTO modelObject) {
- onClickEdit(target, realmTO);
- }
- }, ActionLink.ActionType.EDIT, StandardEntitlement.REALM_UPDATE).
- add(new ActionLink<RealmTO>(realmTO) {
-
- private static final long serialVersionUID = 2802988981431379829L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final RealmTO modelObject) {
- onClickDelete(target, realmTO);
- }
- }, ActionLink.ActionType.DELETE, StandardEntitlement.REALM_DELETE).
- build("actions");
-
- RealmDetails panel = new RealmDetails(panelId, realmTO, actionLinksPanel, false);
+ final ActionsPanel<RealmTO> actionPanel = new ActionsPanel<>("actions", null);
+
+ actionPanel.add(new ActionLink<RealmTO>(realmTO) {
+
+ private static final long serialVersionUID = 2802988981431379827L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target, final RealmTO ignore) {
+ onClickCreate(target);
+ }
+ }, ActionLink.ActionType.CREATE, StandardEntitlement.REALM_CREATE).hideLabel();
+
+ actionPanel.add(new ActionLink<RealmTO>(realmTO) {
+
+ private static final long serialVersionUID = 2802988981431379828L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target, final RealmTO ignore) {
+ onClickEdit(target, realmTO);
+ }
+ }, ActionLink.ActionType.EDIT, StandardEntitlement.REALM_UPDATE).hideLabel();
+
+ actionPanel.add(new ActionLink<RealmTO>(realmTO) {
+
+ private static final long serialVersionUID = 2802988981431379827L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target, final RealmTO ignore) {
+ onClickTemplate(target);
+ }
+ }, ActionLink.ActionType.TEMPLATE, StandardEntitlement.REALM_UPDATE).hideLabel();
+
+ actionPanel.add(new ActionLink<RealmTO>(realmTO) {
+
+ private static final long serialVersionUID = 2802988981431379829L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target, final RealmTO ignore) {
+ onClickDelete(target, realmTO);
+ }
+ }, ActionLink.ActionType.DELETE, StandardEntitlement.REALM_DELETE, true).hideLabel();
+
+ RealmDetails panel = new RealmDetails(panelId, realmTO, actionPanel, false);
panel.setContentEnabled(false);
- actionLinksPanel.setEnabled(true);
+ actionPanel.setEnabled(true);
return panel;
}
});
- final Triple<UserFormLayoutInfo, GroupFormLayoutInfo, Map<String, AnyObjectFormLayoutInfo>> formLayoutInfo =
- FormLayoutInfoUtils.fetch(anyTypeTOs);
+ final Triple<UserFormLayoutInfo, GroupFormLayoutInfo, Map<String, AnyObjectFormLayoutInfo>> formLayoutInfo
+ = FormLayoutInfoUtils.fetch(anyTypeTOs);
Collections.sort(anyTypeTOs, new AnyTypeComparator());
for (final AnyTypeTO anyTypeTO : anyTypeTOs) {
@@ -204,8 +207,8 @@ public abstract class Realm extends WizardMgtPanel<RealmTO> {
propagations.add(syncope);
propagations.addAll(((ProvisioningResult) result).getPropagationStatuses());
- ListViewPanel.Builder<PropagationStatus> builder =
- new ListViewPanel.Builder<PropagationStatus>(PropagationStatus.class, pageRef) {
+ ListViewPanel.Builder<PropagationStatus> builder = new ListViewPanel.Builder<PropagationStatus>(
+ PropagationStatus.class, pageRef) {
private static final long serialVersionUID = -6809736686861678498L;
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/java/org/apache/syncope/client/console/panels/RealmDetails.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/RealmDetails.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/RealmDetails.java
index 603e49b..4f48c3c 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/RealmDetails.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/RealmDetails.java
@@ -26,7 +26,7 @@ import org.apache.commons.collections4.CollectionUtils;
import org.apache.syncope.client.console.SyncopeConsoleSession;
import org.apache.syncope.client.console.rest.PolicyRestClient;
import org.apache.syncope.client.console.rest.ResourceRestClient;
-import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionsPanel;
import org.apache.syncope.client.console.wicket.markup.html.form.AjaxDropDownChoicePanel;
import org.apache.syncope.client.console.wicket.markup.html.form.AjaxPalettePanel;
import org.apache.syncope.client.console.wicket.markup.html.form.AjaxTextFieldPanel;
@@ -105,7 +105,7 @@ public class RealmDetails extends Panel {
public RealmDetails(
final String id,
final RealmTO realmTO,
- final ActionLinksPanel<?> actions,
+ final ActionsPanel<?> actions,
final boolean unwrapped) {
super(id);
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/java/org/apache/syncope/client/console/panels/RelationshipTypesPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/RelationshipTypesPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/RelationshipTypesPanel.java
index 7b5976b..a83c440 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/RelationshipTypesPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/RelationshipTypesPanel.java
@@ -34,10 +34,9 @@ import org.apache.syncope.client.console.commons.SortableDataProviderComparator;
import org.apache.syncope.client.console.pages.BasePage;
import org.apache.syncope.client.console.panels.RelationshipTypesPanel.RelationshipTypeProvider;
import org.apache.syncope.client.console.rest.RelationshipTypeRestClient;
-import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.ActionColumn;
import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.BooleanPropertyColumn;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
-import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionsPanel;
import org.apache.syncope.client.console.wizards.AbstractModalPanelBuilder;
import org.apache.syncope.client.console.wizards.AjaxWizard;
import org.apache.syncope.common.lib.to.RelationshipTypeTO;
@@ -156,67 +155,43 @@ public class RelationshipTypesPanel extends TypesDirectoryPanel<
}
}
- columns.add(new ActionColumn<RelationshipTypeTO, String>(new ResourceModel("actions")) {
-
- private static final long serialVersionUID = 906457126287899096L;
-
- @Override
- public ActionLinksPanel<RelationshipTypeTO> getActions(
- final String componentId, final IModel<RelationshipTypeTO> model) {
-
- ActionLinksPanel<RelationshipTypeTO> panel = ActionLinksPanel.<RelationshipTypeTO>builder().
- add(new ActionLink<RelationshipTypeTO>() {
+ return columns;
+ }
- private static final long serialVersionUID = -3722207913631435501L;
+ @Override
+ public ActionsPanel<RelationshipTypeTO> getActions(final IModel<RelationshipTypeTO> model) {
+ final ActionsPanel<RelationshipTypeTO> panel = super.getActions(model);
- @Override
- public void onClick(final AjaxRequestTarget target, final RelationshipTypeTO ignore) {
- send(RelationshipTypesPanel.this, Broadcast.EXACT,
- new AjaxWizard.EditItemActionEvent<>(model.getObject(), target));
- }
- }, ActionLink.ActionType.EDIT, StandardEntitlement.RELATIONSHIPTYPE_UPDATE).
- add(new ActionLink<RelationshipTypeTO>() {
-
- private static final long serialVersionUID = -3722207913631435501L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final RelationshipTypeTO ignore) {
- try {
- restClient.delete(model.getObject().getKey());
- SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));
- target.add(container);
- } catch (Exception e) {
- LOG.error("While deleting {}", model.getObject(), e);
- SyncopeConsoleSession.get().error(StringUtils.isBlank(e.getMessage())
- ? e.getClass().getName() : e.getMessage());
- }
- ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target);
- }
- }, ActionLink.ActionType.DELETE, StandardEntitlement.RELATIONSHIPTYPE_DELETE).
- build(componentId);
+ panel.add(new ActionLink<RelationshipTypeTO>() {
- return panel;
- }
+ private static final long serialVersionUID = -3722207913631435501L;
@Override
- public ActionLinksPanel<RelationshipTypeTO> getHeader(final String componentId) {
- final ActionLinksPanel.Builder<RelationshipTypeTO> panel = ActionLinksPanel.builder();
-
- return panel.add(new ActionLink<RelationshipTypeTO>() {
+ public void onClick(final AjaxRequestTarget target, final RelationshipTypeTO ignore) {
+ send(RelationshipTypesPanel.this, Broadcast.EXACT,
+ new AjaxWizard.EditItemActionEvent<>(model.getObject(), target));
+ }
+ }, ActionLink.ActionType.EDIT, StandardEntitlement.RELATIONSHIPTYPE_UPDATE);
+ panel.add(new ActionLink<RelationshipTypeTO>() {
- private static final long serialVersionUID = -1140254463922516111L;
+ private static final long serialVersionUID = -3722207913631435501L;
- @Override
- public void onClick(final AjaxRequestTarget target, final RelationshipTypeTO ignore) {
- if (target != null) {
- target.add(container);
- }
- }
- }, ActionLink.ActionType.RELOAD).build(componentId);
+ @Override
+ public void onClick(final AjaxRequestTarget target, final RelationshipTypeTO ignore) {
+ try {
+ restClient.delete(model.getObject().getKey());
+ SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));
+ target.add(container);
+ } catch (Exception e) {
+ LOG.error("While deleting {}", model.getObject(), e);
+ SyncopeConsoleSession.get().error(StringUtils.isBlank(e.getMessage())
+ ? e.getClass().getName() : e.getMessage());
+ }
+ ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target);
}
- });
+ }, ActionLink.ActionType.DELETE, StandardEntitlement.RELATIONSHIPTYPE_DELETE, true);
- return columns;
+ return panel;
}
protected final class RelationshipTypeProvider extends DirectoryDataProvider<RelationshipTypeTO> {
[10/10] syncope git commit: [SYNCOPE-1047] Replaces ActionLinksPanel
with TogglePanel
Posted by fm...@apache.org.
[SYNCOPE-1047] Replaces ActionLinksPanel with TogglePanel
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/2e7e2cee
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/2e7e2cee
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/2e7e2cee
Branch: refs/heads/master
Commit: 2e7e2ceef339fe243de2c688200e4010d46b8776
Parents: 018fa97
Author: fmartelli <fa...@gmail.com>
Authored: Fri May 5 23:56:29 2017 +0200
Committer: fmartelli <fa...@gmail.com>
Committed: Fri May 5 23:59:18 2017 +0200
----------------------------------------------------------------------
.../approvals/ApprovalDirectoryPanel.java | 93 +-
.../client/console/bulk/BulkContent.java | 9 +-
.../client/console/commons/Constants.java | 12 +
.../console/events/EventCategoryPanel.java | 174 +--
.../MailTemplateDirectoryPanel.java | 129 +-
.../NotificationDirectoryPanel.java | 112 +-
.../client/console/pages/Parameters.java | 6 +-
.../syncope/client/console/pages/Roles.java | 2 +-
.../panels/AccessTokenDirectoryPanel.java | 75 +-
.../console/panels/ActionDataTablePanel.java | 13 +-
.../console/panels/AjaxDataTablePanel.java | 32 +-
.../console/panels/AnyDirectoryPanel.java | 5 +-
.../console/panels/AnyObjectDirectoryPanel.java | 289 ++--
.../AnyObjectDisplayAttributesModalPanel.java | 2 +-
.../console/panels/AnyTypeClassesPanel.java | 82 +-
.../client/console/panels/AnyTypesPanel.java | 90 +-
.../client/console/panels/DirectoryPanel.java | 69 +-
.../console/panels/GroupDirectoryPanel.java | 333 ++--
.../GroupDisplayAttributesModalPanel.java | 2 +-
.../client/console/panels/ListViewPanel.java | 29 +-
.../panels/ParametersDirectoryPanel.java | 212 +++
.../client/console/panels/ParametersPanel.java | 234 ---
.../syncope/client/console/panels/Realm.java | 99 +-
.../client/console/panels/RealmDetails.java | 4 +-
.../console/panels/RelationshipTypesPanel.java | 83 +-
.../console/panels/RoleDirectoryPanel.java | 244 ++-
.../client/console/panels/SchemaTypePanel.java | 108 +-
.../console/panels/SecurityQuestionsPanel.java | 89 +-
.../client/console/panels/TogglePanel.java | 7 +-
.../panels/TypeExtensionDirectoryPanel.java | 55 +-
.../console/panels/UserDirectoryPanel.java | 423 ++---
.../panels/UserDisplayAttributesModalPanel.java | 2 +-
.../console/panels/WorkflowDirectoryPanel.java | 203 ++-
.../AnyObjectSelectionDirectoryPanel.java | 6 -
.../search/AnySelectionDirectoryPanel.java | 77 +-
.../search/GroupSelectionDirectoryPanel.java | 6 -
.../search/UserSelectionDirectoryPanel.java | 6 -
.../policies/AccountPolicyDirectoryPanel.java | 7 +-
.../policies/PasswordPolicyDirectoryPanel.java | 5 +-
.../console/policies/PolicyDirectoryPanel.java | 134 +-
.../policies/PolicyRuleDirectoryPanel.java | 144 +-
.../policies/PullPolicyDirectoryPanel.java | 5 +-
.../console/reports/ReportDirectoryPanel.java | 191 +--
.../console/reports/ReportExecutionDetails.java | 4 +-
.../reports/ReportTemplateDirectoryPanel.java | 166 +-
.../reports/ReportletDirectoryPanel.java | 147 +-
.../console/status/AnyStatusDirectoryPanel.java | 54 +-
.../console/tasks/ExecutionsDirectoryPanel.java | 90 +-
.../tasks/NotificationTaskDirectoryPanel.java | 159 +-
.../tasks/PropagationTaskDirectoryPanel.java | 121 +-
.../tasks/ProvisioningTaskDirectoryPanel.java | 2 +-
.../console/tasks/PullTaskDirectoryPanel.java | 12 +-
.../console/tasks/SchedTaskDirectoryPanel.java | 187 ++-
.../client/console/topology/Topology.java | 20 +-
.../console/topology/TopologyTogglePanel.java | 2 +-
.../html/repeater/data/table/ActionColumn.java | 50 -
.../data/table/AjaxFallbackDataTable.java | 51 +-
.../data/table/CollectionPropertyColumn.java | 3 +-
.../repeater/data/table/KeyPropertyColumn.java | 14 +-
.../console/wicket/markup/html/form/Action.java | 176 +++
.../wicket/markup/html/form/ActionLink.java | 2 +-
.../markup/html/form/ActionLinksPanel.java | 1459 ------------------
.../html/form/ActionLinksTogglePanel.java | 129 ++
.../wicket/markup/html/form/ActionPanel.java | 160 ++
.../wicket/markup/html/form/ActionsPanel.java | 88 ++
.../client/console/widgets/JobWidget.java | 106 +-
.../console/widgets/ReconciliationWidget.java | 27 +-
.../console/wizards/AbstractMappingPanel.java | 8 +-
.../console/wizards/any/Relationships.java | 9 +-
.../client/console/wizards/any/ResultPage.java | 12 +-
.../META-INF/resources/css/syncopeConsole.css | 37 +
.../META-INF/resources/css/topology.css | 17 +
.../client/console/bulk/BulkContent.html | 4 +-
.../console/panels/AjaxDataTablePanel.html | 2 +-
.../client/console/panels/DirectoryPanel.html | 25 +-
.../panels/ParametersDirectoryPanel.html | 23 +
.../panels/ParametersDirectoryPanel.properties | 21 +
.../ParametersDirectoryPanel_it.properties | 21 +
.../ParametersDirectoryPanel_pt_BR.properties | 21 +
.../ParametersDirectoryPanel_ru.properties | 27 +
.../client/console/panels/ParametersPanel.html | 23 -
.../console/panels/ParametersPanel.properties | 21 -
.../panels/ParametersPanel_it.properties | 21 -
.../panels/ParametersPanel_pt_BR.properties | 21 -
.../panels/ParametersPanel_ru.properties | 27 -
.../client/console/panels/RealmDetails.html | 4 +-
.../client/console/panels/TogglePanel.html | 38 +-
.../console/topology/TopologyTogglePanel.html | 9 +-
.../markup/html/form/ActionLinksPanel.html | 298 ----
.../html/form/ActionLinksTogglePanel.html | 30 +
.../wicket/markup/html/form/ActionPanel.html | 30 +
.../markup/html/form/ActionPanel.properties | 227 +++
.../markup/html/form/ActionPanel_it.properties | 226 +++
.../html/form/ActionPanel_pt_BR.properties | 226 +++
.../markup/html/form/ActionPanel_ru.properties | 226 +++
.../wicket/markup/html/form/ActionsPanel.html | 34 +
.../markup/html/form/ActionsPanel.properties | 223 +++
.../markup/html/form/ActionsPanel_it.properties | 223 +++
.../html/form/ActionsPanel_pt_BR.properties | 223 +++
.../markup/html/form/ActionsPanel_ru.properties | 223 +++
.../console/wizards/AbstractMappingPanel.html | 2 +-
.../client/console/wizards/any/ResultPage.html | 2 +-
.../org/apache/syncope/common/lib/to/JobTO.java | 2 -
.../panels/CamelRoutesDirectoryPanel.java | 87 +-
.../console/panels/SAML2IdPsDirectoryPanel.java | 118 +-
.../syncope/fit/console/AnyObjectsITCase.java | 18 +-
.../fit/console/AnyTypeClassesITCase.java | 89 +-
.../syncope/fit/console/AnyTypesITCase.java | 55 +-
.../syncope/fit/console/BulkActionITCase.java | 132 +-
.../fit/console/DisplayAttributesITCase.java | 12 +-
.../syncope/fit/console/GroupsITCase.java | 104 +-
.../fit/console/NotificationsITCase.java | 51 +-
.../syncope/fit/console/ParametersITCase.java | 11 +-
.../syncope/fit/console/PoliciesITCase.java | 182 ++-
.../syncope/fit/console/RealmsITCase.java | 39 +-
.../fit/console/RelationshipTypesITCase.java | 40 +-
.../syncope/fit/console/ReportsITCase.java | 50 +-
.../apache/syncope/fit/console/RolesITCase.java | 35 +-
.../syncope/fit/console/SchemasITCase.java | 61 +-
.../fit/console/SecurityQuestionsITCase.java | 32 +-
.../syncope/fit/console/TopologyITCase.java | 85 +-
.../apache/syncope/fit/console/UsersITCase.java | 68 +-
122 files changed, 5779 insertions(+), 5207 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/java/org/apache/syncope/client/console/approvals/ApprovalDirectoryPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/approvals/ApprovalDirectoryPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/approvals/ApprovalDirectoryPanel.java
index ffcb7ed..a3249cd 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/approvals/ApprovalDirectoryPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/approvals/ApprovalDirectoryPanel.java
@@ -32,10 +32,9 @@ import org.apache.syncope.client.console.panels.DirectoryPanel;
import org.apache.syncope.client.console.rest.UserWorkflowRestClient;
import org.apache.syncope.client.console.approvals.ApprovalDirectoryPanel.ApprovalProvider;
import org.apache.syncope.client.console.pages.BasePage;
-import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.ActionColumn;
import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.DatePropertyColumn;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
-import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionsPanel;
import org.apache.syncope.common.lib.SyncopeClientException;
import org.apache.syncope.common.lib.to.WorkflowFormTO;
import org.apache.syncope.common.lib.types.StandardEntitlement;
@@ -99,77 +98,55 @@ public class ApprovalDirectoryPanel
columns.add(new DatePropertyColumn<WorkflowFormTO>(
new ResourceModel("dueDate"), "dueDate", "dueDate"));
columns.add(new PropertyColumn<WorkflowFormTO, String>(new ResourceModel("owner"), "owner", "owner"));
- columns.add(new ActionColumn<WorkflowFormTO, String>(new ResourceModel("actions")) {
- private static final long serialVersionUID = -3503023501954863133L;
-
- @Override
- public ActionLinksPanel<WorkflowFormTO> getActions(
- final String componentId, final IModel<WorkflowFormTO> model) {
- final ActionLinksPanel.Builder<WorkflowFormTO> panel = ActionLinksPanel.builder();
-
- panel.add(new ActionLink<WorkflowFormTO>() {
-
- private static final long serialVersionUID = -3722207913631435501L;
+ return columns;
+ }
- @Override
- public void onClick(final AjaxRequestTarget target, final WorkflowFormTO ignore) {
- try {
- restClient.claimForm(model.getObject().getTaskId());
- SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));
- } catch (SyncopeClientException scee) {
- SyncopeConsoleSession.get().error(getString(Constants.ERROR) + ": " + scee.getMessage());
- }
- ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target);
- target.add(container);
- }
- }, ActionLink.ActionType.CLAIM, StandardEntitlement.WORKFLOW_FORM_CLAIM);
+ @Override
+ public ActionsPanel<WorkflowFormTO> getActions(final IModel<WorkflowFormTO> model) {
+ final ActionsPanel<WorkflowFormTO> panel = super.getActions(model);
- panel.add(new ActionLink<WorkflowFormTO>() {
+ panel.add(new ActionLink<WorkflowFormTO>() {
- private static final long serialVersionUID = -3722207913631435501L;
+ private static final long serialVersionUID = -3722207913631435501L;
- @Override
- public void onClick(final AjaxRequestTarget target, final WorkflowFormTO ignore) {
- final IModel<WorkflowFormTO> formModel = new CompoundPropertyModel<>(model.getObject());
- modal.setFormModel(formModel);
+ @Override
+ public void onClick(final AjaxRequestTarget target, final WorkflowFormTO ignore) {
+ try {
+ restClient.claimForm(model.getObject().getTaskId());
+ SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));
+ } catch (SyncopeClientException scee) {
+ SyncopeConsoleSession.get().error(getString(Constants.ERROR) + ": " + scee.getMessage());
+ }
+ ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target);
+ target.add(container);
+ }
+ }, ActionLink.ActionType.CLAIM, StandardEntitlement.WORKFLOW_FORM_CLAIM);
- target.add(modal.setContent(new ApprovalModal(modal, pageRef, model.getObject())));
- modal.header(new Model<>(getString("approval.edit", new Model<>(model.getObject()))));
+ panel.add(new ActionLink<WorkflowFormTO>() {
- modal.show(true);
- }
+ private static final long serialVersionUID = -3722207913631435501L;
- @Override
- protected boolean statusCondition(final WorkflowFormTO modelObject) {
- return SyncopeConsoleSession.get().getSelfTO().getUsername().
- equals(model.getObject().getOwner());
- }
+ @Override
+ public void onClick(final AjaxRequestTarget target, final WorkflowFormTO ignore) {
+ final IModel<WorkflowFormTO> formModel = new CompoundPropertyModel<>(model.getObject());
+ modal.setFormModel(formModel);
- }, ActionLink.ActionType.EDIT, StandardEntitlement.WORKFLOW_FORM_READ);
+ target.add(modal.setContent(new ApprovalModal(modal, pageRef, model.getObject())));
+ modal.header(new Model<>(getString("approval.edit", new Model<>(model.getObject()))));
- return panel.build(componentId);
+ modal.show(true);
}
@Override
- public ActionLinksPanel<WorkflowFormTO> getHeader(final String componentId) {
- final ActionLinksPanel.Builder<WorkflowFormTO> panel = ActionLinksPanel.builder();
-
- return panel.add(new ActionLink<WorkflowFormTO>() {
-
- private static final long serialVersionUID = -7978723352517770644L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final WorkflowFormTO ignore) {
- if (target != null) {
- target.add(container);
- }
- }
- }, ActionLink.ActionType.RELOAD, StandardEntitlement.WORKFLOW_FORM_LIST).build(componentId);
+ protected boolean statusCondition(final WorkflowFormTO modelObject) {
+ return SyncopeConsoleSession.get().getSelfTO().getUsername().
+ equals(model.getObject().getOwner());
}
- });
- return columns;
+ }, ActionLink.ActionType.EDIT, StandardEntitlement.WORKFLOW_FORM_READ);
+
+ return panel;
}
@Override
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/java/org/apache/syncope/client/console/bulk/BulkContent.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/bulk/BulkContent.java b/client/console/src/main/java/org/apache/syncope/client/console/bulk/BulkContent.java
index bdfe2d5..2a46141 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/bulk/BulkContent.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/bulk/BulkContent.java
@@ -39,7 +39,7 @@ import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.
import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink.ActionType;
-import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionsPanel;
import org.apache.syncope.common.lib.to.BulkAction;
import org.apache.syncope.common.lib.to.BulkActionResult;
import org.apache.syncope.common.lib.types.StandardEntitlement;
@@ -112,7 +112,7 @@ public class BulkContent<T extends Serializable, S> extends MultilevelPanel.Seco
dataProvider,
Integer.MAX_VALUE).setMarkupId("selectedObjects").setVisible(items != null && !items.isEmpty()));
- final ActionLinksPanel<Serializable> actionPanel = ActionLinksPanel.builder().build("actions");
+ final ActionsPanel<Serializable> actionPanel = new ActionsPanel<>("actions", null);
container.add(actionPanel);
for (ActionLink.ActionType action : actions) {
@@ -236,14 +236,15 @@ public class BulkContent<T extends Serializable, S> extends MultilevelPanel.Seco
target.add(actionPanel);
SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));
- } catch (Exception e) {
+ } catch (IllegalArgumentException | NoSuchMethodException | SecurityException
+ | IllegalAccessException | InvocationTargetException e) {
LOG.error("Bulk action failure", e);
SyncopeConsoleSession.get().error("Operation " + actionToBeAddresed.getActionId()
+ " not supported");
}
((BasePage) getPage()).getNotificationPanel().refresh(target);
}
- }, action, StandardEntitlement.CONFIGURATION_LIST, !items.isEmpty());
+ }, action, StandardEntitlement.CONFIGURATION_LIST).hideLabel();
}
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/java/org/apache/syncope/client/console/commons/Constants.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/commons/Constants.java b/client/console/src/main/java/org/apache/syncope/client/console/commons/Constants.java
index affe16e..11bdc72 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/commons/Constants.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/commons/Constants.java
@@ -37,6 +37,18 @@ public final class Constants {
public static final String MODEL_ID_PARAM = "modelId";
+ public static final String KEY_FIELD_NAME = "key";
+
+ public static final String SCHEMA_FIELD_NAME = "schema";
+
+ public static final String DESCRIPTION_FIELD_NAME = "description";
+
+ public static final String USERNAME_FIELD_NAME = "username";
+
+ public static final String OBJNAME_FIELD_NAME = "name";
+
+ public static final String DEFAULT_TOKEN_FIELD_NAME = "token";
+
public static final String ON_CLICK = "click";
public static final String ON_CHANGE = "change";
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/java/org/apache/syncope/client/console/events/EventCategoryPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/events/EventCategoryPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/events/EventCategoryPanel.java
index 6796fc3..5579d29 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/events/EventCategoryPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/events/EventCategoryPanel.java
@@ -34,7 +34,7 @@ import org.apache.syncope.client.console.commons.Constants;
import org.apache.syncope.client.console.events.SelectedEventsPanel.EventSelectionChanged;
import org.apache.syncope.client.console.events.SelectedEventsPanel.InspectSelectedEvent;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
-import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionsPanel;
import org.apache.syncope.client.console.wicket.markup.html.form.AjaxDropDownChoicePanel;
import org.apache.syncope.client.console.wicket.markup.html.form.AjaxTextFieldPanel;
import org.apache.syncope.common.lib.log.EventCategoryTO;
@@ -77,7 +77,7 @@ public abstract class EventCategoryPanel extends Panel {
private final AjaxTextFieldPanel custom;
- private final ActionLinksPanel<EventCategoryTO> actionLinksPanel;
+ private final ActionsPanel<EventCategoryTO> actionsPanel;
private final IModel<List<String>> model;
@@ -194,93 +194,93 @@ public abstract class EventCategoryPanel extends Panel {
categoryContainer.add(custom.hideLabel());
- actionLinksPanel = ActionLinksPanel.<EventCategoryTO>builder().
- add(new ActionLink<EventCategoryTO>() {
+ actionsPanel = new ActionsPanel<EventCategoryTO>("customActions", null);
+ actionsPanel.add(new ActionLink<EventCategoryTO>() {
- private static final long serialVersionUID = -3722207913631435501L;
+ private static final long serialVersionUID = -3722207913631435501L;
- @Override
- public void onClick(final AjaxRequestTarget target, final EventCategoryTO modelObject) {
- if (StringUtils.isNotBlank(custom.getModelObject())) {
- Map.Entry<EventCategoryTO, AuditElements.Result> parsed =
- AuditLoggerName.parseEventCategory(custom.getModelObject());
-
- String eventString = AuditLoggerName.buildEvent(
- parsed.getKey().getType(),
- null,
- null,
- parsed.getKey().getEvents().isEmpty()
+ @Override
+ public void onClick(final AjaxRequestTarget target, final EventCategoryTO ignore) {
+ if (StringUtils.isNotBlank(custom.getModelObject())) {
+ Map.Entry<EventCategoryTO, AuditElements.Result> parsed = AuditLoggerName.parseEventCategory(custom.
+ getModelObject());
+
+ String eventString = AuditLoggerName.buildEvent(
+ parsed.getKey().getType(),
+ null,
+ null,
+ parsed.getKey().getEvents().isEmpty()
? StringUtils.EMPTY : parsed.getKey().getEvents().iterator().next(),
- parsed.getValue());
-
- custom.setModelObject(StringUtils.EMPTY);
- send(EventCategoryPanel.this.getPage(), Broadcast.BREADTH, new EventSelectionChanged(
- target,
- Collections.<String>singleton(eventString),
- Collections.<String>emptySet()));
- target.add(categoryContainer);
- }
- }
- }, ActionLink.ActionType.CREATE).
- add(new ActionLink<EventCategoryTO>() {
+ parsed.getValue());
+
+ custom.setModelObject(StringUtils.EMPTY);
+ send(EventCategoryPanel.this.getPage(), Broadcast.BREADTH, new EventSelectionChanged(
+ target,
+ Collections.<String>singleton(eventString),
+ Collections.<String>emptySet()));
+ target.add(categoryContainer);
+ }
+ }
+ }, ActionLink.ActionType.CREATE, StringUtils.EMPTY);
+ actionsPanel.add(new ActionLink<EventCategoryTO>() {
- private static final long serialVersionUID = -3722207913631435501L;
+ private static final long serialVersionUID = -3722207913631435501L;
- @Override
- public void onClick(final AjaxRequestTarget target, final EventCategoryTO modelObject) {
- if (StringUtils.isNotBlank(custom.getModelObject())) {
- Pair<EventCategoryTO, AuditElements.Result> parsed =
- AuditLoggerName.parseEventCategory(custom.getModelObject());
-
- String eventString = AuditLoggerName.buildEvent(
- parsed.getKey().getType(),
- null,
- null,
- parsed.getKey().getEvents().isEmpty()
+ @Override
+ public void onClick(final AjaxRequestTarget target, final EventCategoryTO ignore) {
+ if (StringUtils.isNotBlank(custom.getModelObject())) {
+ Pair<EventCategoryTO, AuditElements.Result> parsed = AuditLoggerName.parseEventCategory(custom.
+ getModelObject());
+
+ String eventString = AuditLoggerName.buildEvent(
+ parsed.getKey().getType(),
+ null,
+ null,
+ parsed.getKey().getEvents().isEmpty()
? StringUtils.EMPTY : parsed.getKey().getEvents().iterator().next(),
- parsed.getValue());
-
- custom.setModelObject(StringUtils.EMPTY);
- send(EventCategoryPanel.this.getPage(), Broadcast.BREADTH, new EventSelectionChanged(
- target,
- Collections.<String>singleton(eventString),
- Collections.<String>emptySet()));
- target.add(categoryContainer);
- }
- }
- }, ActionLink.ActionType.CREATE).
- add(new ActionLink<EventCategoryTO>() {
+ parsed.getValue());
+
+ custom.setModelObject(StringUtils.EMPTY);
+ send(EventCategoryPanel.this.getPage(), Broadcast.BREADTH, new EventSelectionChanged(
+ target,
+ Collections.<String>singleton(eventString),
+ Collections.<String>emptySet()));
+ target.add(categoryContainer);
+ }
+ }
+ }, ActionLink.ActionType.CREATE, StringUtils.EMPTY);
+ actionsPanel.add(new ActionLink<EventCategoryTO>() {
- private static final long serialVersionUID = -3722207913631435521L;
+ private static final long serialVersionUID = -3722207913631435521L;
- @Override
- public void onClick(final AjaxRequestTarget target, final EventCategoryTO modelObject) {
- if (StringUtils.isNotBlank(custom.getModelObject())) {
- Pair<EventCategoryTO, AuditElements.Result> parsed =
- AuditLoggerName.parseEventCategory(custom.getModelObject());
-
- String eventString = AuditLoggerName.buildEvent(
- parsed.getKey().getType(),
- null,
- null,
- parsed.getKey().getEvents().isEmpty()
+ @Override
+ public void onClick(final AjaxRequestTarget target, final EventCategoryTO ignore) {
+ if (StringUtils.isNotBlank(custom.getModelObject())) {
+ Pair<EventCategoryTO, AuditElements.Result> parsed = AuditLoggerName.parseEventCategory(custom.
+ getModelObject());
+
+ String eventString = AuditLoggerName.buildEvent(
+ parsed.getKey().getType(),
+ null,
+ null,
+ parsed.getKey().getEvents().isEmpty()
? StringUtils.EMPTY : parsed.getKey().getEvents().iterator().next(),
- parsed.getValue());
-
- custom.setModelObject(StringUtils.EMPTY);
- send(EventCategoryPanel.this.getPage(), Broadcast.BREADTH, new EventSelectionChanged(
- target,
- Collections.<String>emptySet(),
- Collections.<String>singleton(eventString)));
- target.add(categoryContainer);
- }
- }
- }, ActionLink.ActionType.DELETE).build("customActions");
+ parsed.getValue());
+
+ custom.setModelObject(StringUtils.EMPTY);
+ send(EventCategoryPanel.this.getPage(), Broadcast.BREADTH, new EventSelectionChanged(
+ target,
+ Collections.<String>emptySet(),
+ Collections.<String>singleton(eventString)));
+ target.add(categoryContainer);
+ }
+ }
+ }, ActionLink.ActionType.DELETE, StringUtils.EMPTY, true);
- categoryContainer.add(actionLinksPanel);
+ categoryContainer.add(actionsPanel);
- actionLinksPanel.setVisible(false);
- actionLinksPanel.setEnabled(false);
+ actionsPanel.setVisible(false);
+ actionsPanel.setEnabled(false);
eventsContainer.add(new EventSelectionPanel("eventsPanel", eventCategoryTO, model) {
@@ -346,8 +346,8 @@ public abstract class EventCategoryPanel extends Panel {
subcategory.setEnabled(false);
custom.setVisible(true);
custom.setEnabled(true);
- actionLinksPanel.setVisible(true);
- actionLinksPanel.setEnabled(true);
+ actionsPanel.setVisible(true);
+ actionsPanel.setEnabled(true);
} else {
category.setChoices(filter(eventCategoryTOs, type.getModelObject()));
subcategory.setChoices(Collections.<String>emptyList());
@@ -355,8 +355,8 @@ public abstract class EventCategoryPanel extends Panel {
subcategory.setEnabled(true);
custom.setVisible(false);
custom.setEnabled(false);
- actionLinksPanel.setVisible(false);
- actionLinksPanel.setEnabled(false);
+ actionsPanel.setVisible(false);
+ actionsPanel.setEnabled(false);
}
change.getTarget().add(categoryContainer);
break;
@@ -399,22 +399,22 @@ public abstract class EventCategoryPanel extends Panel {
categoryEvent.getKey().getCategory(),
categoryEvent.getKey().getSubcategory(),
categoryEvent.getKey().getEvents().isEmpty()
- ? StringUtils.EMPTY : categoryEvent.getKey().getEvents().iterator().next(),
+ ? StringUtils.EMPTY : categoryEvent.getKey().getEvents().iterator().next(),
categoryEvent.getValue()));
category.setEnabled(false);
subcategory.setEnabled(false);
custom.setVisible(true);
custom.setEnabled(true);
- actionLinksPanel.setVisible(true);
- actionLinksPanel.setEnabled(true);
+ actionsPanel.setVisible(true);
+ actionsPanel.setEnabled(true);
} else {
category.setEnabled(true);
subcategory.setEnabled(true);
custom.setVisible(false);
custom.setEnabled(false);
- actionLinksPanel.setVisible(false);
- actionLinksPanel.setEnabled(false);
+ actionsPanel.setVisible(false);
+ actionsPanel.setEnabled(false);
}
inspectSelectedEvent.getTarget().add(categoryContainer);
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/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 a9b16f1..55c4bd0 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
@@ -34,10 +34,8 @@ import org.apache.syncope.client.console.notifications.MailTemplateDirectoryPane
import org.apache.syncope.client.console.pages.BasePage;
import org.apache.syncope.client.console.panels.DirectoryPanel;
import org.apache.syncope.client.console.rest.NotificationRestClient;
-import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.ActionColumn;
import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
-import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
import org.apache.syncope.client.console.wizards.AbstractModalPanelBuilder;
import org.apache.syncope.client.console.wizards.AjaxWizard;
import org.apache.syncope.common.lib.SyncopeClientException;
@@ -55,6 +53,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.syncope.client.console.wicket.markup.html.form.ActionsPanel;
import org.apache.syncope.client.console.wicket.markup.html.form.XMLEditorPanel;
import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
import org.apache.wicket.markup.html.form.Form;
@@ -112,78 +111,70 @@ public class MailTemplateDirectoryPanel
@Override
protected List<IColumn<MailTemplateTO, String>> getColumns() {
List<IColumn<MailTemplateTO, String>> columns = new ArrayList<>();
- columns.add(new PropertyColumn<MailTemplateTO, String>(
- new StringResourceModel("key", this), "key", "key"));
+ columns.add(new PropertyColumn<MailTemplateTO, String>(new StringResourceModel("key", this), "key", "key"));
+ return columns;
+ }
- columns.add(new ActionColumn<MailTemplateTO, String>(new ResourceModel("actions", "")) {
+ @Override
+ public ActionsPanel<MailTemplateTO> getActions(final IModel<MailTemplateTO> model) {
+ final ActionsPanel<MailTemplateTO> panel = super.getActions(model);
- private static final long serialVersionUID = -3503023501954863131L;
+ panel.add(new ActionLink<MailTemplateTO>() {
+
+ private static final long serialVersionUID = -7978723352517770645L;
@Override
- public ActionLinksPanel<MailTemplateTO> getActions(
- final String componentId, final IModel<MailTemplateTO> model) {
-
- final ActionLinksPanel.Builder<MailTemplateTO> panel = ActionLinksPanel.builder();
-
- panel.add(new ActionLink<MailTemplateTO>() {
-
- private static final long serialVersionUID = -7978723352517770645L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final MailTemplateTO ignore) {
- TemplateContent<MailTemplateFormat> content =
- new TemplateContent<>(model.getObject().getKey(), MailTemplateFormat.HTML);
- content.setContent(
- restClient.readTemplateFormat(model.getObject().getKey(), MailTemplateFormat.HTML));
-
- utilityModal.header(new ResourceModel("mail.template.html", "HTML Content"));
- utilityModal.setContent(new TemplateContentEditorPanel(content, pageRef));
- utilityModal.show(true);
- target.add(utilityModal);
- }
- }, ActionLink.ActionType.HTML, StandardEntitlement.MAIL_TEMPLATE_UPDATE);
-
- panel.add(new ActionLink<MailTemplateTO>() {
-
- private static final long serialVersionUID = -7978723352517770645L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final MailTemplateTO ignore) {
- TemplateContent<MailTemplateFormat> content =
- new TemplateContent<>(model.getObject().getKey(), MailTemplateFormat.TEXT);
- content.setContent(
- restClient.readTemplateFormat(model.getObject().getKey(), MailTemplateFormat.TEXT));
-
- utilityModal.header(new ResourceModel("mail.template.text", "TEXT Content"));
- utilityModal.setContent(new TemplateContentEditorPanel(content, pageRef));
- utilityModal.show(true);
- target.add(utilityModal);
- }
- }, ActionLink.ActionType.TEXT, StandardEntitlement.MAIL_TEMPLATE_UPDATE);
-
- panel.add(new ActionLink<MailTemplateTO>() {
-
- private static final long serialVersionUID = -3722207913631435501L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final MailTemplateTO ignore) {
- try {
- restClient.deleteTemplate(model.getObject().getKey());
- SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));
- target.add(container);
- } catch (SyncopeClientException e) {
- LOG.error("While deleting object {}", model.getObject().getKey(), e);
- SyncopeConsoleSession.get().error(StringUtils.isBlank(e.getMessage()) ? e.getClass().
- getName() : e.getMessage());
- }
- ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target);
- }
- }, ActionLink.ActionType.DELETE, StandardEntitlement.MAIL_TEMPLATE_DELETE);
-
- return panel.build(componentId);
+ public void onClick(final AjaxRequestTarget target, final MailTemplateTO ignore) {
+ TemplateContent<MailTemplateFormat> content = new TemplateContent<>(model.getObject().getKey(),
+ MailTemplateFormat.HTML);
+ content.setContent(
+ restClient.readTemplateFormat(model.getObject().getKey(), MailTemplateFormat.HTML));
+
+ utilityModal.header(new ResourceModel("mail.template.html", "HTML Content"));
+ utilityModal.setContent(new TemplateContentEditorPanel(content, pageRef));
+ utilityModal.show(true);
+ target.add(utilityModal);
}
- });
- return columns;
+ }, ActionLink.ActionType.HTML, StandardEntitlement.MAIL_TEMPLATE_UPDATE);
+
+ panel.add(new ActionLink<MailTemplateTO>() {
+
+ private static final long serialVersionUID = -7978723352517770645L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target, final MailTemplateTO ignore) {
+ TemplateContent<MailTemplateFormat> content = new TemplateContent<>(model.getObject().getKey(),
+ MailTemplateFormat.TEXT);
+ content.setContent(
+ restClient.readTemplateFormat(model.getObject().getKey(), MailTemplateFormat.TEXT));
+
+ utilityModal.header(new ResourceModel("mail.template.text", "TEXT Content"));
+ utilityModal.setContent(new TemplateContentEditorPanel(content, pageRef));
+ utilityModal.show(true);
+ target.add(utilityModal);
+ }
+ }, ActionLink.ActionType.TEXT, StandardEntitlement.MAIL_TEMPLATE_UPDATE);
+
+ panel.add(new ActionLink<MailTemplateTO>() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target, final MailTemplateTO ignore) {
+ try {
+ restClient.deleteTemplate(model.getObject().getKey());
+ SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));
+ target.add(container);
+ } catch (SyncopeClientException e) {
+ LOG.error("While deleting object {}", model.getObject().getKey(), e);
+ SyncopeConsoleSession.get().error(StringUtils.isBlank(e.getMessage()) ? e.getClass().
+ getName() : e.getMessage());
+ }
+ ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target);
+ }
+ }, ActionLink.ActionType.DELETE, StandardEntitlement.MAIL_TEMPLATE_DELETE, true);
+
+ return panel;
}
@Override
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/java/org/apache/syncope/client/console/notifications/NotificationDirectoryPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/notifications/NotificationDirectoryPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/notifications/NotificationDirectoryPanel.java
index c6de77f..740a36d 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/notifications/NotificationDirectoryPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/notifications/NotificationDirectoryPanel.java
@@ -34,13 +34,12 @@ import org.apache.syncope.client.console.notifications.NotificationDirectoryPane
import org.apache.syncope.client.console.pages.BasePage;
import org.apache.syncope.client.console.panels.DirectoryPanel;
import org.apache.syncope.client.console.rest.NotificationRestClient;
-import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.ActionColumn;
import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.BooleanPropertyColumn;
import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.CollectionPropertyColumn;
import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.KeyPropertyColumn;
import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
-import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionsPanel;
import org.apache.syncope.client.console.wizards.AjaxWizard;
import org.apache.syncope.common.lib.SyncopeClientException;
import org.apache.syncope.common.lib.to.NotificationTO;
@@ -54,7 +53,6 @@ import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn;
import org.apache.wicket.extensions.markup.html.repeater.data.table.PropertyColumn;
import org.apache.wicket.model.AbstractReadOnlyModel;
import org.apache.wicket.model.IModel;
-import org.apache.wicket.model.ResourceModel;
import org.apache.wicket.model.StringResourceModel;
public class NotificationDirectoryPanel
@@ -87,8 +85,7 @@ public class NotificationDirectoryPanel
@Override
protected List<IColumn<NotificationTO, String>> getColumns() {
List<IColumn<NotificationTO, String>> columns = new ArrayList<>();
- columns.add(new KeyPropertyColumn<NotificationTO>(
- new StringResourceModel("key", this), "key", "key"));
+ columns.add(new KeyPropertyColumn<NotificationTO>(new StringResourceModel("key", this), "key"));
columns.add(new PropertyColumn<NotificationTO, String>(
new StringResourceModel("sender", this), "sender", "sender"));
columns.add(new PropertyColumn<NotificationTO, String>(
@@ -96,69 +93,62 @@ public class NotificationDirectoryPanel
columns.add(new PropertyColumn<NotificationTO, String>(
new StringResourceModel("template", this), "template", "template"));
columns.add(new CollectionPropertyColumn<NotificationTO>(
- new StringResourceModel("events", this), "events", "events"));
+ new StringResourceModel("events", this), "events"));
columns.add(new BooleanPropertyColumn<NotificationTO>(
new StringResourceModel("active", this), "active", "active"));
+ return columns;
+ }
- columns.add(new ActionColumn<NotificationTO, String>(new ResourceModel("actions", "")) {
+ @Override
+ public ActionsPanel<NotificationTO> getActions(final IModel<NotificationTO> model) {
+ final ActionsPanel<NotificationTO> panel = super.getActions(model);
- private static final long serialVersionUID = -3503023501954863131L;
+ panel.add(new ActionLink<NotificationTO>() {
+
+ private static final long serialVersionUID = -7978723352517770645L;
@Override
- public ActionLinksPanel<NotificationTO> getActions(
- final String componentId, final IModel<NotificationTO> model) {
-
- final ActionLinksPanel.Builder<NotificationTO> panel = ActionLinksPanel.builder();
-
- panel.add(new ActionLink<NotificationTO>() {
-
- private static final long serialVersionUID = -7978723352517770645L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final NotificationTO ignore) {
- target.add(utilityModal.setContent(
- new NotificationTasks(model.getObject().getKey(), pageRef)));
- utilityModal.header(new StringResourceModel("notification.tasks", model));
- utilityModal.show(true);
- target.add(utilityModal);
- }
- }, ActionLink.ActionType.NOTIFICATION_TASKS, StandardEntitlement.TASK_LIST);
-
- panel.add(new ActionLink<NotificationTO>() {
-
- private static final long serialVersionUID = -7978723352517770645L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final NotificationTO ignore) {
- send(NotificationDirectoryPanel.this, Broadcast.EXACT,
- new AjaxWizard.EditItemActionEvent<>(
- new NotificationWrapper(restClient.read(model.getObject().getKey())), target));
- }
- }, ActionLink.ActionType.EDIT, StandardEntitlement.NOTIFICATION_UPDATE);
-
- panel.add(new ActionLink<NotificationTO>() {
-
- private static final long serialVersionUID = -3722207913631435501L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final NotificationTO ignore) {
- try {
- restClient.delete(model.getObject().getKey());
- SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));
- target.add(container);
- } catch (SyncopeClientException e) {
- LOG.error("While deleting object {}", model.getObject().getKey(), e);
- SyncopeConsoleSession.get().error(StringUtils.isBlank(e.getMessage()) ? e.getClass().
- getName() : e.getMessage());
- }
- ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target);
- }
- }, ActionLink.ActionType.DELETE, StandardEntitlement.NOTIFICATION_DELETE);
-
- return panel.build(componentId);
+ public void onClick(final AjaxRequestTarget target, final NotificationTO ignore) {
+ send(NotificationDirectoryPanel.this, Broadcast.EXACT,
+ new AjaxWizard.EditItemActionEvent<>(
+ new NotificationWrapper(restClient.read(model.getObject().getKey())), target));
}
- });
- return columns;
+ }, ActionLink.ActionType.EDIT, StandardEntitlement.NOTIFICATION_UPDATE);
+
+ panel.add(new ActionLink<NotificationTO>() {
+
+ private static final long serialVersionUID = -7978723352517770645L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target, final NotificationTO ignore) {
+ target.add(utilityModal.setContent(
+ new NotificationTasks(model.getObject().getKey(), pageRef)));
+ utilityModal.header(new StringResourceModel("notification.tasks", model));
+ utilityModal.show(true);
+ target.add(utilityModal);
+ }
+ }, ActionLink.ActionType.NOTIFICATION_TASKS, StandardEntitlement.TASK_LIST);
+
+ panel.add(new ActionLink<NotificationTO>() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target, final NotificationTO ignore) {
+ try {
+ restClient.delete(model.getObject().getKey());
+ SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));
+ target.add(container);
+ } catch (SyncopeClientException e) {
+ LOG.error("While deleting object {}", model.getObject().getKey(), e);
+ SyncopeConsoleSession.get().error(StringUtils.isBlank(e.getMessage()) ? e.getClass().
+ getName() : e.getMessage());
+ }
+ ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target);
+ }
+ }, ActionLink.ActionType.DELETE, StandardEntitlement.NOTIFICATION_DELETE, true);
+
+ return panel;
}
@Override
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/java/org/apache/syncope/client/console/pages/Parameters.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/Parameters.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/Parameters.java
index e03c5b6..856db28 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/pages/Parameters.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/Parameters.java
@@ -19,7 +19,7 @@
package org.apache.syncope.client.console.pages;
import org.apache.syncope.client.console.BookmarkablePageLinkBuilder;
-import org.apache.syncope.client.console.panels.ParametersPanel;
+import org.apache.syncope.client.console.panels.ParametersDirectoryPanel;
import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.request.mapper.parameter.PageParameters;
@@ -27,7 +27,7 @@ public class Parameters extends BasePage {
private static final long serialVersionUID = 4116733316105009166L;
- private final ParametersPanel parametersPanel;
+ private final ParametersDirectoryPanel parametersPanel;
public Parameters(final PageParameters parameters) {
super(parameters);
@@ -38,7 +38,7 @@ public class Parameters extends BasePage {
content.setOutputMarkupId(true);
body.add(content);
- parametersPanel = new ParametersPanel("parametersPanel", getPageReference());
+ parametersPanel = new ParametersDirectoryPanel("parametersPanel", getPageReference());
parametersPanel.setOutputMarkupId(true);
content.add(parametersPanel);
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/java/org/apache/syncope/client/console/pages/Roles.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/Roles.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/Roles.java
index 0f4295c..d02345c 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/pages/Roles.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/Roles.java
@@ -44,7 +44,7 @@ public class Roles extends BasePage {
private static final long serialVersionUID = -5960765294082359003L;
- }.disableCheckBoxes().addNewItemPanelBuilder(
+ }.addNewItemPanelBuilder(
new RoleWizardBuilder(new RoleTO(), getPageReference()), true).build("rolesPanel");
content.add(rolesPanel);
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/java/org/apache/syncope/client/console/panels/AccessTokenDirectoryPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/AccessTokenDirectoryPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/AccessTokenDirectoryPanel.java
index d5489ac..86714ee 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/AccessTokenDirectoryPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/AccessTokenDirectoryPanel.java
@@ -34,11 +34,10 @@ import org.apache.syncope.client.console.commons.SortableDataProviderComparator;
import org.apache.syncope.client.console.pages.BasePage;
import org.apache.syncope.client.console.panels.AccessTokenDirectoryPanel.AccessTokenDataProvider;
import org.apache.syncope.client.console.rest.AccessTokenRestClient;
-import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.ActionColumn;
import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.DatePropertyColumn;
import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.KeyPropertyColumn;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
-import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionsPanel;
import org.apache.syncope.client.console.wizards.WizardMgtPanel;
import org.apache.syncope.common.lib.SyncopeClientException;
import org.apache.syncope.common.lib.to.AccessTokenTO;
@@ -55,6 +54,7 @@ import org.apache.wicket.markup.repeater.Item;
import org.apache.wicket.model.CompoundPropertyModel;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.ResourceModel;
+import org.apache.wicket.model.StringResourceModel;
public class AccessTokenDirectoryPanel
extends DirectoryPanel<AccessTokenTO, AccessTokenTO, AccessTokenDataProvider, AccessTokenRestClient> {
@@ -83,8 +83,10 @@ public class AccessTokenDirectoryPanel
@Override
protected List<IColumn<AccessTokenTO, String>> getColumns() {
List<IColumn<AccessTokenTO, String>> columns = new ArrayList<>();
-
- columns.add(new KeyPropertyColumn<AccessTokenTO>(new ResourceModel("key"), "key", "key"));
+ columns.add(new KeyPropertyColumn<AccessTokenTO>(
+ new StringResourceModel(Constants.KEY_FIELD_NAME, this),
+ Constants.KEY_FIELD_NAME,
+ Constants.KEY_FIELD_NAME));
columns.add(new PropertyColumn<AccessTokenTO, String>(new ResourceModel("owner"), "owner", "owner"));
@@ -107,58 +109,33 @@ public class AccessTokenDirectoryPanel
columns.add(new DatePropertyColumn<AccessTokenTO>(new ResourceModel("expiryTime"), "expiryTime", "expiryTime"));
+ return columns;
+ }
- columns.add(new ActionColumn<AccessTokenTO, String>(new ResourceModel("actions", "")) {
+ @Override
+ public ActionsPanel<AccessTokenTO> getActions(final IModel<AccessTokenTO> model) {
+ final ActionsPanel<AccessTokenTO> panel = super.getActions(model);
- private static final long serialVersionUID = 6532399418012695495L;
+ panel.add(new ActionLink<AccessTokenTO>() {
- @Override
- public ActionLinksPanel<AccessTokenTO> getActions(
- final String componentId, final IModel<AccessTokenTO> model) {
-
- final ActionLinksPanel.Builder<AccessTokenTO> panel = ActionLinksPanel.builder();
-
- panel.add(new ActionLink<AccessTokenTO>() {
-
- private static final long serialVersionUID = -7978723352517770644L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final AccessTokenTO ignore) {
- try {
- restClient.delete(model.getObject().getKey());
- SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));
- target.add(container);
- } catch (SyncopeClientException e) {
- LOG.error("While deleting object {}", model.getObject().getKey(), e);
- SyncopeConsoleSession.get().error(StringUtils.isBlank(e.getMessage()) ? e.getClass().
- getName() : e.getMessage());
- }
- ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target);
- }
- }, ActionLink.ActionType.DELETE, StandardEntitlement.ACCESS_TOKEN_DELETE);
-
- return panel.build(componentId);
- }
+ private static final long serialVersionUID = -7978723352517770644L;
@Override
- public ActionLinksPanel<AccessTokenTO> getHeader(final String componentId) {
- final ActionLinksPanel.Builder<AccessTokenTO> panel = ActionLinksPanel.builder();
-
- return panel.add(new ActionLink<AccessTokenTO>() {
-
- private static final long serialVersionUID = -8766205612892810375L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final AccessTokenTO ignore) {
- if (target != null) {
- target.add(container);
- }
- }
- }, ActionLink.ActionType.RELOAD, StandardEntitlement.ACCESS_TOKEN_LIST).build(componentId);
+ public void onClick(final AjaxRequestTarget target, final AccessTokenTO ignore) {
+ try {
+ restClient.delete(model.getObject().getKey());
+ SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));
+ target.add(container);
+ } catch (SyncopeClientException e) {
+ LOG.error("While deleting object {}", model.getObject().getKey(), e);
+ SyncopeConsoleSession.get().error(StringUtils.isBlank(e.getMessage()) ? e.getClass().
+ getName() : e.getMessage());
+ }
+ ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target);
}
- });
+ }, ActionLink.ActionType.DELETE, StandardEntitlement.ACCESS_TOKEN_DELETE, true);
- return columns;
+ return panel;
}
@Override
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/java/org/apache/syncope/client/console/panels/ActionDataTablePanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/ActionDataTablePanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/ActionDataTablePanel.java
index 8c465f3..9aa2a69 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/ActionDataTablePanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/ActionDataTablePanel.java
@@ -28,7 +28,7 @@ import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.
import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink.ActionType;
-import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionsPanel;
import org.apache.wicket.AttributeModifier;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.markup.html.form.AjaxButton;
@@ -47,7 +47,7 @@ public class ActionDataTablePanel<T extends Serializable, S> extends DataTablePa
private final Form<T> bulkActionForm;
- private final ActionLinksPanel<Serializable> actionPanel;
+ private final ActionsPanel<Serializable> actionPanel;
public ActionDataTablePanel(
final String id,
@@ -87,7 +87,7 @@ public class ActionDataTablePanel<T extends Serializable, S> extends DataTablePa
final WebMarkupContainer actionPanelContainer = new WebMarkupContainer("actionPanelContainer");
bulkActionForm.add(actionPanelContainer);
- actionPanel = ActionLinksPanel.builder().build("actions");
+ actionPanel = new ActionsPanel<>("actions", null);
actionPanelContainer.add(actionPanel);
if (dataTable.getRowCount() == 0) {
@@ -107,12 +107,7 @@ public class ActionDataTablePanel<T extends Serializable, S> extends DataTablePa
public void addAction(
final ActionLink<Serializable> action, final ActionType type, final String entitlements) {
- actionPanel.add(action, type, entitlements, true);
- }
-
- public void addAction(
- final ActionLink<Serializable> action, final ActionType type, final String pageId, final boolean enabled) {
- actionPanel.add(action, type, pageId, enabled);
+ actionPanel.add(action, type, entitlements);
}
public void addCancelButton(final BaseModal<?> modal) {
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/java/org/apache/syncope/client/console/panels/AjaxDataTablePanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/AjaxDataTablePanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/AjaxDataTablePanel.java
index 0736e86..fc2cb45 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/AjaxDataTablePanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/AjaxDataTablePanel.java
@@ -34,6 +34,8 @@ import org.apache.syncope.client.console.rest.RestClient;
import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.CheckGroupColumn;
import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.AjaxFallbackDataTable;
import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksTogglePanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionsPanel;
import org.apache.wicket.AttributeModifier;
import org.apache.wicket.PageReference;
import org.apache.wicket.ajax.AjaxRequestTarget;
@@ -46,6 +48,7 @@ import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.markup.html.form.CheckGroup;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.panel.Fragment;
+import org.apache.wicket.model.IModel;
import org.apache.wicket.model.ResourceModel;
public final class AjaxDataTablePanel<T extends Serializable, S> extends DataTablePanel<T, S> {
@@ -151,6 +154,14 @@ public final class AjaxDataTablePanel<T extends Serializable, S> extends DataTab
this.multiLevelPanel = multiLevelPanel;
this.baseModal = baseModal;
}
+
+ protected ActionsPanel<T> getActions(final IModel<T> model) {
+ return null;
+ }
+
+ protected ActionLinksTogglePanel<T> getTogglePanel() {
+ return null;
+ }
}
private AjaxDataTablePanel(final String id, final Builder<T, S> builder) {
@@ -200,8 +211,23 @@ public final class AjaxDataTablePanel<T extends Serializable, S> extends DataTab
builder.columns.add(0, new CheckGroupColumn<T, S>(group));
}
- dataTable = new AjaxFallbackDataTable<>(
- "dataTable", builder.columns, builder.dataProvider, builder.rowsPerPage, builder.container);
+ dataTable = new AjaxFallbackDataTable<T, S>(
+ "dataTable", builder.columns, builder.dataProvider, builder.rowsPerPage, builder.container) {
+
+ private static final long serialVersionUID = -7370603907251344224L;
+
+ @Override
+ protected ActionsPanel<T> getActions(final IModel<T> model) {
+ return builder.getActions(model);
+ }
+
+ @Override
+ protected ActionLinksTogglePanel<T> getTogglePanel() {
+ return builder.getTogglePanel();
+ }
+
+ };
+
dataTable.add(new AttributeModifier("class", "table table-bordered table-hover dataTable"));
group.add(dataTable);
@@ -221,7 +247,7 @@ public final class AjaxDataTablePanel<T extends Serializable, S> extends DataTab
builder.pageRef,
new ArrayList<>(group.getModelObject()),
// serialization problem with sublist only
- new ArrayList<>(builder.columns.subList(1, builder.columns.size() - 1)),
+ new ArrayList<>(builder.columns.subList(1, builder.columns.size())),
builder.bulkActions,
builder.bulkActionExecutor,
builder.itemKeyField)));
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/java/org/apache/syncope/client/console/panels/AnyDirectoryPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/AnyDirectoryPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/AnyDirectoryPanel.java
index e4a48dc..0bbaf55 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/AnyDirectoryPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/AnyDirectoryPanel.java
@@ -29,6 +29,7 @@ import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.tuple.Pair;
import org.apache.syncope.client.console.SyncopeConsoleSession;
import org.apache.syncope.client.console.commons.AnyDataProvider;
+import org.apache.syncope.client.console.commons.Constants;
import org.apache.syncope.client.console.commons.SerializableTransformer;
import org.apache.syncope.client.console.commons.status.ConnObjectWrapper;
import org.apache.syncope.client.console.commons.status.StatusBean;
@@ -121,9 +122,9 @@ public abstract class AnyDirectoryPanel<A extends AnyTO, E extends AbstractAnyRe
final Field field,
final List<IColumn<A, String>> columns) {
- if ("key".equalsIgnoreCase(name)) {
+ if (Constants.KEY_FIELD_NAME.equalsIgnoreCase(name)) {
columns.add(new KeyPropertyColumn<A>(new ResourceModel(name, name), name, name));
- } else if ("token".equalsIgnoreCase(name)) {
+ } else if (Constants.DEFAULT_TOKEN_FIELD_NAME.equalsIgnoreCase(name)) {
columns.add(new TokenColumn<A>(new ResourceModel(name, name), name));
} else if (field != null
&& (field.getType().equals(Boolean.class) || field.getType().equals(boolean.class))) {
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/java/org/apache/syncope/client/console/panels/AnyObjectDirectoryPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/AnyObjectDirectoryPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/AnyObjectDirectoryPanel.java
index ff4d622..8ea0cea 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/AnyObjectDirectoryPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/AnyObjectDirectoryPanel.java
@@ -31,11 +31,11 @@ import org.apache.syncope.client.console.pages.BasePage;
import org.apache.syncope.client.console.rest.AnyObjectRestClient;
import org.apache.syncope.client.console.status.AnyStatusModal;
import org.apache.syncope.client.console.tasks.AnyPropagationTasks;
-import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.ActionColumn;
import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.AttrColumn;
+import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.KeyPropertyColumn;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink.ActionType;
-import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionsPanel;
import org.apache.syncope.client.console.wizards.AjaxWizard;
import org.apache.syncope.client.console.wizards.WizardMgtPanel;
import org.apache.syncope.client.console.wizards.any.AnyWrapper;
@@ -71,20 +71,50 @@ public class AnyObjectDirectoryPanel extends AnyDirectoryPanel<AnyObjectTO, AnyO
}
@Override
+ public ActionsPanel<Serializable> getHeader(final String componentId) {
+ final ActionsPanel<Serializable> panel = super.getHeader(componentId);
+
+ panel.add(new ActionLink<Serializable>() {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target, final Serializable ignore) {
+ target.add(displayAttributeModal.setContent(new AnyObjectDisplayAttributesModalPanel<>(
+ displayAttributeModal, page.getPageReference(), pSchemaNames, dSchemaNames, type)));
+ displayAttributeModal.addSubmitButton();
+ displayAttributeModal.header(new ResourceModel("any.attr.display"));
+ displayAttributeModal.show(true);
+ }
+
+ @Override
+ protected boolean statusCondition(final Serializable modelObject) {
+ return wizardInModal;
+ }
+ }, ActionType.CHANGE_VIEW, AnyEntitlement.READ.getFor(type)).hideLabel();
+ return panel;
+ }
+
+ @Override
protected List<IColumn<AnyObjectTO, String>> getColumns() {
final List<IColumn<AnyObjectTO, String>> columns = new ArrayList<>();
+ final List<IColumn<AnyObjectTO, String>> prefcolumns = new ArrayList<>();
+
+ columns.add(new KeyPropertyColumn<AnyObjectTO>(
+ new ResourceModel(Constants.KEY_FIELD_NAME, Constants.KEY_FIELD_NAME), Constants.KEY_FIELD_NAME));
for (String name : prefMan.getList(
getRequest(), String.format(Constants.PREF_ANY_OBJECT_DETAILS_VIEW, type))) {
-
- addPropertyColumn(name, ReflectionUtils.findField(AnyObjectTO.class, name), columns);
+ if (!Constants.KEY_FIELD_NAME.equalsIgnoreCase(name)) {
+ addPropertyColumn(name, ReflectionUtils.findField(AnyObjectTO.class, name), prefcolumns);
+ }
}
for (String name : prefMan.getList(
getRequest(), String.format(Constants.PREF_ANY_OBJECT_PLAIN_ATTRS_VIEW, type))) {
if (pSchemaNames.contains(name)) {
- columns.add(new AttrColumn<AnyObjectTO>(name, SchemaType.PLAIN));
+ prefcolumns.add(new AttrColumn<AnyObjectTO>(name, SchemaType.PLAIN));
}
}
@@ -92,171 +122,132 @@ public class AnyObjectDirectoryPanel extends AnyDirectoryPanel<AnyObjectTO, AnyO
getRequest(), String.format(Constants.PREF_ANY_OBJECT_DER_ATTRS_VIEW, type))) {
if (dSchemaNames.contains(name)) {
- columns.add(new AttrColumn<AnyObjectTO>(name, SchemaType.DERIVED));
+ prefcolumns.add(new AttrColumn<AnyObjectTO>(name, SchemaType.DERIVED));
}
}
// Add defaults in case of no selection
- if (columns.isEmpty()) {
+ if (prefcolumns.isEmpty()) {
for (String name : AnyObjectDisplayAttributesModalPanel.DEFAULT_SELECTION) {
- addPropertyColumn(name, ReflectionUtils.findField(AnyObjectTO.class, name), columns);
+ addPropertyColumn(name, ReflectionUtils.findField(AnyObjectTO.class, name), prefcolumns);
}
- prefMan.setList(getRequest(), getResponse(),
- String.format(Constants.PREF_ANY_OBJECT_DETAILS_VIEW, type),
+ prefMan.setList(getRequest(), getResponse(), Constants.PREF_ANY_OBJECT_DETAILS_VIEW,
Arrays.asList(AnyObjectDisplayAttributesModalPanel.DEFAULT_SELECTION));
}
- columns.add(new ActionColumn<AnyObjectTO, String>(new ResourceModel("actions")) {
+ columns.addAll(prefcolumns);
+ return columns;
+ }
+
+ @Override
+ public ActionsPanel<AnyObjectTO> getActions(final IModel<AnyObjectTO> model) {
+ final ActionsPanel<AnyObjectTO> panel = super.getActions(model);
+
+ panel.add(new ActionLink<AnyObjectTO>() {
- private static final long serialVersionUID = -3503023501954863131L;
+ private static final long serialVersionUID = -7978723352517770644L;
@Override
- public ActionLinksPanel<AnyObjectTO> getActions(final String componentId, final IModel<AnyObjectTO> model) {
- final ActionLinksPanel.Builder<AnyObjectTO> panel = ActionLinksPanel.builder();
-
- panel.add(new ActionLink<AnyObjectTO>() {
-
- private static final long serialVersionUID = -7978723352517770644L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final AnyObjectTO ignore) {
- send(AnyObjectDirectoryPanel.this, Broadcast.EXACT,
- new AjaxWizard.EditItemActionEvent<>(
- new AnyWrapper<>(new AnyObjectRestClient().read(model.getObject().getKey())),
- target));
- }
- }, ActionType.EDIT, AnyEntitlement.READ.getFor(type)).add(new ActionLink<AnyObjectTO>() {
-
- private static final long serialVersionUID = -7978723352517770645L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final AnyObjectTO ignore) {
- final AnyObjectTO clone = SerializationUtils.clone(model.getObject());
- clone.setKey(null);
- send(AnyObjectDirectoryPanel.this, Broadcast.EXACT,
- new AjaxWizard.NewItemActionEvent<>(new AnyWrapper<>(clone), target));
- }
-
- @Override
- protected boolean statusCondition(final AnyObjectTO modelObject) {
- return addAjaxLink.isVisibleInHierarchy();
- }
- }, ActionType.CLONE, AnyEntitlement.CREATE.getFor(type)).add(new ActionLink<AnyObjectTO>() {
-
- private static final long serialVersionUID = -7978723352517770646L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final AnyObjectTO ignore) {
- try {
- restClient.delete(model.getObject().getETagValue(), model.getObject().getKey());
- SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));
- target.add(container);
- } catch (SyncopeClientException e) {
- LOG.error("While deleting object {}", model.getObject().getKey(), e);
- SyncopeConsoleSession.get().error(StringUtils.isBlank(e.getMessage())
- ? e.getClass().getName() : e.getMessage());
- }
- ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target);
- }
- }, ActionType.DELETE, AnyEntitlement.DELETE.getFor(type));
-
- if (wizardInModal) {
- panel.add(new ActionLink<AnyObjectTO>() {
-
- private static final long serialVersionUID = -7978723352517770645L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final AnyObjectTO ignore) {
- final IModel<AnyWrapper<AnyObjectTO>> formModel = new CompoundPropertyModel<>(
- new AnyWrapper<>(model.getObject()));
- altDefaultModal.setFormModel(formModel);
-
- target.add(altDefaultModal.setContent(new AnyStatusModal<>(
- altDefaultModal,
- pageRef,
- formModel.getObject().getInnerObject(),
- "resourceName",
- false)));
-
- altDefaultModal.header(new Model<>(
- getString("any.edit", new Model<>(new AnyWrapper<>(model.getObject())))));
-
- altDefaultModal.show(true);
- }
- }, ActionType.MANAGE_RESOURCES, AnyEntitlement.READ.getFor(type)).add(
- new ActionLink<AnyObjectTO>() {
-
- private static final long serialVersionUID = -7978723352517770644L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final AnyObjectTO ignore) {
- target.add(utilityModal.setContent(new AnyPropagationTasks(
- utilityModal, AnyTypeKind.ANY_OBJECT, model.getObject().getKey(), pageRef)));
-
- utilityModal.header(new StringResourceModel("any.propagation.tasks", model));
- utilityModal.show(true);
- }
- }, ActionType.PROPAGATION_TASKS, StandardEntitlement.TASK_LIST).add(new ActionLink<AnyObjectTO>() {
-
- private static final long serialVersionUID = -7978723352517770644L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final AnyObjectTO ignore) {
- target.add(utilityModal.setContent(
- new NotificationTasks(AnyTypeKind.ANY_OBJECT, model.getObject().getKey(),
- pageRef)));
- utilityModal.header(new StringResourceModel("any.notification.tasks", model));
- utilityModal.show(true);
- target.add(utilityModal);
- }
- }, ActionType.NOTIFICATION_TASKS, StandardEntitlement.TASK_LIST);
- }
+ public void onClick(final AjaxRequestTarget target, final AnyObjectTO ignore) {
+ send(AnyObjectDirectoryPanel.this, Broadcast.EXACT,
+ new AjaxWizard.EditItemActionEvent<>(
+ new AnyWrapper<>(new AnyObjectRestClient().read(model.getObject().getKey())),
+ target));
+ }
+ }, ActionType.EDIT, AnyEntitlement.READ.getFor(type));
+ panel.add(new ActionLink<AnyObjectTO>() {
- return panel.build(componentId, model.getObject());
+ private static final long serialVersionUID = -7978723352517770645L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target, final AnyObjectTO ignore) {
+ final AnyObjectTO clone = SerializationUtils.clone(model.getObject());
+ clone.setKey(null);
+ send(AnyObjectDirectoryPanel.this, Broadcast.EXACT,
+ new AjaxWizard.NewItemActionEvent<>(new AnyWrapper<>(clone), target));
}
@Override
- public ActionLinksPanel<Serializable> getHeader(final String componentId) {
- final ActionLinksPanel.Builder<Serializable> panel = ActionLinksPanel.builder();
-
- panel.add(new ActionLink<Serializable>() {
-
- private static final long serialVersionUID = -7978723352517770644L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final Serializable ignore) {
- target.add(displayAttributeModal.setContent(new AnyObjectDisplayAttributesModalPanel<>(
- displayAttributeModal, page.getPageReference(), pSchemaNames, dSchemaNames, type)));
- displayAttributeModal.addSubmitButton();
- displayAttributeModal.header(new ResourceModel("any.attr.display"));
- displayAttributeModal.show(true);
- }
-
- @Override
- protected boolean statusCondition(final Serializable modelObject) {
- return wizardInModal;
- }
- }, ActionType.CHANGE_VIEW, AnyEntitlement.READ.getFor(type)).add(
- new ActionLink<Serializable>() {
-
- private static final long serialVersionUID = -7978723352517770644L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final Serializable ignore) {
- if (target != null) {
- target.add(container);
- }
- }
- }, ActionType.RELOAD, AnyEntitlement.SEARCH.getFor(type));
-
- return panel.build(componentId);
+ protected boolean statusCondition(final AnyObjectTO modelObject) {
+ return addAjaxLink.isVisibleInHierarchy();
}
+ }, ActionType.CLONE, AnyEntitlement.CREATE.getFor(type));
+
+ if (wizardInModal) {
+ panel.add(new ActionLink<AnyObjectTO>() {
+
+ private static final long serialVersionUID = -7978723352517770645L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target, final AnyObjectTO ignore) {
+ final IModel<AnyWrapper<AnyObjectTO>> formModel = new CompoundPropertyModel<>(
+ new AnyWrapper<>(model.getObject()));
+ altDefaultModal.setFormModel(formModel);
+
+ target.add(altDefaultModal.setContent(new AnyStatusModal<>(
+ altDefaultModal,
+ pageRef,
+ formModel.getObject().getInnerObject(),
+ "resourceName",
+ false)));
+
+ altDefaultModal.header(new Model<>(
+ getString("any.edit", new Model<>(new AnyWrapper<>(model.getObject())))));
+
+ altDefaultModal.show(true);
+ }
+ }, ActionType.MANAGE_RESOURCES, AnyEntitlement.READ.getFor(type));
+ panel.add(
+ new ActionLink<AnyObjectTO>() {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target, final AnyObjectTO ignore) {
+ target.add(utilityModal.setContent(new AnyPropagationTasks(
+ utilityModal, AnyTypeKind.ANY_OBJECT, model.getObject().getKey(), pageRef)));
+
+ utilityModal.header(new StringResourceModel("any.propagation.tasks", model));
+ utilityModal.show(true);
+ }
+ }, ActionType.PROPAGATION_TASKS, StandardEntitlement.TASK_LIST);
+ panel.add(new ActionLink<AnyObjectTO>() {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target, final AnyObjectTO ignore) {
+ target.add(utilityModal.setContent(
+ new NotificationTasks(AnyTypeKind.ANY_OBJECT, model.getObject().getKey(),
+ pageRef)));
+ utilityModal.header(new StringResourceModel("any.notification.tasks", model));
+ utilityModal.show(true);
+ target.add(utilityModal);
+ }
+ }, ActionType.NOTIFICATION_TASKS, StandardEntitlement.TASK_LIST);
}
- );
- return columns;
+ panel.add(new ActionLink<AnyObjectTO>() {
+
+ private static final long serialVersionUID = -7978723352517770646L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target, final AnyObjectTO ignore) {
+ try {
+ restClient.delete(model.getObject().getETagValue(), model.getObject().getKey());
+ SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));
+ target.add(container);
+ } catch (SyncopeClientException e) {
+ LOG.error("While deleting object {}", model.getObject().getKey(), e);
+ SyncopeConsoleSession.get().error(StringUtils.isBlank(e.getMessage())
+ ? e.getClass().getName() : e.getMessage());
+ }
+ ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target);
+ }
+ }, ActionType.DELETE, AnyEntitlement.DELETE.getFor(type), true);
+ return panel;
}
public static class Builder extends AnyDirectoryPanel.Builder<AnyObjectTO, AnyObjectRestClient> {
[07/10] syncope git commit: [SYNCOPE-1047] Replaces ActionLinksPanel
with TogglePanel
Posted by fm...@apache.org.
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/java/org/apache/syncope/client/console/panels/search/AnySelectionDirectoryPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/search/AnySelectionDirectoryPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/search/AnySelectionDirectoryPanel.java
index 5919dee..27712ce 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/search/AnySelectionDirectoryPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/search/AnySelectionDirectoryPanel.java
@@ -21,15 +21,12 @@ package org.apache.syncope.client.console.panels.search;
import java.io.Serializable;
import java.lang.reflect.Field;
import java.util.ArrayList;
-import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Date;
import java.util.List;
-import org.apache.syncope.client.console.panels.AnyObjectDisplayAttributesModalPanel;
import org.apache.syncope.client.console.panels.AnyDirectoryPanel;
import org.apache.syncope.client.console.rest.AbstractAnyRestClient;
-import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.ActionColumn;
import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.AttrColumn;
import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.BooleanPropertyColumn;
import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.DatePropertyColumn;
@@ -37,7 +34,7 @@ import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.
import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.TokenColumn;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink.ActionType;
-import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionsPanel;
import org.apache.syncope.common.lib.to.AnyTypeClassTO;
import org.apache.syncope.common.lib.to.AnyObjectTO;
import org.apache.syncope.common.lib.to.AnyTO;
@@ -104,71 +101,25 @@ public abstract class AnySelectionDirectoryPanel<A extends AnyTO, E extends Abst
}
}
- // Add defaults in case of no selection
- if (columns.isEmpty()) {
- for (String name : getDisplayAttributes()) {
- columns.add(new PropertyColumn<A, String>(new ResourceModel(name, name), name, name));
- }
-
- prefMan.setList(getRequest(), getResponse(), getPrefDetailsView(), Arrays.asList(getDisplayAttributes()));
- }
-
- columns.add(new ActionColumn<A, String>(new ResourceModel("actions")) {
-
- private static final long serialVersionUID = -3503023501954863131L;
-
- @Override
- public ActionLinksPanel<A> getActions(final String componentId, final IModel<A> model) {
- final ActionLinksPanel.Builder<A> panel = ActionLinksPanel.builder();
+ return columns;
+ }
- panel.add(new ActionLink<A>() {
+ @Override
+ public ActionsPanel<A> getActions(final IModel<A> model) {
+ final ActionsPanel<A> panel = super.getActions(model);
- private static final long serialVersionUID = -7978723352517770644L;
+ panel.add(new ActionLink<A>() {
- @Override
- public void onClick(final AjaxRequestTarget target, final A ignore) {
- send(AnySelectionDirectoryPanel.this,
- Broadcast.BUBBLE, new ItemSelection<>(target, model.getObject()));
- }
- }, ActionType.SELECT, AnyEntitlement.READ.getFor(type));
-
- return panel.build(componentId, model.getObject());
- }
+ private static final long serialVersionUID = -7978723352517770644L;
@Override
- public ActionLinksPanel<A> getHeader(final String componentId) {
- final ActionLinksPanel.Builder<A> panel = ActionLinksPanel.builder();
-
- return panel.add(new ActionLink<A>() {
-
- private static final long serialVersionUID = -7978723352517770644L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final A ignore) {
- // still missing content
- target.add(altDefaultModal.setContent(new AnyObjectDisplayAttributesModalPanel<>(
- altDefaultModal, page.getPageReference(), pSchemaNames, dSchemaNames, type)));
-
- altDefaultModal.addSubmitButton();
- altDefaultModal.header(new ResourceModel("any.attr.display"));
- altDefaultModal.show(true);
- }
- }, ActionType.CHANGE_VIEW, AnyEntitlement.READ.getFor(type)).add(new ActionLink<A>() {
-
- private static final long serialVersionUID = -7978723352517770644L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final A ignore) {
- if (target != null) {
- target.add(container);
- }
- }
- }, ActionType.RELOAD, AnyEntitlement.SEARCH.getFor(type)).
- build(componentId);
+ public void onClick(final AjaxRequestTarget target, final A ignore) {
+ send(AnySelectionDirectoryPanel.this,
+ Broadcast.BUBBLE, new ItemSelection<>(target, model.getObject()));
}
- });
+ }, ActionType.SELECT, AnyEntitlement.READ.getFor(type));
- return columns;
+ return panel;
}
@Override
@@ -176,8 +127,6 @@ public abstract class AnySelectionDirectoryPanel<A extends AnyTO, E extends Abst
return Collections.<ActionType>emptyList();
}
- protected abstract String[] getDisplayAttributes();
-
protected abstract String getPrefDetailsView();
protected abstract String getPrefPlainAttributesView();
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/java/org/apache/syncope/client/console/panels/search/GroupSelectionDirectoryPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/search/GroupSelectionDirectoryPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/search/GroupSelectionDirectoryPanel.java
index 65c7bd6..4642414 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/search/GroupSelectionDirectoryPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/search/GroupSelectionDirectoryPanel.java
@@ -20,7 +20,6 @@ package org.apache.syncope.client.console.panels.search;
import java.util.List;
import org.apache.syncope.client.console.commons.Constants;
-import org.apache.syncope.client.console.panels.GroupDisplayAttributesModalPanel;
import org.apache.syncope.client.console.rest.GroupRestClient;
import org.apache.syncope.client.console.wizards.WizardMgtPanel;
import org.apache.syncope.client.console.wizards.any.AnyWrapper;
@@ -42,11 +41,6 @@ public final class GroupSelectionDirectoryPanel extends AnySelectionDirectoryPan
}
@Override
- protected String[] getDisplayAttributes() {
- return GroupDisplayAttributesModalPanel.DEFAULT_SELECTION;
- }
-
- @Override
public String getPrefDetailsView() {
return Constants.PREF_GROUP_DETAILS_VIEW;
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/java/org/apache/syncope/client/console/panels/search/UserSelectionDirectoryPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/search/UserSelectionDirectoryPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/search/UserSelectionDirectoryPanel.java
index c3c8825..a27c2f6 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/search/UserSelectionDirectoryPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/search/UserSelectionDirectoryPanel.java
@@ -20,7 +20,6 @@ package org.apache.syncope.client.console.panels.search;
import java.util.List;
import org.apache.syncope.client.console.commons.Constants;
-import org.apache.syncope.client.console.panels.UserDisplayAttributesModalPanel;
import org.apache.syncope.client.console.rest.UserRestClient;
import org.apache.syncope.client.console.wizards.WizardMgtPanel;
import org.apache.syncope.client.console.wizards.any.AnyWrapper;
@@ -42,11 +41,6 @@ public final class UserSelectionDirectoryPanel extends AnySelectionDirectoryPane
}
@Override
- protected String[] getDisplayAttributes() {
- return UserDisplayAttributesModalPanel.DEFAULT_SELECTION;
- }
-
- @Override
protected String getPrefDetailsView() {
return Constants.PREF_USERS_DETAILS_VIEW;
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/java/org/apache/syncope/client/console/policies/AccountPolicyDirectoryPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/policies/AccountPolicyDirectoryPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/policies/AccountPolicyDirectoryPanel.java
index 9e7d7a0..5b0f2f1 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/policies/AccountPolicyDirectoryPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/policies/AccountPolicyDirectoryPanel.java
@@ -22,7 +22,7 @@ import java.util.List;
import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.BooleanPropertyColumn;
import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.CollectionPropertyColumn;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
-import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionsPanel;
import org.apache.syncope.common.lib.policy.AccountPolicyTO;
import org.apache.syncope.common.lib.types.PolicyType;
import org.apache.syncope.common.lib.types.StandardEntitlement;
@@ -54,7 +54,7 @@ public class AccountPolicyDirectoryPanel extends PolicyDirectoryPanel<AccountPol
@Override
protected void addCustomColumnFields(final List<IColumn<AccountPolicyTO, String>> columns) {
columns.add(new CollectionPropertyColumn<AccountPolicyTO>(new StringResourceModel(
- "passthroughResources", this), "passthroughResources", "passthroughResources"));
+ "passthroughResources", this), "passthroughResources"));
columns.add(new PropertyColumn<AccountPolicyTO, String>(new StringResourceModel(
"maxAuthenticationAttempts", this), "maxAuthenticationAttempts", "maxAuthenticationAttempts"));
@@ -64,8 +64,7 @@ public class AccountPolicyDirectoryPanel extends PolicyDirectoryPanel<AccountPol
}
@Override
- protected void addCustomActions(
- final ActionLinksPanel.Builder<AccountPolicyTO> panel, final IModel<AccountPolicyTO> model) {
+ protected void addCustomActions(final ActionsPanel<AccountPolicyTO> panel, final IModel<AccountPolicyTO> model) {
panel.add(new ActionLink<AccountPolicyTO>() {
private static final long serialVersionUID = -3722207913631435501L;
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/java/org/apache/syncope/client/console/policies/PasswordPolicyDirectoryPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/policies/PasswordPolicyDirectoryPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/policies/PasswordPolicyDirectoryPanel.java
index bc16a74..59fe831 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/policies/PasswordPolicyDirectoryPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/policies/PasswordPolicyDirectoryPanel.java
@@ -21,7 +21,7 @@ package org.apache.syncope.client.console.policies;
import java.util.List;
import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.BooleanPropertyColumn;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
-import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionsPanel;
import org.apache.syncope.common.lib.policy.PasswordPolicyTO;
import org.apache.syncope.common.lib.types.PolicyType;
import org.apache.syncope.common.lib.types.StandardEntitlement;
@@ -61,8 +61,7 @@ public class PasswordPolicyDirectoryPanel extends PolicyDirectoryPanel<PasswordP
}
@Override
- protected void addCustomActions(
- final ActionLinksPanel.Builder<PasswordPolicyTO> panel, final IModel<PasswordPolicyTO> model) {
+ protected void addCustomActions(final ActionsPanel<PasswordPolicyTO> panel, final IModel<PasswordPolicyTO> model) {
panel.add(new ActionLink<PasswordPolicyTO>() {
private static final long serialVersionUID = -3722207913631435501L;
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/java/org/apache/syncope/client/console/policies/PolicyDirectoryPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/policies/PolicyDirectoryPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/policies/PolicyDirectoryPanel.java
index 21e63cd..166b9e2 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/policies/PolicyDirectoryPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/policies/PolicyDirectoryPanel.java
@@ -33,18 +33,16 @@ import org.apache.syncope.client.console.commons.SortableDataProviderComparator;
import org.apache.syncope.client.console.pages.BasePage;
import org.apache.syncope.client.console.panels.DirectoryPanel;
import org.apache.syncope.client.console.rest.PolicyRestClient;
-import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.ActionColumn;
import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.CollectionPropertyColumn;
import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.KeyPropertyColumn;
import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink.ActionType;
-import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionsPanel;
import org.apache.syncope.client.console.wizards.AjaxWizard;
import org.apache.syncope.common.lib.types.StandardEntitlement;
import org.apache.syncope.common.lib.SyncopeClientException;
import org.apache.syncope.common.lib.policy.AbstractPolicyTO;
-import org.apache.syncope.common.lib.to.ReportTO;
import org.apache.syncope.common.lib.types.PolicyType;
import org.apache.wicket.PageReference;
import org.apache.wicket.ajax.AjaxRequestTarget;
@@ -55,7 +53,6 @@ import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn;
import org.apache.wicket.extensions.markup.html.repeater.data.table.PropertyColumn;
import org.apache.wicket.model.CompoundPropertyModel;
import org.apache.wicket.model.IModel;
-import org.apache.wicket.model.ResourceModel;
import org.apache.wicket.model.StringResourceModel;
/**
@@ -112,6 +109,8 @@ public abstract class PolicyDirectoryPanel<T extends AbstractPolicyTO>
setFooterVisibility(true);
modal.addSubmitButton();
modal.size(Modal.Size.Large);
+
+ disableCheckBoxes();
}
@Override
@@ -119,107 +118,82 @@ public abstract class PolicyDirectoryPanel<T extends AbstractPolicyTO>
final List<IColumn<T, String>> columns = new ArrayList<>();
columns.add(new KeyPropertyColumn<T>(
- new StringResourceModel("key", this), "key", "key"));
-
- columns.add(new PropertyColumn<T, String>(new StringResourceModel(
- "description", this), "description", "description"));
-
+ new StringResourceModel("key", this), "key"));
+ columns.add(new PropertyColumn<T, String>(
+ new StringResourceModel("description", this), "description", "description"));
columns.add(new CollectionPropertyColumn<T>(
- new StringResourceModel("usedByResources", this), "usedByResources", "usedByResources"));
-
+ new StringResourceModel("usedByResources", this), "usedByResources"));
columns.add(new CollectionPropertyColumn<T>(
- new StringResourceModel("usedByRealms", this), "usedByRealms", "usedByRealms"));
+ new StringResourceModel("usedByRealms", this), "usedByRealms"));
addCustomColumnFields(columns);
- columns.add(new ActionColumn<T, String>(new ResourceModel("actions")) {
+ return columns;
+ }
+
+ @Override
+ public ActionsPanel<T> getActions(final IModel<T> model) {
+ final ActionsPanel<T> panel = super.getActions(model);
+
+ panel.add(new ActionLink<T>() {
- private static final long serialVersionUID = 2054811145491901166L;
+ private static final long serialVersionUID = -3722207913631435501L;
@Override
- public ActionLinksPanel<T> getActions(final String componentId, final IModel<T> model) {
-
- final ActionLinksPanel.Builder<T> panel = ActionLinksPanel.<T>builder().
- add(new ActionLink<T>() {
-
- private static final long serialVersionUID = -3722207913631435501L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final AbstractPolicyTO ignore) {
- final AbstractPolicyTO clone = SerializationUtils.clone(model.getObject());
- clone.setKey(null);
- send(PolicyDirectoryPanel.this, Broadcast.EXACT,
- new AjaxWizard.EditItemActionEvent<>(clone, target));
- }
- }, ActionLink.ActionType.CLONE, StandardEntitlement.POLICY_CREATE).
- add(new ActionLink<T>() {
-
- private static final long serialVersionUID = -3722207913631435501L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final AbstractPolicyTO ignore) {
- send(PolicyDirectoryPanel.this, Broadcast.EXACT,
- new AjaxWizard.EditItemActionEvent<>(
- restClient.getPolicy(model.getObject().getKey()), target));
- }
- }, ActionLink.ActionType.EDIT, StandardEntitlement.POLICY_UPDATE).
- add(new ActionLink<T>() {
-
- private static final long serialVersionUID = -3722207913631435501L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final AbstractPolicyTO ignore) {
- final T policyTO = model.getObject();
- try {
- restClient.delete(policyTO.getKey());
- SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));
- target.add(container);
- } catch (SyncopeClientException e) {
- LOG.error("While deleting {}", policyTO.getKey(), e);
- SyncopeConsoleSession.get().error(StringUtils.isBlank(e.getMessage())
- ? e.getClass().getName() : e.getMessage());
- }
- ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target);
- }
- }, ActionLink.ActionType.DELETE, StandardEntitlement.POLICY_DELETE);
-
- addCustomActions(panel, model);
- return panel.build(componentId);
+ public void onClick(final AjaxRequestTarget target, final AbstractPolicyTO ignore) {
+ send(PolicyDirectoryPanel.this, Broadcast.EXACT,
+ new AjaxWizard.EditItemActionEvent<>(
+ restClient.getPolicy(model.getObject().getKey()), target));
}
+ }, ActionLink.ActionType.EDIT, StandardEntitlement.POLICY_UPDATE);
+
+ panel.add(new ActionLink<T>() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
@Override
- public ActionLinksPanel<ReportTO> getHeader(final String componentId) {
- final ActionLinksPanel.Builder<ReportTO> panel = ActionLinksPanel.builder();
+ public void onClick(final AjaxRequestTarget target, final AbstractPolicyTO ignore) {
+ final AbstractPolicyTO clone = SerializationUtils.clone(model.getObject());
+ clone.setKey(null);
+ send(PolicyDirectoryPanel.this, Broadcast.EXACT,
+ new AjaxWizard.EditItemActionEvent<>(clone, target));
+ }
+ }, ActionLink.ActionType.CLONE, StandardEntitlement.POLICY_CREATE);
+
+ addCustomActions(panel, model);
- return panel.add(new ActionLink<ReportTO>() {
+ panel.add(new ActionLink<T>() {
- private static final long serialVersionUID = -7978723352517770644L;
+ private static final long serialVersionUID = -3722207913631435501L;
- @Override
- public void onClick(final AjaxRequestTarget target, final ReportTO ignore) {
- if (target != null) {
- target.add(container);
- }
- }
- }, ActionLink.ActionType.RELOAD, StandardEntitlement.TASK_LIST).build(componentId);
+ @Override
+ public void onClick(final AjaxRequestTarget target, final AbstractPolicyTO ignore) {
+ final T policyTO = model.getObject();
+ try {
+ restClient.delete(policyTO.getKey());
+ SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));
+ target.add(container);
+ } catch (SyncopeClientException e) {
+ LOG.error("While deleting {}", policyTO.getKey(), e);
+ SyncopeConsoleSession.get().error(StringUtils.isBlank(e.getMessage())
+ ? e.getClass().getName() : e.getMessage());
+ }
+ ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target);
}
- });
+ }, ActionLink.ActionType.DELETE, StandardEntitlement.POLICY_DELETE, true);
- return columns;
+ return panel;
}
protected void addCustomColumnFields(final List<IColumn<T, String>> columns) {
}
- protected void addCustomActions(final ActionLinksPanel.Builder<T> panel, final IModel<T> model) {
+ protected void addCustomActions(final ActionsPanel<T> panel, final IModel<T> model) {
}
@Override
protected Collection<ActionType> getBulkActions() {
- final List<ActionType> bulkActions = new ArrayList<>();
- bulkActions.add(ActionType.EXECUTE);
- bulkActions.add(ActionType.DELETE);
- return bulkActions;
+ return Collections.<ActionType>emptyList();
}
@Override
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/java/org/apache/syncope/client/console/policies/PolicyRuleDirectoryPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/policies/PolicyRuleDirectoryPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/policies/PolicyRuleDirectoryPanel.java
index cb5969a..fd3c72e 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/policies/PolicyRuleDirectoryPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/policies/PolicyRuleDirectoryPanel.java
@@ -38,11 +38,10 @@ import org.apache.syncope.client.console.panels.DirectoryPanel;
import org.apache.syncope.client.console.panels.ModalPanel;
import org.apache.syncope.client.console.policies.PolicyRuleDirectoryPanel.PolicyRuleWrapper;
import org.apache.syncope.client.console.rest.PolicyRestClient;
-import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.ActionColumn;
import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink.ActionType;
-import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionsPanel;
import org.apache.syncope.client.console.wizards.AjaxWizard;
import org.apache.syncope.common.lib.types.StandardEntitlement;
import org.apache.syncope.common.lib.SyncopeClientException;
@@ -64,7 +63,6 @@ import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.repeater.Item;
import org.apache.wicket.model.CompoundPropertyModel;
import org.apache.wicket.model.IModel;
-import org.apache.wicket.model.ResourceModel;
import org.apache.wicket.model.StringResourceModel;
/**
@@ -120,90 +118,86 @@ public class PolicyRuleDirectoryPanel<T extends AbstractPolicyTO> extends Direct
cellItem.add(new Label(componentId, rowModel.getObject().getConf().getClass().getName()));
}
});
+ return columns;
+ }
- columns.add(new ActionColumn<PolicyRuleWrapper, String>(new ResourceModel("actions")) {
+ @Override
+ public ActionsPanel<PolicyRuleWrapper> getActions(final IModel<PolicyRuleWrapper> model) {
+ final ActionsPanel<PolicyRuleWrapper> panel = super.getActions(model);
- private static final long serialVersionUID = 2054811145491901166L;
+ panel.add(new ActionLink<PolicyRuleWrapper>() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
@Override
- public ActionLinksPanel<PolicyRuleWrapper> getActions(final String componentId,
- final IModel<PolicyRuleWrapper> model) {
-
- final ActionLinksPanel<PolicyRuleWrapper> panel = ActionLinksPanel.<PolicyRuleWrapper>builder().
- add(new ActionLink<PolicyRuleWrapper>() {
-
- private static final long serialVersionUID = -3722207913631435501L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final PolicyRuleWrapper ignore) {
- RuleConf clone = SerializationUtils.clone(model.getObject().getConf());
-
- send(PolicyRuleDirectoryPanel.this, Broadcast.EXACT,
- new AjaxWizard.EditItemActionEvent<>(
- new PolicyRuleWrapper().setConf(clone),
- target));
- }
- }, ActionLink.ActionType.CLONE, StandardEntitlement.POLICY_UPDATE).
- add(new ActionLink<PolicyRuleWrapper>() {
-
- private static final long serialVersionUID = -3722207913631435501L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final PolicyRuleWrapper ignore) {
- send(PolicyRuleDirectoryPanel.this, Broadcast.EXACT,
- new AjaxWizard.EditItemActionEvent<>(model.getObject(), target));
- }
- }, ActionLink.ActionType.EDIT, StandardEntitlement.POLICY_UPDATE).
- add(new ActionLink<PolicyRuleWrapper>() {
-
- private static final long serialVersionUID = -3722207913631435501L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final PolicyRuleWrapper ignore) {
- final RuleConf rule = model.getObject().getConf();
- try {
- final T actual = restClient.getPolicy(policy);
- CollectionUtils.filter(getRuleConf(actual), new Predicate<RuleConf>() {
-
- @Override
- public boolean evaluate(final RuleConf object) {
- return !object.getName().equals(rule.getName());
- }
- });
- restClient.updatePolicy(actual);
- SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));
- customActionOnFinishCallback(target);
- } catch (SyncopeClientException e) {
- LOG.error("While deleting {}", rule.getName(), e);
- SyncopeConsoleSession.get().error(StringUtils.isBlank(e.getMessage())
- ? e.getClass().getName() : e.getMessage());
- }
- ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target);
- }
- }, ActionLink.ActionType.DELETE, StandardEntitlement.POLICY_UPDATE).build(componentId);
-
- return panel;
+ public void onClick(final AjaxRequestTarget target, final PolicyRuleWrapper ignore) {
+ RuleConf clone = SerializationUtils.clone(model.getObject().getConf());
+
+ PolicyRuleDirectoryPanel.this.getTogglePanel().close(target);
+ send(PolicyRuleDirectoryPanel.this, Broadcast.EXACT,
+ new AjaxWizard.EditItemActionEvent<>(
+ new PolicyRuleWrapper().setConf(clone),
+ target));
}
+ }, ActionLink.ActionType.CLONE, StandardEntitlement.POLICY_CREATE);
+ panel.add(new ActionLink<PolicyRuleWrapper>() {
- @Override
- public ActionLinksPanel<PolicyRuleWrapper> getHeader(final String componentId) {
- final ActionLinksPanel.Builder<PolicyRuleWrapper> panel = ActionLinksPanel.builder();
+ private static final long serialVersionUID = -3722207913631435501L;
- return panel.add(new ActionLink<PolicyRuleWrapper>() {
+ @Override
+ public void onClick(final AjaxRequestTarget target, final PolicyRuleWrapper ignore) {
+ PolicyRuleDirectoryPanel.this.getTogglePanel().close(target);
+ send(PolicyRuleDirectoryPanel.this, Broadcast.EXACT,
+ new AjaxWizard.EditItemActionEvent<>(model.getObject(), target));
+ }
+ }, ActionLink.ActionType.EDIT, StandardEntitlement.POLICY_UPDATE);
+ panel.add(new ActionLink<PolicyRuleWrapper>() {
- private static final long serialVersionUID = -7978723352517770644L;
+ private static final long serialVersionUID = -3722207913631435501L;
- @Override
- public void onClick(final AjaxRequestTarget target, final PolicyRuleWrapper ignore) {
- if (target != null) {
- customActionOnFinishCallback(target);
+ @Override
+ public void onClick(final AjaxRequestTarget target, final PolicyRuleWrapper ignore) {
+ final RuleConf rule = model.getObject().getConf();
+ try {
+ final T actual = restClient.getPolicy(policy);
+ CollectionUtils.filter(getRuleConf(actual), new Predicate<RuleConf>() {
+
+ @Override
+ public boolean evaluate(final RuleConf object) {
+ return !object.getName().equals(rule.getName());
}
- }
- }, ActionLink.ActionType.RELOAD, StandardEntitlement.TASK_LIST).build(componentId);
+ });
+ restClient.updatePolicy(actual);
+ SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));
+ customActionOnFinishCallback(target);
+ } catch (SyncopeClientException e) {
+ LOG.error("While deleting {}", rule.getName(), e);
+ SyncopeConsoleSession.get().error(StringUtils.isBlank(e.getMessage())
+ ? e.getClass().getName() : e.getMessage());
+ }
+ ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target);
}
- });
+ }, ActionLink.ActionType.DELETE, StandardEntitlement.POLICY_DELETE, true);
- return columns;
+ return panel;
+ }
+
+ @Override
+ public ActionsPanel<Serializable> getHeader(final String componentId) {
+ final ActionsPanel<Serializable> panel = new ActionsPanel<>(componentId, null);
+
+ panel.add(new ActionLink<Serializable>() {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target, final Serializable ignore) {
+ if (target != null) {
+ customActionOnFinishCallback(target);
+ }
+ }
+ }, ActionLink.ActionType.RELOAD, StandardEntitlement.TASK_LIST).hideLabel();
+ return panel;
}
@Override
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/java/org/apache/syncope/client/console/policies/PullPolicyDirectoryPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/policies/PullPolicyDirectoryPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/policies/PullPolicyDirectoryPanel.java
index 1f3442b..32b81b7 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/policies/PullPolicyDirectoryPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/policies/PullPolicyDirectoryPanel.java
@@ -19,7 +19,7 @@
package org.apache.syncope.client.console.policies;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
-import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionsPanel;
import org.apache.syncope.common.lib.policy.PullPolicySpec;
import org.apache.syncope.common.lib.policy.PullPolicyTO;
import org.apache.syncope.common.lib.types.PolicyType;
@@ -52,8 +52,7 @@ public class PullPolicyDirectoryPanel extends PolicyDirectoryPanel<PullPolicyTO>
}
@Override
- protected void addCustomActions(
- final ActionLinksPanel.Builder<PullPolicyTO> panel, final IModel<PullPolicyTO> model) {
+ protected void addCustomActions(final ActionsPanel<PullPolicyTO> panel, final IModel<PullPolicyTO> model) {
panel.add(new ActionLink<PullPolicyTO>() {
private static final long serialVersionUID = -3722207913631435501L;
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/java/org/apache/syncope/client/console/reports/ReportDirectoryPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/reports/ReportDirectoryPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/reports/ReportDirectoryPanel.java
index 6237c4f..01f77db 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/reports/ReportDirectoryPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/reports/ReportDirectoryPanel.java
@@ -34,13 +34,12 @@ import org.apache.syncope.client.console.pages.BasePage;
import org.apache.syncope.client.console.panels.DirectoryPanel;
import org.apache.syncope.client.console.panels.MultilevelPanel;
import org.apache.syncope.client.console.rest.ReportRestClient;
-import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.ActionColumn;
import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.BooleanPropertyColumn;
import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.DatePropertyColumn;
import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.KeyPropertyColumn;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink.ActionType;
-import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionsPanel;
import org.apache.syncope.client.console.wizards.AjaxWizard;
import org.apache.syncope.common.lib.types.StandardEntitlement;
import org.apache.syncope.common.lib.SyncopeClientException;
@@ -55,7 +54,6 @@ import org.apache.wicket.extensions.markup.html.repeater.data.table.PropertyColu
import org.apache.wicket.model.CompoundPropertyModel;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.Model;
-import org.apache.wicket.model.ResourceModel;
import org.apache.wicket.model.StringResourceModel;
/**
@@ -86,9 +84,8 @@ public abstract class ReportDirectoryPanel
protected List<IColumn<ReportTO, String>> getColumns() {
final List<IColumn<ReportTO, String>> columns = new ArrayList<>();
- columns.add(new KeyPropertyColumn<ReportTO>(
- new StringResourceModel("key", this), "key", "key"));
-
+ columns.add(new KeyPropertyColumn<ReportTO>(new StringResourceModel(
+ "key", this), "key"));
columns.add(new PropertyColumn<ReportTO, String>(new StringResourceModel(
"name", this), "name", "name"));
@@ -110,117 +107,99 @@ public abstract class ReportDirectoryPanel
columns.add(new BooleanPropertyColumn<ReportTO>(
new StringResourceModel("active", this), "active", "active"));
- columns.add(new ActionColumn<ReportTO, String>(new ResourceModel("actions")) {
+ return columns;
+ }
+
+ @Override
+ public ActionsPanel<ReportTO> getActions(final IModel<ReportTO> model) {
+ final ActionsPanel<ReportTO> panel = super.getActions(model);
+
+ panel.add(new ActionLink<ReportTO>() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
- private static final long serialVersionUID = 2054811145491901166L;
+ @Override
+ public void onClick(final AjaxRequestTarget target, final ReportTO ignore) {
+ send(ReportDirectoryPanel.this, Broadcast.EXACT,
+ new AjaxWizard.EditItemActionEvent<>(
+ restClient.read(model.getObject().getKey()), target));
+ }
+ }, ActionLink.ActionType.EDIT, StandardEntitlement.REPORT_UPDATE);
+
+ panel.add(new ActionLink<ReportTO>() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
@Override
- public ActionLinksPanel<ReportTO> getActions(final String componentId, final IModel<ReportTO> model) {
-
- final ActionLinksPanel<ReportTO> panel = ActionLinksPanel.<ReportTO>builder().
- add(new ActionLink<ReportTO>() {
-
- private static final long serialVersionUID = -3722207913631435501L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final ReportTO ignore) {
- target.add(modal.setContent(new ReportletDirectoryPanel(
- modal, model.getObject().getKey(), pageRef)));
-
- modal.header(new StringResourceModel(
- "reportlet.conf", ReportDirectoryPanel.this, Model.of(model.getObject())));
-
- MetaDataRoleAuthorizationStrategy.authorize(
- modal.getForm(), ENABLE, StandardEntitlement.RESOURCE_UPDATE);
-
- modal.show(true);
- }
- }, ActionLink.ActionType.COMPOSE, StandardEntitlement.REPORT_UPDATE).
- add(new ActionLink<ReportTO>() {
-
- private static final long serialVersionUID = -3722207913631435501L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final ReportTO ignore) {
- final ReportTO clone = SerializationUtils.clone(model.getObject());
- clone.setKey(null);
- send(ReportDirectoryPanel.this, Broadcast.EXACT,
- new AjaxWizard.EditItemActionEvent<>(clone, target));
- }
- }, ActionLink.ActionType.CLONE, StandardEntitlement.REPORT_CREATE).
- add(new ActionLink<ReportTO>() {
-
- private static final long serialVersionUID = -3722207913631435501L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final ReportTO ignore) {
- send(ReportDirectoryPanel.this, Broadcast.EXACT,
- new AjaxWizard.EditItemActionEvent<>(
- restClient.read(model.getObject().getKey()), target));
- }
- }, ActionLink.ActionType.EDIT, StandardEntitlement.REPORT_UPDATE).
- add(new ActionLink<ReportTO>() {
-
- private static final long serialVersionUID = -3722207913631435501L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final ReportTO ignore) {
- viewTask(model.getObject(), target);
- }
- }, ActionLink.ActionType.VIEW, StandardEntitlement.REPORT_READ).
- add(new ActionLink<ReportTO>() {
-
- private static final long serialVersionUID = -3722207913631435501L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final ReportTO ignore) {
- startAt.setExecutionDetail(
- model.getObject().getKey(), model.getObject().getName(), target);
- startAt.toggle(target, true);
- }
- }, ActionLink.ActionType.EXECUTE, StandardEntitlement.REPORT_EXECUTE).
- add(new ActionLink<ReportTO>() {
-
- private static final long serialVersionUID = -3722207913631435501L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final ReportTO ignore) {
- final ReportTO reportTO = model.getObject();
- try {
- restClient.delete(reportTO.getKey());
- SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));
- target.add(container);
- } catch (SyncopeClientException e) {
- LOG.error("While deleting {}", reportTO.getKey(), e);
- SyncopeConsoleSession.get().error(StringUtils.isBlank(e.getMessage())
- ? e.getClass().getName() : e.getMessage());
- }
- ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target);
- }
- }, ActionLink.ActionType.DELETE, StandardEntitlement.REPORT_DELETE).build(componentId);
-
- return panel;
+ public void onClick(final AjaxRequestTarget target, final ReportTO ignore) {
+ final ReportTO clone = SerializationUtils.clone(model.getObject());
+ clone.setKey(null);
+ send(ReportDirectoryPanel.this, Broadcast.EXACT,
+ new AjaxWizard.EditItemActionEvent<>(clone, target));
}
+ }, ActionLink.ActionType.CLONE, StandardEntitlement.REPORT_CREATE);
+
+ panel.add(new ActionLink<ReportTO>() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
@Override
- public ActionLinksPanel<ReportTO> getHeader(final String componentId) {
- final ActionLinksPanel.Builder<ReportTO> panel = ActionLinksPanel.builder();
+ public void onClick(final AjaxRequestTarget target, final ReportTO ignore) {
+ target.add(modal.setContent(new ReportletDirectoryPanel(
+ modal, model.getObject().getKey(), pageRef)));
- return panel.add(new ActionLink<ReportTO>() {
+ modal.header(new StringResourceModel(
+ "reportlet.conf", ReportDirectoryPanel.this, Model.of(model.getObject())));
- private static final long serialVersionUID = -7978723352517770644L;
+ MetaDataRoleAuthorizationStrategy.authorize(
+ modal.getForm(), ENABLE, StandardEntitlement.RESOURCE_UPDATE);
- @Override
- public void onClick(final AjaxRequestTarget target, final ReportTO ignore) {
- if (target != null) {
- target.add(container);
- }
- }
- }, ActionLink.ActionType.RELOAD, StandardEntitlement.TASK_LIST).build(componentId);
+ modal.show(true);
}
- });
+ }, ActionLink.ActionType.COMPOSE, StandardEntitlement.REPORT_UPDATE);
- return columns;
+ panel.add(new ActionLink<ReportTO>() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target, final ReportTO ignore) {
+ viewTask(model.getObject(), target);
+ }
+ }, ActionLink.ActionType.VIEW, StandardEntitlement.REPORT_READ);
+
+ panel.add(new ActionLink<ReportTO>() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target, final ReportTO ignore) {
+ startAt.setExecutionDetail(
+ model.getObject().getKey(), model.getObject().getName(), target);
+ startAt.toggle(target, true);
+ }
+ }, ActionLink.ActionType.EXECUTE, StandardEntitlement.REPORT_EXECUTE);
+
+ panel.add(new ActionLink<ReportTO>() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target, final ReportTO ignore) {
+ final ReportTO reportTO = model.getObject();
+ try {
+ restClient.delete(reportTO.getKey());
+ SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));
+ target.add(container);
+ } catch (SyncopeClientException e) {
+ LOG.error("While deleting {}", reportTO.getKey(), e);
+ SyncopeConsoleSession.get().error(StringUtils.isBlank(e.getMessage())
+ ? e.getClass().getName() : e.getMessage());
+ }
+ ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target);
+ }
+ }, ActionLink.ActionType.DELETE, StandardEntitlement.REPORT_DELETE, true);
+ return panel;
}
@Override
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/java/org/apache/syncope/client/console/reports/ReportExecutionDetails.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/reports/ReportExecutionDetails.java b/client/console/src/main/java/org/apache/syncope/client/console/reports/ReportExecutionDetails.java
index 475deff..eda0e97 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/reports/ReportExecutionDetails.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/reports/ReportExecutionDetails.java
@@ -25,7 +25,7 @@ import org.apache.syncope.client.console.rest.ReportRestClient;
import org.apache.syncope.client.console.tasks.ExecutionsDirectoryPanel;
import org.apache.syncope.client.console.wicket.ajax.form.AbstractAjaxDownloadBehavior;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
-import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionsPanel;
import org.apache.syncope.common.lib.to.ExecTO;
import org.apache.syncope.common.lib.to.ReportTO;
import org.apache.syncope.common.lib.types.ReportExecExportFormat;
@@ -80,7 +80,7 @@ public class ReportExecutionDetails extends MultilevelPanel.SecondLevel {
}
@Override
- protected void addFurtherAcions(final ActionLinksPanel.Builder<ExecTO> panel, final IModel<ExecTO> model) {
+ protected void addFurtherAcions(final ActionsPanel<ExecTO> panel, final IModel<ExecTO> model) {
panel.add(new ActionLink<ExecTO>() {
private static final long serialVersionUID = -3722207913631435501L;
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/java/org/apache/syncope/client/console/reports/ReportTemplateDirectoryPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/reports/ReportTemplateDirectoryPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/reports/ReportTemplateDirectoryPanel.java
index 4b01fbd..d3969b3 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/reports/ReportTemplateDirectoryPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/reports/ReportTemplateDirectoryPanel.java
@@ -33,10 +33,8 @@ import org.apache.syncope.client.console.commons.SortableDataProviderComparator;
import org.apache.syncope.client.console.notifications.TemplateModal;
import org.apache.syncope.client.console.pages.BasePage;
import org.apache.syncope.client.console.panels.DirectoryPanel;
-import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.ActionColumn;
import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
-import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
import org.apache.syncope.client.console.wizards.AbstractModalPanelBuilder;
import org.apache.syncope.client.console.wizards.AjaxWizard;
import org.apache.syncope.common.lib.SyncopeClientException;
@@ -55,6 +53,7 @@ import org.apache.wicket.model.StringResourceModel;
import org.apache.syncope.client.console.panels.WizardModalPanel;
import org.apache.syncope.client.console.reports.ReportTemplateDirectoryPanel.ReportTemplateProvider;
import org.apache.syncope.client.console.rest.ReportRestClient;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionsPanel;
import org.apache.syncope.client.console.wicket.markup.html.form.XMLEditorPanel;
import org.apache.syncope.common.lib.types.ReportTemplateFormat;
import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
@@ -113,96 +112,88 @@ public class ReportTemplateDirectoryPanel
@Override
protected List<IColumn<ReportTemplateTO, String>> getColumns() {
List<IColumn<ReportTemplateTO, String>> columns = new ArrayList<>();
- columns.add(new PropertyColumn<ReportTemplateTO, String>(
- new StringResourceModel("key", this), "key", "key"));
+ columns.add(new PropertyColumn<ReportTemplateTO, String>(new StringResourceModel("key", this), "key", "key"));
+ return columns;
+ }
+
+ @Override
+ public ActionsPanel<ReportTemplateTO> getActions(final IModel<ReportTemplateTO> model) {
+ final ActionsPanel<ReportTemplateTO> panel = super.getActions(model);
- columns.add(new ActionColumn<ReportTemplateTO, String>(new ResourceModel("actions", "")) {
+ panel.add(new ActionLink<ReportTemplateTO>() {
- private static final long serialVersionUID = -3503023501954863131L;
+ private static final long serialVersionUID = -7978723352517770645L;
@Override
- public ActionLinksPanel<ReportTemplateTO> getActions(
- final String componentId, final IModel<ReportTemplateTO> model) {
-
- final ActionLinksPanel.Builder<ReportTemplateTO> panel = ActionLinksPanel.builder();
-
- panel.add(new ActionLink<ReportTemplateTO>() {
-
- private static final long serialVersionUID = -7978723352517770645L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final ReportTemplateTO ignore) {
- TemplateContent<ReportTemplateFormat> content =
- new TemplateContent<>(model.getObject().getKey(), ReportTemplateFormat.FO);
- content.setContent(
- restClient.readTemplateFormat(model.getObject().getKey(), ReportTemplateFormat.FO));
-
- utilityModal.header(new ResourceModel("report.template.fo", "FO Content"));
- utilityModal.setContent(new TemplateContentEditorPanel(content, pageRef));
- utilityModal.show(true);
- target.add(utilityModal);
- }
- }, ActionLink.ActionType.FO_EDIT, StandardEntitlement.MAIL_TEMPLATE_UPDATE);
-
- panel.add(new ActionLink<ReportTemplateTO>() {
-
- private static final long serialVersionUID = -7978723352517770645L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final ReportTemplateTO ignore) {
- TemplateContent<ReportTemplateFormat> content =
- new TemplateContent<>(model.getObject().getKey(), ReportTemplateFormat.HTML);
- content.setContent(
- restClient.readTemplateFormat(model.getObject().getKey(), ReportTemplateFormat.HTML));
-
- utilityModal.header(new ResourceModel("report.template.html", "HTML Content"));
- utilityModal.setContent(new TemplateContentEditorPanel(content, pageRef));
- utilityModal.show(true);
- target.add(utilityModal);
- }
- }, ActionLink.ActionType.HTML, StandardEntitlement.MAIL_TEMPLATE_UPDATE);
-
- panel.add(new ActionLink<ReportTemplateTO>() {
-
- private static final long serialVersionUID = -7978723352517770645L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final ReportTemplateTO ignore) {
- TemplateContent<ReportTemplateFormat> content =
- new TemplateContent<>(model.getObject().getKey(), ReportTemplateFormat.CSV);
- content.setContent(
- restClient.readTemplateFormat(model.getObject().getKey(), ReportTemplateFormat.CSV));
-
- utilityModal.header(new ResourceModel("report.template.text", "TEXT Content"));
- utilityModal.setContent(new TemplateContentEditorPanel(content, pageRef));
- utilityModal.show(true);
- target.add(utilityModal);
- }
- }, ActionLink.ActionType.TEXT, StandardEntitlement.MAIL_TEMPLATE_UPDATE);
-
- panel.add(new ActionLink<ReportTemplateTO>() {
-
- private static final long serialVersionUID = -3722207913631435501L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final ReportTemplateTO ignore) {
- try {
- restClient.deleteTemplate(model.getObject().getKey());
- SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));
- target.add(container);
- } catch (SyncopeClientException e) {
- LOG.error("While deleting object {}", model.getObject().getKey(), e);
- SyncopeConsoleSession.get().error(StringUtils.isBlank(e.getMessage()) ? e.getClass().
- getName() : e.getMessage());
- }
- ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target);
- }
- }, ActionLink.ActionType.DELETE, StandardEntitlement.MAIL_TEMPLATE_DELETE);
-
- return panel.build(componentId);
+ public void onClick(final AjaxRequestTarget target, final ReportTemplateTO ignore) {
+ TemplateContent<ReportTemplateFormat> content = new TemplateContent<>(model.getObject().getKey(),
+ ReportTemplateFormat.FO);
+ content.setContent(
+ restClient.readTemplateFormat(model.getObject().getKey(), ReportTemplateFormat.FO));
+
+ utilityModal.header(new ResourceModel("report.template.fo", "FO Content"));
+ utilityModal.setContent(new TemplateContentEditorPanel(content, pageRef));
+ utilityModal.show(true);
+ target.add(utilityModal);
}
- });
- return columns;
+ }, ActionLink.ActionType.FO_EDIT, StandardEntitlement.MAIL_TEMPLATE_UPDATE);
+
+ panel.add(new ActionLink<ReportTemplateTO>() {
+
+ private static final long serialVersionUID = -7978723352517770645L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target, final ReportTemplateTO ignore) {
+ TemplateContent<ReportTemplateFormat> content = new TemplateContent<>(model.getObject().getKey(),
+ ReportTemplateFormat.HTML);
+ content.setContent(
+ restClient.readTemplateFormat(model.getObject().getKey(), ReportTemplateFormat.HTML));
+
+ utilityModal.header(new ResourceModel("report.template.html", "HTML Content"));
+ utilityModal.setContent(new TemplateContentEditorPanel(content, pageRef));
+ utilityModal.show(true);
+ target.add(utilityModal);
+ }
+ }, ActionLink.ActionType.HTML, StandardEntitlement.MAIL_TEMPLATE_UPDATE);
+
+ panel.add(new ActionLink<ReportTemplateTO>() {
+
+ private static final long serialVersionUID = -7978723352517770645L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target, final ReportTemplateTO ignore) {
+ TemplateContent<ReportTemplateFormat> content = new TemplateContent<>(model.getObject().getKey(),
+ ReportTemplateFormat.CSV);
+ content.setContent(
+ restClient.readTemplateFormat(model.getObject().getKey(), ReportTemplateFormat.CSV));
+
+ utilityModal.header(new ResourceModel("report.template.text", "TEXT Content"));
+ utilityModal.setContent(new TemplateContentEditorPanel(content, pageRef));
+ utilityModal.show(true);
+ target.add(utilityModal);
+ }
+ }, ActionLink.ActionType.TEXT, StandardEntitlement.MAIL_TEMPLATE_UPDATE);
+
+ panel.add(new ActionLink<ReportTemplateTO>() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target, final ReportTemplateTO ignore) {
+ try {
+ restClient.deleteTemplate(model.getObject().getKey());
+ SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));
+ target.add(container);
+ } catch (SyncopeClientException e) {
+ LOG.error("While deleting object {}", model.getObject().getKey(), e);
+ SyncopeConsoleSession.get().error(StringUtils.isBlank(e.getMessage()) ? e.getClass().
+ getName() : e.getMessage());
+ }
+ ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target);
+ }
+ }, ActionLink.ActionType.DELETE, StandardEntitlement.MAIL_TEMPLATE_DELETE);
+
+ return panel;
}
@Override
@@ -218,6 +209,7 @@ public class ReportTemplateDirectoryPanel
@Override
protected Collection<ActionLink.ActionType> getBulkActions() {
return Collections.<ActionLink.ActionType>emptyList();
+
}
protected final class ReportTemplateProvider extends DirectoryDataProvider<ReportTemplateTO> {
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/java/org/apache/syncope/client/console/reports/ReportletDirectoryPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/reports/ReportletDirectoryPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/reports/ReportletDirectoryPanel.java
index 94aeec9..a5a1a6e 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/reports/ReportletDirectoryPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/reports/ReportletDirectoryPanel.java
@@ -42,11 +42,10 @@ import org.apache.syncope.client.console.panels.ModalPanel;
import org.apache.syncope.client.console.panels.search.SearchClause;
import org.apache.syncope.client.console.reports.ReportletDirectoryPanel.ReportletWrapper;
import org.apache.syncope.client.console.rest.ReportRestClient;
-import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.ActionColumn;
import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink.ActionType;
-import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionsPanel;
import org.apache.syncope.client.console.wizards.AjaxWizard;
import org.apache.syncope.common.lib.types.StandardEntitlement;
import org.apache.syncope.common.lib.SyncopeClientException;
@@ -68,7 +67,6 @@ import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.repeater.Item;
import org.apache.wicket.model.CompoundPropertyModel;
import org.apache.wicket.model.IModel;
-import org.apache.wicket.model.ResourceModel;
import org.apache.wicket.model.StringResourceModel;
/**
@@ -123,90 +121,87 @@ public class ReportletDirectoryPanel extends DirectoryPanel<
}
});
- columns.add(new ActionColumn<ReportletWrapper, String>(new ResourceModel("actions")) {
+ return columns;
+ }
+
+ @Override
+ public ActionsPanel<ReportletWrapper> getActions(final IModel<ReportletWrapper> model) {
+ final ActionsPanel<ReportletWrapper> panel = super.getActions(model);
+
+ panel.add(new ActionLink<ReportletWrapper>() {
- private static final long serialVersionUID = 2054811145491901166L;
+ private static final long serialVersionUID = -3722207913631435501L;
@Override
- public ActionLinksPanel<ReportletWrapper> getActions(final String componentId,
- final IModel<ReportletWrapper> model) {
-
- final ActionLinksPanel<ReportletWrapper> panel = ActionLinksPanel.<ReportletWrapper>builder().
- add(new ActionLink<ReportletWrapper>() {
-
- private static final long serialVersionUID = -3722207913631435501L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final ReportletWrapper ignore) {
- AbstractReportletConf clone = SerializationUtils.clone(model.getObject().getConf());
- clone.setName(null);
-
- send(ReportletDirectoryPanel.this, Broadcast.EXACT,
- new AjaxWizard.EditItemActionEvent<>(
- new ReportletWrapper().setConf(clone),
- target));
- }
- }, ActionLink.ActionType.CLONE, StandardEntitlement.REPORT_UPDATE).
- add(new ActionLink<ReportletWrapper>() {
-
- private static final long serialVersionUID = -3722207913631435501L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final ReportletWrapper ignore) {
- send(ReportletDirectoryPanel.this, Broadcast.EXACT,
- new AjaxWizard.EditItemActionEvent<>(model.getObject(), target));
- }
- }, ActionLink.ActionType.EDIT, StandardEntitlement.REPORT_UPDATE).
- add(new ActionLink<ReportletWrapper>() {
-
- private static final long serialVersionUID = -3722207913631435501L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final ReportletWrapper ignore) {
- final ReportletConf reportlet = model.getObject().getConf();
- try {
- final ReportTO actual = restClient.read(report);
- CollectionUtils.filter(actual.getReportletConfs(), new Predicate<ReportletConf>() {
-
- @Override
- public boolean evaluate(final ReportletConf object) {
- return !object.getName().equals(reportlet.getName());
- }
- });
- restClient.update(actual);
- SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));
- customActionOnFinishCallback(target);
- } catch (SyncopeClientException e) {
- LOG.error("While deleting {}", reportlet.getName(), e);
- SyncopeConsoleSession.get().error(StringUtils.isBlank(e.getMessage())
- ? e.getClass().getName() : e.getMessage());
- }
- ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target);
- }
- }, ActionLink.ActionType.DELETE, StandardEntitlement.REPORT_UPDATE).build(componentId);
-
- return panel;
+ public void onClick(final AjaxRequestTarget target, final ReportletWrapper ignore) {
+ ReportletDirectoryPanel.this.getTogglePanel().close(target);
+ AbstractReportletConf clone = SerializationUtils.clone(model.getObject().getConf());
+ clone.setName(null);
+
+ send(ReportletDirectoryPanel.this, Broadcast.EXACT,
+ new AjaxWizard.EditItemActionEvent<>(
+ new ReportletWrapper().setConf(clone),
+ target));
}
+ }, ActionLink.ActionType.CLONE, StandardEntitlement.REPORT_CREATE);
+ panel.add(new ActionLink<ReportletWrapper>() {
- @Override
- public ActionLinksPanel<ReportletWrapper> getHeader(final String componentId) {
- final ActionLinksPanel.Builder<ReportletWrapper> panel = ActionLinksPanel.builder();
+ private static final long serialVersionUID = -3722207913631435501L;
- return panel.add(new ActionLink<ReportletWrapper>() {
+ @Override
+ public void onClick(final AjaxRequestTarget target, final ReportletWrapper ignore) {
+ ReportletDirectoryPanel.this.getTogglePanel().close(target);
+ send(ReportletDirectoryPanel.this, Broadcast.EXACT,
+ new AjaxWizard.EditItemActionEvent<>(model.getObject(), target));
+ }
+ }, ActionLink.ActionType.EDIT, StandardEntitlement.REPORT_UPDATE);
+ panel.add(new ActionLink<ReportletWrapper>() {
- private static final long serialVersionUID = -7978723352517770644L;
+ private static final long serialVersionUID = -3722207913631435501L;
- @Override
- public void onClick(final AjaxRequestTarget target, final ReportletWrapper ignore) {
- if (target != null) {
- customActionOnFinishCallback(target);
+ @Override
+ public void onClick(final AjaxRequestTarget target, final ReportletWrapper ignore) {
+ final ReportletConf reportlet = model.getObject().getConf();
+ try {
+ final ReportTO actual = restClient.read(report);
+ CollectionUtils.filter(actual.getReportletConfs(), new Predicate<ReportletConf>() {
+
+ @Override
+ public boolean evaluate(final ReportletConf object) {
+ return !object.getName().equals(reportlet.getName());
}
- }
- }, ActionLink.ActionType.RELOAD, StandardEntitlement.TASK_LIST).build(componentId);
+ });
+ restClient.update(actual);
+ SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));
+ customActionOnFinishCallback(target);
+ } catch (SyncopeClientException e) {
+ LOG.error("While deleting {}", reportlet.getName(), e);
+ SyncopeConsoleSession.get().error(StringUtils.isBlank(e.getMessage())
+ ? e.getClass().getName() : e.getMessage());
+ }
+ ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target);
}
- });
+ }, ActionLink.ActionType.DELETE, StandardEntitlement.REPORT_DELETE, true);
- return columns;
+ return panel;
+ }
+
+ @Override
+ public ActionsPanel<Serializable> getHeader(final String componentId) {
+ final ActionsPanel<Serializable> panel = new ActionsPanel<>(componentId, null);
+
+ panel.add(new ActionLink<Serializable>() {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target, final Serializable ignore) {
+ if (target != null) {
+ customActionOnFinishCallback(target);
+ }
+ }
+ }, ActionLink.ActionType.RELOAD, StandardEntitlement.TASK_LIST).hideLabel();
+ return panel;
}
@Override
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/java/org/apache/syncope/client/console/status/AnyStatusDirectoryPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/status/AnyStatusDirectoryPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/status/AnyStatusDirectoryPanel.java
index dc665b7..992f3fb 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/status/AnyStatusDirectoryPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/status/AnyStatusDirectoryPanel.java
@@ -39,10 +39,9 @@ import org.apache.syncope.client.console.rest.AnyObjectRestClient;
import org.apache.syncope.client.console.rest.GroupRestClient;
import org.apache.syncope.client.console.rest.ResourceRestClient;
import org.apache.syncope.client.console.rest.UserRestClient;
-import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.ActionColumn;
import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
-import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionsPanel;
import org.apache.syncope.common.lib.to.AnyTO;
import org.apache.syncope.common.lib.to.ResourceTO;
import org.apache.syncope.common.lib.to.GroupTO;
@@ -58,7 +57,6 @@ import org.apache.wicket.markup.ComponentTag;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.repeater.Item;
import org.apache.wicket.model.IModel;
-import org.apache.wicket.model.ResourceModel;
import org.apache.wicket.model.StringResourceModel;
public class AnyStatusDirectoryPanel
@@ -159,40 +157,34 @@ public class AnyStatusDirectoryPanel
}
}
});
+ return columns;
+ }
- columns.add(new ActionColumn<StatusBean, String>(new ResourceModel("actions", "")) {
-
- private static final long serialVersionUID = 3372107192677413965L;
-
- @Override
- public ActionLinksPanel<StatusBean> getActions(
- final String componentId, final IModel<StatusBean> model) {
-
- final ActionLinksPanel.Builder<StatusBean> panel = ActionLinksPanel.builder();
-
- panel.add(new ActionLink<StatusBean>() {
+ @Override
+ public ActionsPanel<StatusBean> getActions(final IModel<StatusBean> model) {
+ final ActionsPanel<StatusBean> panel = super.getActions(model);
- private static final long serialVersionUID = -7978723352517770645L;
+ panel.add(new ActionLink<StatusBean>() {
- @Override
- protected boolean statusCondition(final StatusBean bean) {
- return bean.getConnObjectLink() != null
- && !bean.getResourceName().equalsIgnoreCase(Constants.SYNCOPE);
- }
+ private static final long serialVersionUID = -7978723352517770645L;
- @Override
- public void onClick(final AjaxRequestTarget target, final StatusBean bean) {
- multiLevelPanelRef.next(bean.getResourceName(),
- new ConnObjectDetails(resourceRestClient.readConnObject(
- bean.getResourceName(), anyTO.getType(), anyTO.getKey())), target);
- target.add(multiLevelPanelRef);
- }
- }, ActionLink.ActionType.VIEW, StandardEntitlement.RESOURCE_GET_CONNOBJECT);
+ @Override
+ protected boolean statusCondition(final StatusBean bean) {
+ return bean != null && bean.getConnObjectLink() != null
+ && !bean.getResourceName().equalsIgnoreCase(Constants.SYNCOPE);
+ }
- return panel.build(componentId, model.getObject());
+ @Override
+ public void onClick(final AjaxRequestTarget target, final StatusBean bean) {
+ multiLevelPanelRef.next(bean.getResourceName(),
+ new ConnObjectDetails(resourceRestClient.readConnObject(
+ bean.getResourceName(), anyTO.getType(), anyTO.getKey())), target);
+ target.add(multiLevelPanelRef);
+ AnyStatusDirectoryPanel.this.getTogglePanel().close(target);
}
- });
- return columns;
+ }, ActionLink.ActionType.VIEW, StandardEntitlement.RESOURCE_GET_CONNOBJECT);
+
+ return panel;
}
@Override
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/java/org/apache/syncope/client/console/tasks/ExecutionsDirectoryPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/tasks/ExecutionsDirectoryPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/tasks/ExecutionsDirectoryPanel.java
index e30bcaa..3642529 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/tasks/ExecutionsDirectoryPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/tasks/ExecutionsDirectoryPanel.java
@@ -18,7 +18,6 @@
*/
package org.apache.syncope.client.console.tasks;
-import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
@@ -35,12 +34,11 @@ import org.apache.syncope.client.console.panels.MultilevelPanel;
import org.apache.syncope.client.console.panels.MultilevelPanel.SecondLevel;
import org.apache.syncope.client.console.rest.ExecutionRestClient;
import org.apache.syncope.client.console.tasks.ExecutionsDirectoryPanel.ExecProvider;
-import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.ActionColumn;
import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.DatePropertyColumn;
import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.KeyPropertyColumn;
import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
-import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionsPanel;
import org.apache.syncope.common.lib.SyncopeClientException;
import org.apache.syncope.common.lib.to.ExecTO;
import org.apache.syncope.common.lib.types.StandardEntitlement;
@@ -51,7 +49,6 @@ import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn;
import org.apache.wicket.extensions.markup.html.repeater.data.table.PropertyColumn;
import org.apache.wicket.model.AbstractReadOnlyModel;
import org.apache.wicket.model.IModel;
-import org.apache.wicket.model.ResourceModel;
import org.apache.wicket.model.StringResourceModel;
public abstract class ExecutionsDirectoryPanel
@@ -107,70 +104,49 @@ public abstract class ExecutionsDirectoryPanel
columns.add(new DatePropertyColumn<ExecTO>(new StringResourceModel("end", this), "end", "end"));
columns.add(new PropertyColumn<ExecTO, String>(new StringResourceModel("status", this), "status", "status"));
+ return columns;
+ }
- columns.add(new ActionColumn<ExecTO, String>(new ResourceModel("actions")) {
+ @Override
+ public ActionsPanel<ExecTO> getActions(final IModel<ExecTO> model) {
+ final ActionsPanel<ExecTO> panel = super.getActions(model);
+ final ExecTO taskExecutionTO = model.getObject();
- private static final long serialVersionUID = -3503023501954863131L;
+ panel.add(new ActionLink<ExecTO>() {
- @Override
- public ActionLinksPanel<ExecTO> getActions(final String componentId, final IModel<ExecTO> model) {
- final ExecTO taskExecutionTO = model.getObject();
-
- final ActionLinksPanel.Builder<ExecTO> panel = ActionLinksPanel.<ExecTO>builder().
- add(new ActionLink<ExecTO>() {
-
- private static final long serialVersionUID = -3722207913631435501L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final ExecTO ignore) {
- next(new StringResourceModel("execution.view", ExecutionsDirectoryPanel.this, model).
- getObject(), new ExecMessage(model.getObject().getMessage()), target);
- }
- }, ActionLink.ActionType.VIEW, StandardEntitlement.TASK_READ).
- add(new ActionLink<ExecTO>() {
-
- private static final long serialVersionUID = -3722207913631435501L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final ExecTO ignore) {
- try {
- restClient.deleteExecution(taskExecutionTO.getKey());
- SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));
- } catch (SyncopeClientException scce) {
- SyncopeConsoleSession.get().error(scce.getMessage());
- }
- target.add(ExecutionsDirectoryPanel.this);
- ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target);
- }
- }, ActionLink.ActionType.DELETE, StandardEntitlement.TASK_DELETE);
-
- addFurtherAcions(panel, model);
-
- return panel.build(componentId, model.getObject());
- }
+ private static final long serialVersionUID = -3722207913631435501L;
@Override
- public ActionLinksPanel<Serializable> getHeader(final String componentId) {
- final ActionLinksPanel.Builder<Serializable> panel = ActionLinksPanel.builder();
-
- return panel.add(new ActionLink<Serializable>() {
+ public void onClick(final AjaxRequestTarget target, final ExecTO ignore) {
+ ExecutionsDirectoryPanel.this.getTogglePanel().close(target);
+ next(new StringResourceModel("execution.view", ExecutionsDirectoryPanel.this, model).
+ getObject(), new ExecMessage(model.getObject().getMessage()), target);
+ }
+ }, ActionLink.ActionType.VIEW, StandardEntitlement.TASK_READ);
+ panel.add(new ActionLink<ExecTO>() {
- private static final long serialVersionUID = -7978723352517770644L;
+ private static final long serialVersionUID = -3722207913631435501L;
- @Override
- public void onClick(final AjaxRequestTarget target, final Serializable ignore) {
- if (target != null) {
- target.add(container);
- }
- }
- }, ActionLink.ActionType.RELOAD, StandardEntitlement.TASK_LIST).build(componentId);
+ @Override
+ public void onClick(final AjaxRequestTarget target, final ExecTO ignore) {
+ try {
+ restClient.deleteExecution(taskExecutionTO.getKey());
+ SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));
+ } catch (SyncopeClientException scce) {
+ SyncopeConsoleSession.get().error(scce.getMessage());
+ }
+ target.add(ExecutionsDirectoryPanel.this);
+ ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target);
+ ExecutionsDirectoryPanel.this.getTogglePanel().close(target);
}
- });
+ }, ActionLink.ActionType.DELETE, StandardEntitlement.TASK_DELETE, true);
- return columns;
+ addFurtherAcions(panel, model);
+
+ return panel;
}
- protected void addFurtherAcions(final ActionLinksPanel.Builder<ExecTO> panel, final IModel<ExecTO> model) {
+ protected void addFurtherAcions(final ActionsPanel<ExecTO> panel, final IModel<ExecTO> model) {
}
@Override
[06/10] syncope git commit: [SYNCOPE-1047] Replaces ActionLinksPanel
with TogglePanel
Posted by fm...@apache.org.
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/java/org/apache/syncope/client/console/tasks/NotificationTaskDirectoryPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/tasks/NotificationTaskDirectoryPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/tasks/NotificationTaskDirectoryPanel.java
index 59938ec..eb859a6 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/tasks/NotificationTaskDirectoryPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/tasks/NotificationTaskDirectoryPanel.java
@@ -30,13 +30,12 @@ import org.apache.syncope.client.console.commons.TaskDataProvider;
import org.apache.syncope.client.console.pages.BasePage;
import org.apache.syncope.client.console.panels.ModalPanel;
import org.apache.syncope.client.console.panels.MultilevelPanel;
-import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.ActionColumn;
import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.CollectionPropertyColumn;
import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.DatePropertyColumn;
import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.KeyPropertyColumn;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink.ActionType;
-import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionsPanel;
import org.apache.syncope.common.lib.types.StandardEntitlement;
import org.apache.syncope.common.lib.types.TaskType;
import org.apache.syncope.common.lib.SyncopeClientException;
@@ -48,7 +47,6 @@ import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn;
import org.apache.wicket.extensions.markup.html.repeater.data.table.PropertyColumn;
import org.apache.wicket.model.IModel;
-import org.apache.wicket.model.ResourceModel;
import org.apache.wicket.model.StringResourceModel;
public abstract class NotificationTaskDirectoryPanel
@@ -83,7 +81,7 @@ public abstract class NotificationTaskDirectoryPanel
final List<IColumn<NotificationTaskTO, String>> columns = new ArrayList<>();
columns.add(new KeyPropertyColumn<NotificationTaskTO>(
- new StringResourceModel("key", this), "key", "key"));
+ new StringResourceModel("key", this), "key"));
columns.add(new PropertyColumn<NotificationTaskTO, String>(
new StringResourceModel("sender", this), "sender", "sender"));
@@ -92,7 +90,7 @@ public abstract class NotificationTaskDirectoryPanel
new StringResourceModel("subject", this), "subject", "subject"));
columns.add(new CollectionPropertyColumn<NotificationTaskTO>(
- new StringResourceModel("recipients", this), "recipients", "recipients"));
+ new StringResourceModel("recipients", this), "recipients"));
columns.add(new DatePropertyColumn<NotificationTaskTO>(
new StringResourceModel("start", this), "start", "start"));
@@ -102,105 +100,80 @@ public abstract class NotificationTaskDirectoryPanel
columns.add(new PropertyColumn<NotificationTaskTO, String>(
new StringResourceModel("latestExecStatus", this), "latestExecStatus", "latestExecStatus"));
+ return columns;
+ }
+
+ @Override
+ public ActionsPanel<NotificationTaskTO> getActions(final IModel<NotificationTaskTO> model) {
+ final ActionsPanel<NotificationTaskTO> panel = super.getActions(model);
+ final NotificationTaskTO taskTO = model.getObject();
- columns.add(new ActionColumn<NotificationTaskTO, String>(new ResourceModel("actions", "")) {
+ panel.add(new ActionLink<NotificationTaskTO>() {
- private static final long serialVersionUID = 2054811145491901166L;
+ private static final long serialVersionUID = -3722207913631435501L;
@Override
- public ActionLinksPanel<NotificationTaskTO> getActions(
- final String componentId, final IModel<NotificationTaskTO> model) {
-
- final NotificationTaskTO taskTO = model.getObject();
-
- final ActionLinksPanel<NotificationTaskTO> panel = ActionLinksPanel.<NotificationTaskTO>builder().
- add(new ActionLink<NotificationTaskTO>() {
-
- private static final long serialVersionUID = -3722207913631435501L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final NotificationTaskTO modelObject) {
- viewTask(taskTO, target);
- }
- }, ActionLink.ActionType.VIEW, StandardEntitlement.TASK_READ).
- add(new ActionLink<NotificationTaskTO>() {
-
- private static final long serialVersionUID = -3722207913631435501L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final NotificationTaskTO modelObject) {
- viewMailBody(MailTemplateFormat.TEXT, taskTO.getTextBody(), target);
- }
- }, ActionLink.ActionType.TEXT, StandardEntitlement.TASK_READ).
- add(new ActionLink<NotificationTaskTO>() {
-
- private static final long serialVersionUID = -3722207913631435501L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final NotificationTaskTO modelObject) {
- viewMailBody(MailTemplateFormat.HTML, taskTO.getHtmlBody(), target);
- }
- }, ActionLink.ActionType.HTML, StandardEntitlement.TASK_READ).
- add(new ActionLink<NotificationTaskTO>() {
-
- private static final long serialVersionUID = -3722207913631435501L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final NotificationTaskTO modelObject) {
- try {
- restClient.startExecution(taskTO.getKey(), null);
- SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));
- target.add(container);
- } catch (SyncopeClientException e) {
- SyncopeConsoleSession.get().error(StringUtils.isBlank(e.getMessage())
- ? e.getClass().getName() : e.getMessage());
- LOG.error("While running {}", taskTO.getKey(), e);
- }
- ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target);
- }
- }, ActionLink.ActionType.EXECUTE, StandardEntitlement.TASK_EXECUTE).
- add(new ActionLink<NotificationTaskTO>() {
-
- private static final long serialVersionUID = -3722207913631435501L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final NotificationTaskTO modelObject) {
- try {
- restClient.delete(taskTO.getKey(), NotificationTaskTO.class);
- updateResultTable(target);
- SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));
- target.add(container);
- } catch (SyncopeClientException e) {
- LOG.error("While deleting {}", taskTO.getKey(), e);
- SyncopeConsoleSession.get().error(StringUtils.isBlank(e.getMessage())
- ? e.getClass().getName() : e.getMessage());
- }
- ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target);
- }
- }, ActionLink.ActionType.DELETE, StandardEntitlement.TASK_DELETE).build(componentId);
-
- return panel;
+ public void onClick(final AjaxRequestTarget target, final NotificationTaskTO modelObject) {
+ viewTask(taskTO, target);
}
+ }, ActionLink.ActionType.VIEW, StandardEntitlement.TASK_READ);
+ panel.add(new ActionLink<NotificationTaskTO>() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
@Override
- public ActionLinksPanel<NotificationTaskTO> getHeader(final String componentId) {
- final ActionLinksPanel.Builder<NotificationTaskTO> panel = ActionLinksPanel.builder();
+ public void onClick(final AjaxRequestTarget target, final NotificationTaskTO modelObject) {
+ viewMailBody(MailTemplateFormat.TEXT, taskTO.getTextBody(), target);
+ }
+ }, ActionLink.ActionType.TEXT, StandardEntitlement.TASK_READ);
+ panel.add(new ActionLink<NotificationTaskTO>() {
- return panel.add(new ActionLink<NotificationTaskTO>() {
+ private static final long serialVersionUID = -3722207913631435501L;
- private static final long serialVersionUID = -7978723352517770644L;
+ @Override
+ public void onClick(final AjaxRequestTarget target, final NotificationTaskTO modelObject) {
+ viewMailBody(MailTemplateFormat.HTML, taskTO.getHtmlBody(), target);
+ }
+ }, ActionLink.ActionType.HTML, StandardEntitlement.TASK_READ);
+ panel.add(new ActionLink<NotificationTaskTO>() {
- @Override
- public void onClick(final AjaxRequestTarget target, final NotificationTaskTO ignore) {
- if (target != null) {
- target.add(container);
- }
- }
- }, ActionLink.ActionType.RELOAD, StandardEntitlement.TASK_LIST).build(componentId);
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target, final NotificationTaskTO modelObject) {
+ try {
+ restClient.startExecution(taskTO.getKey(), null);
+ SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));
+ target.add(container);
+ } catch (SyncopeClientException e) {
+ SyncopeConsoleSession.get().error(StringUtils.isBlank(e.getMessage())
+ ? e.getClass().getName() : e.getMessage());
+ LOG.error("While running {}", taskTO.getKey(), e);
+ }
+ ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target);
}
- });
+ }, ActionLink.ActionType.EXECUTE, StandardEntitlement.TASK_EXECUTE);
+ panel.add(new ActionLink<NotificationTaskTO>() {
- return columns;
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target, final NotificationTaskTO modelObject) {
+ try {
+ restClient.delete(taskTO.getKey(), NotificationTaskTO.class);
+ updateResultTable(target);
+ SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));
+ target.add(container);
+ } catch (SyncopeClientException e) {
+ LOG.error("While deleting {}", taskTO.getKey(), e);
+ SyncopeConsoleSession.get().error(StringUtils.isBlank(e.getMessage())
+ ? e.getClass().getName() : e.getMessage());
+ }
+ ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target);
+ }
+ }, ActionLink.ActionType.DELETE, StandardEntitlement.TASK_DELETE, true);
+
+ return panel;
}
@Override
@@ -237,7 +210,7 @@ public abstract class NotificationTaskDirectoryPanel
final String entityKey,
final int paginatorRows) {
- super(paginatorRows, TaskType.NOTIFICATION , restClient);
+ super(paginatorRows, TaskType.NOTIFICATION, restClient);
this.notification = notification;
this.anyTypeKind = anyTypeKind;
this.entityKey = entityKey;
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/java/org/apache/syncope/client/console/tasks/PropagationTaskDirectoryPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/tasks/PropagationTaskDirectoryPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/tasks/PropagationTaskDirectoryPanel.java
index 9bb23e5..1c653d0 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/tasks/PropagationTaskDirectoryPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/tasks/PropagationTaskDirectoryPanel.java
@@ -30,13 +30,12 @@ import org.apache.syncope.client.console.commons.TaskDataProvider;
import org.apache.syncope.client.console.pages.BasePage;
import org.apache.syncope.client.console.panels.ModalPanel;
import org.apache.syncope.client.console.panels.MultilevelPanel;
-import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.ActionColumn;
import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.DatePropertyColumn;
import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.KeyPropertyColumn;
import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink.ActionType;
-import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionsPanel;
import org.apache.syncope.common.lib.to.PropagationTaskTO;
import org.apache.syncope.common.lib.types.StandardEntitlement;
import org.apache.syncope.common.lib.types.TaskType;
@@ -46,7 +45,6 @@ import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn;
import org.apache.wicket.extensions.markup.html.repeater.data.table.PropertyColumn;
import org.apache.wicket.model.IModel;
-import org.apache.wicket.model.ResourceModel;
import org.apache.wicket.model.StringResourceModel;
/**
@@ -74,7 +72,7 @@ public abstract class PropagationTaskDirectoryPanel
final List<IColumn<PropagationTaskTO, String>> columns = new ArrayList<>();
columns.add(new KeyPropertyColumn<PropagationTaskTO>(
- new StringResourceModel("key", this), "key", "key"));
+ new StringResourceModel("key", this), "key"));
columns.add(new PropertyColumn<PropagationTaskTO, String>(new StringResourceModel(
"operation", this), "operation", "operation"));
@@ -101,86 +99,65 @@ public abstract class PropagationTaskDirectoryPanel
columns.add(new PropertyColumn<PropagationTaskTO, String>(
new StringResourceModel("latestExecStatus", this), "latestExecStatus", "latestExecStatus"));
+ return columns;
+ }
- columns.add(new ActionColumn<PropagationTaskTO, String>(new ResourceModel("actions")) {
+ @Override
+ public ActionsPanel<PropagationTaskTO> getActions(final IModel<PropagationTaskTO> model) {
+ final ActionsPanel<PropagationTaskTO> panel = super.getActions(model);
+ final PropagationTaskTO taskTO = model.getObject();
- private static final long serialVersionUID = 2054811145491901166L;
+ panel.add(new ActionLink<PropagationTaskTO>() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
@Override
- public ActionLinksPanel<PropagationTaskTO> getActions(
- final String componentId, final IModel<PropagationTaskTO> model) {
-
- final PropagationTaskTO taskTO = model.getObject();
-
- final ActionLinksPanel<PropagationTaskTO> panel = ActionLinksPanel.<PropagationTaskTO>builder().
- add(new ActionLink<PropagationTaskTO>() {
-
- private static final long serialVersionUID = -3722207913631435501L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final PropagationTaskTO modelObject) {
- viewTask(taskTO, target);
- }
- }, ActionLink.ActionType.VIEW, StandardEntitlement.TASK_READ).
- add(new ActionLink<PropagationTaskTO>() {
-
- private static final long serialVersionUID = -3722207913631435501L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final PropagationTaskTO modelObject) {
- try {
- restClient.startExecution(taskTO.getKey(), null);
- SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));
- target.add(container);
- } catch (SyncopeClientException e) {
- SyncopeConsoleSession.get().error(StringUtils.isBlank(e.getMessage())
- ? e.getClass().getName() : e.getMessage());
- LOG.error("While running {}", taskTO.getKey(), e);
- }
- ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target);
- }
- }, ActionLink.ActionType.EXECUTE, StandardEntitlement.TASK_EXECUTE).
- add(new ActionLink<PropagationTaskTO>() {
-
- private static final long serialVersionUID = -3722207913631435501L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final PropagationTaskTO modelObject) {
- try {
- restClient.delete(taskTO.getKey(), PropagationTaskTO.class);
- SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));
- target.add(container);
- } catch (SyncopeClientException e) {
- LOG.error("While deleting {}", taskTO.getKey(), e);
- SyncopeConsoleSession.get().error(StringUtils.isBlank(e.getMessage())
- ? e.getClass().getName() : e.getMessage());
- }
- ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target);
- }
- }, ActionLink.ActionType.DELETE, StandardEntitlement.TASK_DELETE).build(componentId);
-
- return panel;
+ public void onClick(final AjaxRequestTarget target, final PropagationTaskTO modelObject) {
+ PropagationTaskDirectoryPanel.this.getTogglePanel().close(target);
+ viewTask(taskTO, target);
}
+ }, ActionLink.ActionType.VIEW, StandardEntitlement.TASK_READ);
+
+ panel.add(new ActionLink<PropagationTaskTO>() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
@Override
- public ActionLinksPanel<PropagationTaskTO> getHeader(final String componentId) {
- final ActionLinksPanel.Builder<PropagationTaskTO> panel = ActionLinksPanel.builder();
+ public void onClick(final AjaxRequestTarget target, final PropagationTaskTO modelObject) {
+ try {
+ restClient.startExecution(taskTO.getKey(), null);
+ SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));
+ target.add(container);
+ } catch (SyncopeClientException e) {
+ SyncopeConsoleSession.get().error(StringUtils.isBlank(e.getMessage())
+ ? e.getClass().getName() : e.getMessage());
+ LOG.error("While running {}", taskTO.getKey(), e);
+ }
+ ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target);
+ }
+ }, ActionLink.ActionType.EXECUTE, StandardEntitlement.TASK_EXECUTE);
- return panel.add(new ActionLink<PropagationTaskTO>() {
+ panel.add(new ActionLink<PropagationTaskTO>() {
- private static final long serialVersionUID = -7978723352517770644L;
+ private static final long serialVersionUID = -3722207913631435501L;
- @Override
- public void onClick(final AjaxRequestTarget target, final PropagationTaskTO ignore) {
- if (target != null) {
- target.add(container);
- }
- }
- }, ActionLink.ActionType.RELOAD, StandardEntitlement.TASK_LIST).build(componentId);
+ @Override
+ public void onClick(final AjaxRequestTarget target, final PropagationTaskTO modelObject) {
+ try {
+ restClient.delete(taskTO.getKey(), PropagationTaskTO.class);
+ SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));
+ target.add(container);
+ PropagationTaskDirectoryPanel.this.getTogglePanel().close(target);
+ } catch (SyncopeClientException e) {
+ LOG.error("While deleting {}", taskTO.getKey(), e);
+ SyncopeConsoleSession.get().error(StringUtils.isBlank(e.getMessage())
+ ? e.getClass().getName() : e.getMessage());
+ }
+ ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target);
}
- });
+ }, ActionLink.ActionType.DELETE, StandardEntitlement.TASK_DELETE, true);
- return columns;
+ return panel;
}
@Override
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/java/org/apache/syncope/client/console/tasks/ProvisioningTaskDirectoryPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/tasks/ProvisioningTaskDirectoryPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/tasks/ProvisioningTaskDirectoryPanel.java
index 75b5efd..6634736 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/tasks/ProvisioningTaskDirectoryPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/tasks/ProvisioningTaskDirectoryPanel.java
@@ -72,7 +72,7 @@ public abstract class ProvisioningTaskDirectoryPanel<T extends AbstractProvision
List<IColumn<T, String>> columns = new ArrayList<>();
columns.add(new KeyPropertyColumn<T>(
- new StringResourceModel("key", this), "key", "key"));
+ new StringResourceModel("key", this), "key"));
columns.add(new PropertyColumn<T, String>(
new StringResourceModel("name", this), "name", "name"));
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/java/org/apache/syncope/client/console/tasks/PullTaskDirectoryPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/tasks/PullTaskDirectoryPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/tasks/PullTaskDirectoryPanel.java
index 1c9804e..9af1251 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/tasks/PullTaskDirectoryPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/tasks/PullTaskDirectoryPanel.java
@@ -22,7 +22,7 @@ import org.apache.syncope.client.console.commons.Constants;
import org.apache.syncope.client.console.panels.MultilevelPanel;
import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
-import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionsPanel;
import org.apache.syncope.common.lib.to.PullTaskTO;
import org.apache.syncope.common.lib.types.StandardEntitlement;
import org.apache.syncope.common.lib.types.TaskType;
@@ -53,21 +53,17 @@ public abstract class PullTaskDirectoryPanel extends ProvisioningTaskDirectoryPa
}
@Override
- protected void addFurtherActions(final ActionLinksPanel.Builder<PullTaskTO> panel, final IModel<PullTaskTO> model) {
+ protected void addFurtherActions(final ActionsPanel<PullTaskTO> panel, final IModel<PullTaskTO> model) {
panel.add(new ActionLink<PullTaskTO>() {
private static final long serialVersionUID = -3722207913631435501L;
@Override
public void onClick(final AjaxRequestTarget target, final PullTaskTO ignore) {
+ PullTaskDirectoryPanel.this.getTogglePanel().close(target);
templates.setTargetObject(model.getObject());
templates.toggle(target, true);
}
-
- @Override
- public boolean isIndicatorEnabled() {
- return false;
- }
- }, ActionLink.ActionType.TEMPLATE, StandardEntitlement.TASK_UPDATE);
+ }, ActionLink.ActionType.TEMPLATE, StandardEntitlement.TASK_UPDATE).disableIndicator();
}
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/java/org/apache/syncope/client/console/tasks/SchedTaskDirectoryPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/tasks/SchedTaskDirectoryPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/tasks/SchedTaskDirectoryPanel.java
index 8b10e8d..f09c0dc 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/tasks/SchedTaskDirectoryPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/tasks/SchedTaskDirectoryPanel.java
@@ -34,14 +34,13 @@ import org.apache.syncope.client.console.pages.BasePage;
import org.apache.syncope.client.console.panels.ModalPanel;
import org.apache.syncope.client.console.panels.MultilevelPanel;
import org.apache.syncope.client.console.rest.TaskRestClient;
-import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.ActionColumn;
import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.BooleanPropertyColumn;
import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.DatePropertyColumn;
import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.KeyPropertyColumn;
import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink.ActionType;
-import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionsPanel;
import org.apache.syncope.client.console.wizards.AjaxWizard;
import org.apache.syncope.common.lib.types.StandardEntitlement;
import org.apache.syncope.common.lib.types.TaskType;
@@ -61,7 +60,6 @@ import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.repeater.Item;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.Model;
-import org.apache.wicket.model.ResourceModel;
import org.apache.wicket.model.StringResourceModel;
/**
@@ -74,8 +72,8 @@ public abstract class SchedTaskDirectoryPanel<T extends SchedTaskTO>
private static final long serialVersionUID = 4984337552918213290L;
- private static final String GROUP_MEMBER_PROVISION_TASKJOB =
- "org.apache.syncope.core.provisioning.java.job.GroupMemberProvisionTaskJobDelegate";
+ private static final String GROUP_MEMBER_PROVISION_TASKJOB
+ = "org.apache.syncope.core.provisioning.java.job.GroupMemberProvisionTaskJobDelegate";
protected final Class<T> reference;
@@ -131,7 +129,7 @@ public abstract class SchedTaskDirectoryPanel<T extends SchedTaskTO>
final List<IColumn<T, String>> columns = new ArrayList<>();
columns.add(new KeyPropertyColumn<T>(
- new StringResourceModel("key", this), "key", "key"));
+ new StringResourceModel("key", this), "key"));
columns.add(new PropertyColumn<T, String>(
new StringResourceModel("name", this), "name", "name"));
@@ -179,113 +177,110 @@ public abstract class SchedTaskDirectoryPanel<T extends SchedTaskTO>
final List<IColumn<T, String>> columns = new ArrayList<>();
columns.addAll(getFieldColumns());
+ return columns;
+ }
+
+ @Override
+ public ActionsPanel<T> getActions(final IModel<T> model) {
+ final ActionsPanel<T> panel = super.getActions(model);
+ final T taskTO = model.getObject();
- columns.add(new ActionColumn<T, String>(new ResourceModel("actions")) {
+ panel.add(new ActionLink<T>() {
- private static final long serialVersionUID = 2054811145491901166L;
+ private static final long serialVersionUID = -3722207913631435501L;
@Override
- public ActionLinksPanel<T> getActions(final String componentId, final IModel<T> model) {
- final T taskTO = model.getObject();
+ public void onClick(final AjaxRequestTarget target, final T ignore) {
+ SchedTaskDirectoryPanel.this.getTogglePanel().close(target);
+ viewTask(taskTO, target);
+ }
+ }, ActionLink.ActionType.VIEW, StandardEntitlement.TASK_READ);
- ActionLinksPanel.Builder<T> panel = ActionLinksPanel.<T>builder().add(new ActionLink<T>() {
+ panel.add(new ActionLink<T>() {
- private static final long serialVersionUID = -3722207913631435501L;
+ private static final long serialVersionUID = -3722207913631435501L;
- @Override
- public void onClick(final AjaxRequestTarget target, final T ignore) {
- viewTask(taskTO, target);
- }
- }, ActionLink.ActionType.VIEW, StandardEntitlement.TASK_READ).add(new ActionLink<T>() {
-
- private static final long serialVersionUID = -3722207913631435501L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final T ignore) {
- send(SchedTaskDirectoryPanel.this, Broadcast.EXACT,
- new AjaxWizard.EditItemActionEvent<>(
- restClient.readSchedTask(reference, model.getObject().getKey()),
- target).setResourceModel(
- new StringResourceModel("inner.task.edit",
- SchedTaskDirectoryPanel.this,
- Model.of(Pair.of(
- ActionLink.ActionType.EDIT, model.getObject())))));
- }
- }, ActionLink.ActionType.EDIT, StandardEntitlement.TASK_UPDATE,
- !GROUP_MEMBER_PROVISION_TASKJOB.equals(taskTO.getJobDelegateClassName())).
- add(new ActionLink<T>() {
-
- private static final long serialVersionUID = -3722207913631435501L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final T ignore) {
- final T clone = SerializationUtils.clone(model.getObject());
- clone.setKey(null);
- send(SchedTaskDirectoryPanel.this, Broadcast.EXACT,
- new AjaxWizard.EditItemActionEvent<>(clone, target).setResourceModel(
- new StringResourceModel("inner.task.clone",
- SchedTaskDirectoryPanel.this,
- Model.of(Pair.of(
- ActionLink.ActionType.CLONE, model.getObject())))));
- }
- }, ActionLink.ActionType.CLONE, StandardEntitlement.TASK_CREATE).add(new ActionLink<T>() {
-
- private static final long serialVersionUID = -3722207913631435501L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final T ignore) {
- startAt.setExecutionDetail(
- model.getObject().getKey(), model.getObject().getName(), target);
- startAt.toggle(target, true);
- }
- }, ActionLink.ActionType.EXECUTE, StandardEntitlement.TASK_EXECUTE,
- !GROUP_MEMBER_PROVISION_TASKJOB.equals(taskTO.getJobDelegateClassName())).
- add(new ActionLink<T>() {
-
- private static final long serialVersionUID = -3722207913631435501L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final T ignore) {
- try {
- restClient.delete(taskTO.getKey(), reference);
- SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));
- target.add(container);
- } catch (SyncopeClientException e) {
- SyncopeConsoleSession.get().error(StringUtils.isBlank(e.getMessage())
- ? e.getClass().getName() : e.getMessage());
- LOG.error("While deleting propagation task {}", taskTO.getKey(), e);
- }
- ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target);
- }
- }, ActionLink.ActionType.DELETE, StandardEntitlement.TASK_DELETE);
-
- addFurtherActions(panel, model);
-
- return panel.build(componentId, model.getObject());
+ @Override
+ public void onClick(final AjaxRequestTarget target, final T ignore) {
+ SchedTaskDirectoryPanel.this.getTogglePanel().close(target);
+ send(SchedTaskDirectoryPanel.this, Broadcast.EXACT,
+ new AjaxWizard.EditItemActionEvent<>(
+ restClient.readSchedTask(reference, model.getObject().getKey()),
+ target).setResourceModel(
+ new StringResourceModel("inner.task.edit",
+ SchedTaskDirectoryPanel.this,
+ Model.of(Pair.of(
+ ActionLink.ActionType.EDIT, model.getObject())))));
}
@Override
- public ActionLinksPanel<T> getHeader(final String componentId) {
- final ActionLinksPanel.Builder<T> panel = ActionLinksPanel.builder();
+ protected boolean statusCondition(final T modelObject) {
+ return !GROUP_MEMBER_PROVISION_TASKJOB.equals(taskTO.getJobDelegateClassName());
+ }
+ }, ActionLink.ActionType.EDIT, StandardEntitlement.TASK_UPDATE);
- return panel.add(new ActionLink<T>() {
+ panel.add(new ActionLink<T>() {
- private static final long serialVersionUID = -7978723352517770644L;
+ private static final long serialVersionUID = -3722207913631435501L;
- @Override
- public void onClick(final AjaxRequestTarget target, final T ignore) {
- if (target != null) {
- target.add(container);
- }
- }
- }, ActionLink.ActionType.RELOAD, StandardEntitlement.TASK_LIST).build(componentId);
+ @Override
+ public void onClick(final AjaxRequestTarget target, final T ignore) {
+ SchedTaskDirectoryPanel.this.getTogglePanel().close(target);
+ final T clone = SerializationUtils.clone(model.getObject());
+ clone.setKey(null);
+ send(SchedTaskDirectoryPanel.this, Broadcast.EXACT,
+ new AjaxWizard.EditItemActionEvent<>(clone, target).setResourceModel(
+ new StringResourceModel("inner.task.clone",
+ SchedTaskDirectoryPanel.this,
+ Model.of(Pair.of(
+ ActionLink.ActionType.CLONE, model.getObject())))));
}
- });
+ }, ActionLink.ActionType.CLONE, StandardEntitlement.TASK_CREATE);
- return columns;
+ panel.add(new ActionLink<T>() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target, final T ignore) {
+ SchedTaskDirectoryPanel.this.getTogglePanel().close(target);
+ startAt.setExecutionDetail(
+ model.getObject().getKey(), model.getObject().getName(), target);
+ startAt.toggle(target, true);
+ }
+
+ @Override
+ protected boolean statusCondition(final T modelObject) {
+ return !GROUP_MEMBER_PROVISION_TASKJOB.equals(taskTO.getJobDelegateClassName());
+ }
+ }, ActionLink.ActionType.EXECUTE, StandardEntitlement.TASK_EXECUTE);
+
+ addFurtherActions(panel, model);
+
+ panel.add(new ActionLink<T>() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target, final T ignore) {
+ try {
+ restClient.delete(taskTO.getKey(), reference);
+ SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));
+ target.add(container);
+ SchedTaskDirectoryPanel.this.getTogglePanel().close(target);
+ } catch (SyncopeClientException e) {
+ SyncopeConsoleSession.get().error(StringUtils.isBlank(e.getMessage())
+ ? e.getClass().getName() : e.getMessage());
+ LOG.error("While deleting propagation task {}", taskTO.getKey(), e);
+ }
+ ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target);
+ }
+ }, ActionLink.ActionType.DELETE, StandardEntitlement.TASK_DELETE, true);
+
+ return panel;
}
- protected void addFurtherActions(final ActionLinksPanel.Builder<T> panel, final IModel<T> model) {
+ protected void addFurtherActions(final ActionsPanel<T> panel, final IModel<T> model) {
}
@Override
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/java/org/apache/syncope/client/console/topology/Topology.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/topology/Topology.java b/client/console/src/main/java/org/apache/syncope/client/console/topology/Topology.java
index b70214b..d2ba682 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/topology/Topology.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/topology/Topology.java
@@ -38,7 +38,7 @@ import org.apache.syncope.client.console.rest.ConnectorRestClient;
import org.apache.syncope.client.console.rest.ResourceRestClient;
import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
-import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionsPanel;
import org.apache.syncope.common.lib.to.ConnInstanceTO;
import org.apache.syncope.common.lib.to.ResourceTO;
import org.apache.syncope.common.lib.types.StandardEntitlement;
@@ -92,8 +92,8 @@ public class Topology extends BasePage {
}
};
- private final LoadableDetachableModel<Map<String, List<ConnInstanceTO>>> connModel =
- new LoadableDetachableModel<Map<String, List<ConnInstanceTO>>>() {
+ private final LoadableDetachableModel<Map<String, List<ConnInstanceTO>>> connModel
+ = new LoadableDetachableModel<Map<String, List<ConnInstanceTO>>>() {
private static final long serialVersionUID = 5275935387613157432L;
@@ -116,8 +116,8 @@ public class Topology extends BasePage {
}
};
- private final LoadableDetachableModel<Pair<List<URI>, List<URI>>> csModel =
- new LoadableDetachableModel<Pair<List<URI>, List<URI>>>() {
+ private final LoadableDetachableModel<Pair<List<URI>, List<URI>>> csModel
+ = new LoadableDetachableModel<Pair<List<URI>, List<URI>>>() {
private static final long serialVersionUID = 5275935387613157433L;
@@ -167,8 +167,7 @@ public class Topology extends BasePage {
// -----------------------------------------
// Add Zoom panel
// -----------------------------------------
- final ActionLinksPanel.Builder<Serializable> zoomActionPanel = ActionLinksPanel.builder();
- zoomActionPanel.setDisableIndicator(true);
+ final ActionsPanel<Serializable> zoomActionPanel = new ActionsPanel<>("zoom", null);
zoomActionPanel.add(new ActionLink<Serializable>() {
@@ -178,7 +177,8 @@ public class Topology extends BasePage {
public void onClick(final AjaxRequestTarget target, final Serializable ignore) {
target.appendJavaScript("zoomIn($('#drawing')[0]);");
}
- }, ActionLink.ActionType.ZOOM_IN, StandardEntitlement.RESOURCE_LIST).add(new ActionLink<Serializable>() {
+ }, ActionLink.ActionType.ZOOM_IN, StandardEntitlement.RESOURCE_LIST).disableIndicator().hideLabel();
+ zoomActionPanel.add(new ActionLink<Serializable>() {
private static final long serialVersionUID = -3722207913631435501L;
@@ -186,9 +186,9 @@ public class Topology extends BasePage {
public void onClick(final AjaxRequestTarget target, final Serializable ignore) {
target.appendJavaScript("zoomOut($('#drawing')[0]);");
}
- }, ActionLink.ActionType.ZOOM_OUT, StandardEntitlement.RESOURCE_LIST);
+ }, ActionLink.ActionType.ZOOM_OUT, StandardEntitlement.RESOURCE_LIST).disableIndicator().hideLabel();
- body.add(zoomActionPanel.build("zoom"));
+ body.add(zoomActionPanel);
// -----------------------------------------
// -----------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/java/org/apache/syncope/client/console/topology/TopologyTogglePanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/topology/TopologyTogglePanel.java b/client/console/src/main/java/org/apache/syncope/client/console/topology/TopologyTogglePanel.java
index 4bb1aa2..dff34e6 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/topology/TopologyTogglePanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/topology/TopologyTogglePanel.java
@@ -76,7 +76,7 @@ public class TopologyTogglePanel extends TogglePanel<Serializable> {
protected final BaseModal<Serializable> provisionModal;
public TopologyTogglePanel(final String id, final PageReference pageRef) {
- super(id, pageRef);
+ super(id, "topologyTogglePanel", pageRef);
modal.size(Modal.Size.Large);
setFooterVisibility(false);
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/java/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/ActionColumn.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/ActionColumn.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/ActionColumn.java
deleted file mode 100644
index e1ec878..0000000
--- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/ActionColumn.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table;
-
-import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
-import org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator;
-import org.apache.wicket.extensions.markup.html.repeater.data.table.AbstractColumn;
-import org.apache.wicket.markup.repeater.Item;
-import org.apache.wicket.model.IModel;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public abstract class ActionColumn<T, S> extends AbstractColumn<T, S> {
-
- private static final long serialVersionUID = 7955560320949560725L;
-
- protected static final Logger LOG = LoggerFactory.getLogger(ActionColumn.class);
-
- public ActionColumn(final IModel<String> displayModel) {
- super(displayModel);
- }
-
- @Override
- public String getCssClass() {
- return "action";
- }
-
- @Override
- public void populateItem(final Item<ICellPopulator<T>> item, final String componentId, final IModel<T> rowModel) {
- item.add(getActions(componentId, rowModel));
- }
-
- public abstract ActionLinksPanel<?> getActions(final String componentId, final IModel<T> rowModel);
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/java/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/AjaxFallbackDataTable.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/AjaxFallbackDataTable.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/AjaxFallbackDataTable.java
index 9b8cccb..4afa9ea 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/AjaxFallbackDataTable.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/AjaxFallbackDataTable.java
@@ -18,8 +18,15 @@
*/
package org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table;
+import java.io.Serializable;
import java.util.List;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.syncope.client.console.commons.Constants;
import org.apache.syncope.client.console.wicket.ajax.markup.html.navigation.paging.AjaxDataNavigationToolbar;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksTogglePanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionsPanel;
+import org.apache.wicket.AttributeModifier;
+import org.apache.wicket.ajax.AjaxEventBehavior;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.extensions.ajax.markup.html.repeater.data.sort.AjaxFallbackOrderByBorder;
import org.apache.wicket.extensions.ajax.markup.html.repeater.data.table.AjaxFallbackHeadersToolbar;
@@ -33,16 +40,20 @@ import org.apache.wicket.markup.repeater.Item;
import org.apache.wicket.markup.repeater.OddEvenItem;
import org.apache.wicket.model.IModel;
-public class AjaxFallbackDataTable<T, S> extends DataTable<T, S> {
+public class AjaxFallbackDataTable<T extends Serializable, S> extends DataTable<T, S> {
private static final long serialVersionUID = 6861105496141602937L;
+ private ActionLinksTogglePanel<T> togglePanel;
+
public AjaxFallbackDataTable(final String id, final List<? extends IColumn<T, S>> columns,
final ISortableDataProvider<T, S> dataProvider, final int rowsPerPage, final WebMarkupContainer container) {
super(id, columns, dataProvider, rowsPerPage);
setOutputMarkupId(true);
setVersioned(false);
+ togglePanel = getTogglePanel();
+
addTopToolbar(new AjaxFallbackHeadersToolbar<S>(this, dataProvider) {
private static final long serialVersionUID = 7406306172424359609L;
@@ -90,8 +101,44 @@ public class AjaxFallbackDataTable<T, S> extends DataTable<T, S> {
addBottomToolbar(new NoRecordsToolbar(this));
}
+ protected ActionsPanel<T> getActions(final IModel<T> model) {
+ return null;
+ }
+
+ protected ActionLinksTogglePanel<T> getTogglePanel() {
+ return null;
+ }
+
@Override
protected Item<T> newRowItem(final String id, final int index, final IModel<T> model) {
- return new OddEvenItem<>(id, index, model);
+ final OddEvenItem<T> item = new OddEvenItem<>(id, index, model);
+
+ if (togglePanel != null) {
+ final ActionsPanel<T> actions = getActions(model);
+
+ if (actions != null && !actions.isEmpty()) {
+ item.add(new AttributeModifier("style", "cursor: pointer;"));
+ item.add(new AjaxEventBehavior(Constants.ON_CLICK) {
+
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ protected String findIndicatorId() {
+ return StringUtils.EMPTY;
+ }
+
+ @Override
+ protected void onEvent(final AjaxRequestTarget target) {
+ if (target.getLastFocusedElementId() == null
+ || (!target.getLastFocusedElementId().startsWith("check")
+ && !target.getLastFocusedElementId().startsWith("groupselector"))) {
+ togglePanel.toggleWithContent(target, getActions(model), model.getObject());
+ }
+ }
+ });
+ }
+ }
+
+ return item;
}
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/java/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/CollectionPropertyColumn.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/CollectionPropertyColumn.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/CollectionPropertyColumn.java
index a5fd774..eaac4dd 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/CollectionPropertyColumn.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/CollectionPropertyColumn.java
@@ -33,9 +33,8 @@ public class CollectionPropertyColumn<T> extends PropertyColumn<T, String> {
public CollectionPropertyColumn(
final IModel<String> displayModel,
- final String sortProperty,
final String propertyExpression) {
- super(displayModel, sortProperty, propertyExpression);
+ super(displayModel, propertyExpression);
}
@Override
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/java/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/KeyPropertyColumn.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/KeyPropertyColumn.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/KeyPropertyColumn.java
index 281189a..3773712 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/KeyPropertyColumn.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/KeyPropertyColumn.java
@@ -20,6 +20,7 @@ package org.apache.syncope.client.console.wicket.extensions.markup.html.repeater
import org.apache.commons.lang3.StringUtils;
import org.apache.wicket.AttributeModifier;
+import org.apache.wicket.Component;
import org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator;
import org.apache.wicket.extensions.markup.html.repeater.data.table.PropertyColumn;
import org.apache.wicket.markup.html.basic.Label;
@@ -35,8 +36,12 @@ public class KeyPropertyColumn<T> extends PropertyColumn<T, String> {
private static final long serialVersionUID = 3527840552172947705L;
- public KeyPropertyColumn(final IModel<String> displayModel, final String sortProperty,
- final String propertyExpression) {
+ public KeyPropertyColumn(final IModel<String> displayModel, final String propertyExpression) {
+ super(displayModel, propertyExpression);
+ }
+
+ public KeyPropertyColumn(
+ final IModel<String> displayModel, final String sortProperty, final String propertyExpression) {
super(displayModel, sortProperty, propertyExpression);
}
@@ -57,4 +62,9 @@ public class KeyPropertyColumn<T> extends PropertyColumn<T, String> {
return "keyColumn";
}
+ @Override
+ public Component getHeader(final String componentId) {
+ return super.getHeader(componentId).setEnabled(false).setVisible(false);
+ }
+
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/Action.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/Action.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/Action.java
new file mode 100644
index 0000000..ab12413
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/Action.java
@@ -0,0 +1,176 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.client.console.wicket.markup.html.form;
+
+import java.io.Serializable;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.wicket.model.Model;
+
+/**
+ * Action link basic details.
+ *
+ * @param <T> model object type.
+ */
+public final class Action<T extends Serializable> implements Serializable {
+
+ private static final long serialVersionUID = -7989237020377623993L;
+
+ private final ActionLink<T> link;
+
+ private final ActionLink.ActionType type;
+
+ private String entitlements;
+
+ private boolean onConfirm;
+
+ private boolean visibleLabel;
+
+ private Model<String> label;
+
+ private Model<String> title;
+
+ private Model<String> alt;
+
+ private Model<String> icon;
+
+ private boolean indicator;
+
+ public Action(final ActionLink<T> link, final ActionLink.ActionType type) {
+ this.link = link;
+ this.type = type;
+ this.entitlements = StringUtils.EMPTY;
+ this.onConfirm = false;
+ this.visibleLabel = true;
+ this.label = null;
+ this.title = null;
+ this.alt = null;
+ this.icon = null;
+ this.indicator = true;
+ }
+
+ public ActionLink<T> getLink() {
+ return link;
+ }
+
+ public ActionLink.ActionType getType() {
+ return type;
+ }
+
+ public String getEntitlements() {
+ return entitlements;
+ }
+
+ public boolean isOnConfirm() {
+ return onConfirm;
+ }
+
+ public Action<T> setEntitlements(final String entitlements) {
+ this.entitlements = entitlements;
+ return this;
+ }
+
+ public Action<T> setOnConfirm(final boolean onConfirm) {
+ this.onConfirm = onConfirm;
+ return this;
+ }
+
+ public Action<T> hideLabel() {
+ this.visibleLabel = false;
+ return this;
+ }
+
+ public boolean isVisibleLabel() {
+ return visibleLabel;
+ }
+
+ /**
+ * Override default action label.
+ *
+ * @param label new action label;
+ * @return updated action.
+ */
+ public Action<T> setLabel(final Model<String> label) {
+ this.label = label;
+ return this;
+ }
+
+ public Model<String> getLabel() {
+ return label;
+ }
+
+ /**
+ * Override default action title.
+ *
+ * @param title new action title;
+ * @return updated action.
+ */
+ public Action<T> setTitleI(final Model<String> title) {
+ this.title = title;
+ return this;
+ }
+
+ public Model<String> getTitle() {
+ return title;
+ }
+
+ /**
+ * Override default action icon text name.
+ *
+ * @param alt action icon text name;
+ * @return updated action.
+ */
+ public Action<T> setAlt(final Model<String> alt) {
+ this.alt = alt;
+ return this;
+ }
+
+ public Model<String> getAlt() {
+ return alt;
+ }
+
+ /**
+ * Override default action css class.
+ *
+ * @param icon new action class;
+ * @return updated action.
+ */
+ public Action<T> setIcon(final Model<String> icon) {
+ this.icon = icon;
+ return this;
+ }
+
+ public Model<String> getIcon() {
+ return icon;
+ }
+
+ /**
+ * Override disable AJAX indicator.
+ *
+ * @return updated action.
+ */
+ public Action<T> disableIndicator() {
+ this.indicator = false;
+ return this;
+ }
+
+ public boolean hasIndicator() {
+ return indicator;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/ActionLink.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/ActionLink.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/ActionLink.java
index c4c5bf7..c90ef37 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/ActionLink.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/ActionLink.java
@@ -58,7 +58,7 @@ public abstract class ActionLink<T extends Serializable> implements Serializable
LAYOUT_EDIT("read"),
RESET("update"),
ENABLE("update"),
- NOT_FOND("read"),
+ NOT_FOUND("read"),
VIEW("view"),
MEMBERS("members"),
SEARCH("search"),
[02/10] syncope git commit: [SYNCOPE-1047] Replaces ActionLinksPanel
with TogglePanel
Posted by fm...@apache.org.
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/fit/core-reference/src/test/java/org/apache/syncope/fit/console/GroupsITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/GroupsITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/GroupsITCase.java
index 1f95fcb..a07dc2f 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/GroupsITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/GroupsITCase.java
@@ -34,9 +34,9 @@ import org.junit.Before;
public class GroupsITCase extends AbstractConsoleITCase {
- private final String tabPanel = "body:content:body:container:content:tabbedPanel:panel:searchResult:";
+ private final static String TAB_PANEL = "body:content:body:container:content:tabbedPanel:panel:searchResult:";
- private final String searchResultContainer = tabPanel + "container:content:";
+ private final static String CONTAINER = TAB_PANEL + "container:content:";
@Before
public void login() {
@@ -48,27 +48,28 @@ public class GroupsITCase extends AbstractConsoleITCase {
TESTER.clickLink("body:realmsLI:realms");
TESTER.clickLink("body:content:body:container:content:tabbedPanel:tabs-container:tabs:2:link");
- Component component = findComponentByProp("name", searchResultContainer
+ Component component = findComponentByProp("name", CONTAINER
+ ":searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", "artDirector");
assertNotNull(component);
- TESTER.clickLink(component.getPageRelativePath() + ":cells:4:cell:panelMembers:membersLink");
+ TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
+ TESTER.clickLink(TAB_PANEL + "outerObjectsRepeater:1:outer:container:content:togglePanelContainer:container:"
+ + "actions:actions:actionRepeater:3:action:action");
- FormTester formTester = TESTER.newFormTester("body:content:body:container:content:tabbedPanel:panel:"
- + "searchResult:outerObjectsRepeater:6:outer:container:content:togglePanelContainer:membersForm");
+ FormTester formTester = TESTER.newFormTester(TAB_PANEL
+ + "outerObjectsRepeater:7:outer:container:content:togglePanelContainer:membersForm");
formTester.select("type:dropDownChoiceField", 0);
formTester.submit("changeit");
- TESTER.assertModelValue("body:content:body:container:content:tabbedPanel:panel:searchResult:"
- + "outerObjectsRepeater:5:outer:dialog:header:header-label", "USER members of artDirector");
-
- assertNotNull(findComponentByProp("username", "body:content:body:container:content:tabbedPanel:panel:"
- + "searchResult:outerObjectsRepeater:5:outer:form:content:searchResult:container:content:"
+ TESTER.assertModelValue(TAB_PANEL
+ + "outerObjectsRepeater:6:outer:dialog:header:header-label", "USER members of artDirector");
+ assertNotNull(findComponentByProp("username", TAB_PANEL
+ + "outerObjectsRepeater:6:outer:form:content:searchResult:container:content:"
+ "searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", "puccini"));
- TESTER.executeAjaxEvent("body:content:body:container:content:tabbedPanel:panel:searchResult:"
- + "outerObjectsRepeater:5:outer:dialog:footer:buttons:0:button", Constants.ON_CLICK);
+ TESTER.executeAjaxEvent(TAB_PANEL
+ + "outerObjectsRepeater:6:outer:dialog:footer:buttons:0:button", Constants.ON_CLICK);
}
@Test
@@ -91,16 +92,18 @@ public class GroupsITCase extends AbstractConsoleITCase {
TESTER.clickLink("body:realmsLI:realms");
TESTER.clickLink("body:content:body:container:content:tabbedPanel:tabs-container:tabs:2:link");
- Component component = findComponentByProp("name", searchResultContainer
+ Component component = findComponentByProp("name", CONTAINER
+ ":searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", group);
assertNotNull(component);
- TESTER.clickLink(component.getPageRelativePath() + ":cells:4:cell:panelClone:cloneLink");
+ TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
+ TESTER.clickLink(TAB_PANEL + "outerObjectsRepeater:1:outer:container:content:togglePanelContainer:container:"
+ + "actions:actions:actionRepeater:1:action:action");
- TESTER.assertComponent(tabPanel + "outerObjectsRepeater:0:outer:form:content:form:view:name:textField",
+ TESTER.assertComponent(TAB_PANEL + "outerObjectsRepeater:0:outer:form:content:form:view:name:textField",
TextField.class);
- FormTester formTester = TESTER.newFormTester(tabPanel + "outerObjectsRepeater:0:outer:form:content:form");
+ FormTester formTester = TESTER.newFormTester(TAB_PANEL + "outerObjectsRepeater:0:outer:form:content:form");
assertNotNull(formTester);
formTester.setValue("view:name:textField", group + "_clone");
formTester.submit("buttons:finish");
@@ -108,10 +111,9 @@ public class GroupsITCase extends AbstractConsoleITCase {
TESTER.assertInfoMessages("Operation executed successfully");
TESTER.cleanupFeedbackMessages();
- TESTER.clickLink("body:content:body:container:content:tabbedPanel:panel:searchResult:outerObjectsRepeater:0:"
- + "outer:form:content:action:panelClose:closeLink");
+ TESTER.clickLink(TAB_PANEL + "outerObjectsRepeater:0:outer:form:content:action:actionRepeater:0:action:action");
- component = findComponentByProp("name", searchResultContainer
+ component = findComponentByProp("name", CONTAINER
+ ":searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", group + "_clone");
assertNotNull(component);
}
@@ -120,15 +122,18 @@ public class GroupsITCase extends AbstractConsoleITCase {
public void clickToCloneGroup() {
cloneGroup("director");
- Component component = findComponentByProp("name", searchResultContainer
+ Component component = findComponentByProp("name", CONTAINER
+ ":searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", "director_clone");
assertNotNull(component);
+
+ TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
TESTER.getRequest().addParameter("confirm", "true");
- TESTER.clickLink(TESTER.getComponentFromLastRenderedPage(
- component.getPageRelativePath() + ":cells:4:cell:panelDelete:deleteLink"));
+ TESTER.clickLink(TAB_PANEL + "outerObjectsRepeater:1:outer:container:content:togglePanelContainer:container:"
+ + "actions:actions:actionRepeater:9:action:action");
- TESTER.executeAjaxEvent(TESTER.getComponentFromLastRenderedPage(
- component.getPageRelativePath() + ":cells:4:cell:panelDelete:deleteLink"), Constants.ON_CLICK);
+ TESTER.executeAjaxEvent(TESTER.getComponentFromLastRenderedPage(TAB_PANEL
+ + "outerObjectsRepeater:1:outer:container:content:togglePanelContainer:container:"
+ + "actions:actions:actionRepeater:9:action:action"), Constants.ON_CLICK);
TESTER.assertInfoMessages("Operation executed successfully");
TESTER.cleanupFeedbackMessages();
@@ -138,16 +143,18 @@ public class GroupsITCase extends AbstractConsoleITCase {
public void editGroup() {
cloneGroup("director");
- Component component = findComponentByProp("name", searchResultContainer
+ Component component = findComponentByProp("name", CONTAINER
+ ":searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", "director_clone");
assertNotNull(component);
- TESTER.clickLink(component.getPageRelativePath() + ":cells:4:cell:panelEdit:editLink");
+ TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
+ TESTER.clickLink(TAB_PANEL + "outerObjectsRepeater:1:outer:container:content:togglePanelContainer:container:"
+ + "actions:actions:actionRepeater:0:action:action");
- TESTER.assertComponent(tabPanel + "outerObjectsRepeater:0:outer:form:content:form:view:name:textField",
+ TESTER.assertComponent(TAB_PANEL + "outerObjectsRepeater:0:outer:form:content:form:view:name:textField",
TextField.class);
- FormTester formTester = TESTER.newFormTester(tabPanel + "outerObjectsRepeater:0:outer:form:content:form");
+ FormTester formTester = TESTER.newFormTester(TAB_PANEL + "outerObjectsRepeater:0:outer:form:content:form");
assertNotNull(formTester);
formTester.submit("buttons:next");
@@ -166,53 +173,56 @@ public class GroupsITCase extends AbstractConsoleITCase {
+ "textField").getDefaultModelObjectAsString(), StringUtils.EMPTY);
// -------------------------
- formTester = TESTER.newFormTester(tabPanel + "outerObjectsRepeater:0:outer:form:content:form");
+ formTester = TESTER.newFormTester(TAB_PANEL + "outerObjectsRepeater:0:outer:form:content:form");
assertNotNull(formTester);
formTester.submit("buttons:next");
- formTester = TESTER.newFormTester(tabPanel + "outerObjectsRepeater:0:outer:form:content:form");
+ formTester = TESTER.newFormTester(TAB_PANEL + "outerObjectsRepeater:0:outer:form:content:form");
assertNotNull(formTester);
formTester.submit("buttons:next");
- formTester = TESTER.newFormTester(tabPanel + "outerObjectsRepeater:0:outer:form:content:form");
+ formTester = TESTER.newFormTester(TAB_PANEL + "outerObjectsRepeater:0:outer:form:content:form");
assertNotNull(formTester);
formTester.submit("buttons:next");
- formTester = TESTER.newFormTester(tabPanel + "outerObjectsRepeater:0:outer:form:content:form");
+ formTester = TESTER.newFormTester(TAB_PANEL + "outerObjectsRepeater:0:outer:form:content:form");
assertNotNull(formTester);
formTester.submit("buttons:next");
- formTester = TESTER.newFormTester(tabPanel + "outerObjectsRepeater:0:outer:form:content:form");
+ formTester = TESTER.newFormTester(TAB_PANEL + "outerObjectsRepeater:0:outer:form:content:form");
assertNotNull(formTester);
formTester.submit("buttons:next");
- formTester = TESTER.newFormTester(tabPanel + "outerObjectsRepeater:0:outer:form:content:form");
+ formTester = TESTER.newFormTester(TAB_PANEL + "outerObjectsRepeater:0:outer:form:content:form");
assertNotNull(formTester);
formTester.submit("buttons:next");
- formTester = TESTER.newFormTester(tabPanel + "outerObjectsRepeater:0:outer:form:content:form");
+ formTester = TESTER.newFormTester(TAB_PANEL + "outerObjectsRepeater:0:outer:form:content:form");
assertNotNull(formTester);
formTester.submit("buttons:finish");
TESTER.assertInfoMessages("Operation executed successfully");
TESTER.cleanupFeedbackMessages();
- TESTER.assertComponent(tabPanel
+ TESTER.assertComponent(TAB_PANEL
+ "outerObjectsRepeater:0:outer:form:content:customResultBody:resources:firstLevelContainer:first:"
+ "container:content:group:beans:0:fields:0:field", Label.class);
- TESTER.clickLink(tabPanel + "outerObjectsRepeater:0:outer:form:content:action:panelClose:closeLink");
+ TESTER.clickLink(TAB_PANEL + "outerObjectsRepeater:0:outer:form:content:action:actionRepeater:0:action:action");
- component = findComponentByProp("name", searchResultContainer
+ component = findComponentByProp("name", CONTAINER
+ ":searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", "director_clone");
assertNotNull(component);
+ TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
TESTER.getRequest().addParameter("confirm", "true");
- TESTER.clickLink(TESTER.getComponentFromLastRenderedPage(
- component.getPageRelativePath() + ":cells:4:cell:panelDelete:deleteLink"));
+ TESTER.clickLink(TESTER.getComponentFromLastRenderedPage(TAB_PANEL
+ + "outerObjectsRepeater:1:outer:container:content:togglePanelContainer:container:"
+ + "actions:actions:actionRepeater:9:action:action"));
- TESTER.executeAjaxEvent(TESTER.getComponentFromLastRenderedPage(
- component.getPageRelativePath() + ":cells:4:cell:panelDelete:deleteLink"), Constants.ON_CLICK);
+ TESTER.executeAjaxEvent(TESTER.getComponentFromLastRenderedPage(TAB_PANEL
+ + "outerObjectsRepeater:1:outer:container:content:togglePanelContainer:container:"
+ + "actions:actions:actionRepeater:9:action:action"), Constants.ON_CLICK);
TESTER.assertInfoMessages("Operation executed successfully");
TESTER.cleanupFeedbackMessages();
@@ -223,11 +233,13 @@ public class GroupsITCase extends AbstractConsoleITCase {
TESTER.clickLink("body:realmsLI:realms");
TESTER.clickLink("body:content:body:container:content:tabbedPanel:tabs-container:tabs:2:link");
- Component component = findComponentByProp("name", searchResultContainer
+ Component component = findComponentByProp("name", CONTAINER
+ ":searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", "director");
assertNotNull(component);
- TESTER.assertComponent(component.getPageRelativePath() + ":cells:4:cell:panelDelete:deleteLink",
- IndicatingOnConfirmAjaxLink.class);
+ TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
+ TESTER.assertComponent(TAB_PANEL
+ + "outerObjectsRepeater:1:outer:container:content:togglePanelContainer:container:"
+ + "actions:actions:actionRepeater:9:action:action", IndicatingOnConfirmAjaxLink.class);
}
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/fit/core-reference/src/test/java/org/apache/syncope/fit/console/NotificationsITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/NotificationsITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/NotificationsITCase.java
index 9e8a931..4e5ff94 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/NotificationsITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/NotificationsITCase.java
@@ -125,7 +125,10 @@ public class NotificationsITCase extends AbstractConsoleITCase {
Component result = findComponentByProp("Subject", "body:content:tabbedPanel:panel:container:content:"
+ "searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", "createToUpdate");
- TESTER.clickLink(result.getPageRelativePath() + ":cells:7:cell:panelEdit:editLink");
+ // edit notification
+ TESTER.executeAjaxEvent(result.getPageRelativePath(), Constants.ON_CLICK);
+ TESTER.clickLink("body:content:tabbedPanel:panel:outerObjectsRepeater:1:outer:container:content:"
+ + "togglePanelContainer:container:actions:actions:actionRepeater:0:action:action");
FormTester formTester = TESTER.newFormTester(
"body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer:form");
@@ -143,18 +146,24 @@ public class NotificationsITCase extends AbstractConsoleITCase {
"body:content:tabbedPanel:panel:container:content:searchContainer:resultTable:tablePanel:groupForm:"
+ "checkgroup:dataTable", "Password Reset request");
- TESTER.clickLink(
- result.getPageRelativePath() + ":cells:7:cell:panelNotificationTasks:notificationTasksLink");
+ // notification tasks link
+ TESTER.executeAjaxEvent(result.getPageRelativePath(), Constants.ON_CLICK);
+ TESTER.clickLink("body:content:tabbedPanel:panel:outerObjectsRepeater:1:outer:container:content:"
+ + "togglePanelContainer:container:actions:actions:actionRepeater:1:action:action");
- TESTER.assertComponent("body:content:tabbedPanel:panel:outerObjectsRepeater:3:outer:form:"
+ TESTER.assertComponent("body:content:tabbedPanel:panel:outerObjectsRepeater:4:outer:form:"
+ "content:tasks:firstLevelContainer:first:container:content:searchContainer:resultTable:tablePanel:"
+ "groupForm:checkgroup:dataTable", WebMarkupContainer.class);
- result = findComponentByProp("subject", "body:content:tabbedPanel:panel:outerObjectsRepeater:3:outer:form:"
+ result = findComponentByProp("subject", "body:content:tabbedPanel:panel:outerObjectsRepeater:4:outer:form:"
+ "content:tasks:firstLevelContainer:first:container:content:searchContainer:resultTable:tablePanel:"
+ "groupForm:checkgroup:dataTable", "Notification for SYNCOPE-81");
- TESTER.clickLink(result.getPageRelativePath() + ":cells:9:cell:panelExecute:executeLink");
+ // execute task
+ TESTER.executeAjaxEvent(result.getPageRelativePath(), Constants.ON_CLICK);
+ TESTER.clickLink("body:content:tabbedPanel:panel:outerObjectsRepeater:4:outer:form:content:tasks:"
+ + "firstLevelContainer:first:outerObjectsRepeater:1:outer:container:content:togglePanelContainer:"
+ + "container:actions:actions:actionRepeater:3:action:action");
TESTER.assertInfoMessages("Operation executed successfully");
TESTER.cleanupFeedbackMessages();
@@ -164,22 +173,28 @@ public class NotificationsITCase extends AbstractConsoleITCase {
result = findComponentByProp("subject", "body:content:tabbedPanel:panel:container:content:"
+ "searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", "Password Reset request");
- TESTER.clickLink(
- result.getPageRelativePath() + ":cells:7:cell:panelNotificationTasks:notificationTasksLink");
+ // notification tasks link
+ TESTER.executeAjaxEvent(result.getPageRelativePath(), Constants.ON_CLICK);
+ TESTER.clickLink("body:content:tabbedPanel:panel:outerObjectsRepeater:1:outer:container:content:"
+ + "togglePanelContainer:container:actions:actions:actionRepeater:1:action:action");
- result = findComponentByProp("subject", "body:content:tabbedPanel:panel:outerObjectsRepeater:3:outer:form:"
+ result = findComponentByProp("subject", "body:content:tabbedPanel:panel:outerObjectsRepeater:4:outer:form:"
+ "content:tasks:firstLevelContainer:first:container:content:searchContainer:resultTable:tablePanel:"
+ "groupForm:checkgroup:dataTable", "Notification for SYNCOPE-81");
- TESTER.clickLink(result.getPageRelativePath() + ":cells:9:cell:panelView:viewLink");
+ // view task
+ TESTER.executeAjaxEvent(result.getPageRelativePath(), Constants.ON_CLICK);
+ TESTER.clickLink("body:content:tabbedPanel:panel:outerObjectsRepeater:4:outer:form:content:tasks:"
+ + "firstLevelContainer:first:outerObjectsRepeater:1:outer:container:content:togglePanelContainer:"
+ + "container:actions:actions:actionRepeater:0:action:action");
- TESTER.assertLabel("body:content:tabbedPanel:panel:outerObjectsRepeater:3:outer:form:content:tasks:"
+ TESTER.assertLabel("body:content:tabbedPanel:panel:outerObjectsRepeater:4:outer:form:content:tasks:"
+ "secondLevelContainer:title", "Executions");
- TESTER.clickLink("body:content:tabbedPanel:panel:outerObjectsRepeater:3:outer:form:content:tasks:"
+ TESTER.clickLink("body:content:tabbedPanel:panel:outerObjectsRepeater:4:outer:form:content:tasks:"
+ "secondLevelContainer:back");
- assertNotNull(findComponentByProp("subject", "body:content:tabbedPanel:panel:outerObjectsRepeater:3:outer:form:"
+ assertNotNull(findComponentByProp("subject", "body:content:tabbedPanel:panel:outerObjectsRepeater:4:outer:form:"
+ "content:tasks:firstLevelContainer:first:container:content:searchContainer:resultTable:tablePanel:"
+ "groupForm:checkgroup:dataTable", "Notification for SYNCOPE-81"));
}
@@ -190,12 +205,18 @@ public class NotificationsITCase extends AbstractConsoleITCase {
Component result = findComponentByProp("Subject", "body:content:tabbedPanel:panel:container:content:"
+ "searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", "createToDelete");
+ TESTER.executeAjaxEvent(result.getPageRelativePath(), Constants.ON_CLICK);
TESTER.getRequest().addParameter("confirm", "true");
+
+ // delete task
TESTER.clickLink(TESTER.getComponentFromLastRenderedPage(
- result.getPageRelativePath() + ":cells:7:cell:panelDelete:deleteLink"));
+ "body:content:tabbedPanel:panel:outerObjectsRepeater:1:outer:container:content:"
+ + "togglePanelContainer:container:actions:actions:actionRepeater:2:action:action"));
TESTER.executeAjaxEvent(TESTER.getComponentFromLastRenderedPage(
- result.getPageRelativePath() + ":cells:7:cell:panelDelete:deleteLink"), Constants.ON_CLICK);
+ "body:content:tabbedPanel:panel:outerObjectsRepeater:1:outer:container:content:"
+ + "togglePanelContainer:container:actions:actions:actionRepeater:2:action:action"),
+ Constants.ON_CLICK);
TESTER.assertInfoMessages("Operation executed successfully");
TESTER.cleanupFeedbackMessages();
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/fit/core-reference/src/test/java/org/apache/syncope/fit/console/ParametersITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/ParametersITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/ParametersITCase.java
index 12e8f7e..cd2bb43 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/ParametersITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/ParametersITCase.java
@@ -21,6 +21,7 @@ package org.apache.syncope.fit.console;
import static org.junit.Assert.assertNotNull;
import de.agilecoders.wicket.core.markup.html.bootstrap.dialog.Modal;
+import org.apache.syncope.client.console.commons.Constants;
import org.apache.syncope.client.console.pages.Parameters;
import org.apache.wicket.Component;
import org.apache.wicket.markup.html.WebMarkupContainer;
@@ -72,7 +73,10 @@ public class ParametersITCase extends AbstractConsoleITCase {
Component result = findComponentByProp(SCHEMA, "body:content:parametersPanel", "notification.maxRetries");
assertNotNull(result);
- TESTER.clickLink(result.getPageRelativePath() + ":cells:4:cell:panelEdit:editLink");
+
+ TESTER.executeAjaxEvent(result.getPageRelativePath(), Constants.ON_CLICK);
+ TESTER.clickLink("body:content:parametersPanel:outerObjectsRepeater:1:outer:container:content:"
+ + "togglePanelContainer:container:actions:actions:actionRepeater:0:action:action");
FormTester formTester = TESTER.newFormTester(
"body:content:parametersPanel:container:content:modalDetails:form");
@@ -108,7 +112,10 @@ public class ParametersITCase extends AbstractConsoleITCase {
Component result = findComponentByProp(SCHEMA, "body:content:parametersPanel", "deleteParam");
assertNotNull(result);
- TESTER.clickLink(result.getPageRelativePath() + ":cells:4:cell:panelDelete:deleteLink");
+
+ TESTER.executeAjaxEvent(result.getPageRelativePath(), Constants.ON_CLICK);
+ TESTER.clickLink("body:content:parametersPanel:outerObjectsRepeater:1:outer:container:content:"
+ + "togglePanelContainer:container:actions:actions:actionRepeater:1:action:action");
TESTER.assertInfoMessages("Operation executed successfully");
TESTER.cleanupFeedbackMessages();
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/fit/core-reference/src/test/java/org/apache/syncope/fit/console/PoliciesITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/PoliciesITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/PoliciesITCase.java
index 67ed20b..bdfd776 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/PoliciesITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/PoliciesITCase.java
@@ -74,7 +74,10 @@ public class PoliciesITCase extends AbstractConsoleITCase {
+ "searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", description);
Assert.assertNotNull(component);
- TESTER.clickLink(component.getPageRelativePath() + ":cells:9:cell:panelEdit:editLink");
+ TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
+ TESTER.clickLink("body:content:tabbedPanel:panel:outerObjectsRepeater:1:outer:container:content:"
+ + "togglePanelContainer:container:actions:actions:actionRepeater:0:action:action");
+
TESTER.assertComponent("body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer", Modal.class);
TESTER.assertModelValue("body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer:form"
@@ -121,7 +124,10 @@ public class PoliciesITCase extends AbstractConsoleITCase {
+ "searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", description);
Assert.assertNotNull(component);
- TESTER.clickLink(component.getPageRelativePath() + ":cells:8:cell:panelEdit:editLink");
+ TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
+ TESTER.clickLink("body:content:tabbedPanel:panel:outerObjectsRepeater:1:outer:container:content:"
+ + "togglePanelContainer:container:actions:actions:actionRepeater:0:action:action");
+
TESTER.assertComponent("body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer", Modal.class);
TESTER.assertModelValue("body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer:form"
@@ -164,7 +170,10 @@ public class PoliciesITCase extends AbstractConsoleITCase {
+ "searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", description);
Assert.assertNotNull(component);
- TESTER.clickLink(component.getPageRelativePath() + ":cells:6:cell:panelEdit:editLink");
+ TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
+ TESTER.clickLink("body:content:tabbedPanel:panel:outerObjectsRepeater:1:outer:container:content:"
+ + "togglePanelContainer:container:actions:actions:actionRepeater:0:action:action");
+
TESTER.assertComponent("body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer", Modal.class);
TESTER.assertModelValue("body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer:form"
@@ -184,13 +193,16 @@ public class PoliciesITCase extends AbstractConsoleITCase {
+ "searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", description);
Assert.assertNotNull(component);
-
+ TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
TESTER.getRequest().addParameter("confirm", "true");
TESTER.clickLink(TESTER.getComponentFromLastRenderedPage(
- component.getPageRelativePath() + ":cells:9:cell:panelDelete:deleteLink"));
+ "body:content:tabbedPanel:panel:outerObjectsRepeater:1:outer:container:content:"
+ + "togglePanelContainer:container:actions:actions:actionRepeater:3:action:action"));
TESTER.executeAjaxEvent(TESTER.getComponentFromLastRenderedPage(
- component.getPageRelativePath() + ":cells:9:cell:panelDelete:deleteLink"), Constants.ON_CLICK);
+ "body:content:tabbedPanel:panel:outerObjectsRepeater:1:outer:container:content:"
+ + "togglePanelContainer:container:actions:actions:actionRepeater:3:action:action"),
+ Constants.ON_CLICK);
TESTER.assertInfoMessages("Operation executed successfully");
TESTER.cleanupFeedbackMessages();
@@ -205,14 +217,16 @@ public class PoliciesITCase extends AbstractConsoleITCase {
+ "searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", description);
Assert.assertNotNull(component);
-
+ TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
TESTER.getRequest().addParameter("confirm", "true");
- TESTER.clickLink(
- TESTER.getComponentFromLastRenderedPage(
- component.getPageRelativePath() + ":cells:8:cell:panelDelete:deleteLink"));
+ TESTER.clickLink(TESTER.getComponentFromLastRenderedPage(
+ "body:content:tabbedPanel:panel:outerObjectsRepeater:1:outer:container:content:"
+ + "togglePanelContainer:container:actions:actions:actionRepeater:3:action:action"));
TESTER.executeAjaxEvent(TESTER.getComponentFromLastRenderedPage(
- component.getPageRelativePath() + ":cells:8:cell:panelDelete:deleteLink"), Constants.ON_CLICK);
+ "body:content:tabbedPanel:panel:outerObjectsRepeater:1:outer:container:content:"
+ + "togglePanelContainer:container:actions:actions:actionRepeater:3:action:action"),
+ Constants.ON_CLICK);
TESTER.assertInfoMessages("Operation executed successfully");
TESTER.cleanupFeedbackMessages();
@@ -227,14 +241,16 @@ public class PoliciesITCase extends AbstractConsoleITCase {
+ "searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", description);
Assert.assertNotNull(component);
-
+ TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
TESTER.getRequest().addParameter("confirm", "true");
- TESTER.clickLink(
- TESTER.getComponentFromLastRenderedPage(
- component.getPageRelativePath() + ":cells:6:cell:panelDelete:deleteLink"));
+ TESTER.clickLink(TESTER.getComponentFromLastRenderedPage(
+ "body:content:tabbedPanel:panel:outerObjectsRepeater:1:outer:container:content:"
+ + "togglePanelContainer:container:actions:actions:actionRepeater:3:action:action"));
TESTER.executeAjaxEvent(TESTER.getComponentFromLastRenderedPage(
- component.getPageRelativePath() + ":cells:6:cell:panelDelete:deleteLink"), Constants.ON_CLICK);
+ "body:content:tabbedPanel:panel:outerObjectsRepeater:1:outer:container:content:"
+ + "togglePanelContainer:container:actions:actions:actionRepeater:3:action:action"),
+ Constants.ON_CLICK);
TESTER.assertInfoMessages("Operation executed successfully");
TESTER.cleanupFeedbackMessages();
@@ -265,7 +281,10 @@ public class PoliciesITCase extends AbstractConsoleITCase {
+ "searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", description);
Assert.assertNotNull(component);
- TESTER.clickLink(component.getPageRelativePath() + ":cells:9:cell:panelClone:cloneLink");
+ TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
+ TESTER.clickLink("body:content:tabbedPanel:panel:outerObjectsRepeater:1:outer:container:content:"
+ + "togglePanelContainer:container:actions:actions:actionRepeater:1:action:action");
+
TESTER.assertComponent("body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer", Modal.class);
Component modal = TESTER.getComponentFromLastRenderedPage(
@@ -310,7 +329,10 @@ public class PoliciesITCase extends AbstractConsoleITCase {
+ "searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", description);
Assert.assertNotNull(component);
- TESTER.clickLink(component.getPageRelativePath() + ":cells:8:cell:panelClone:cloneLink");
+ TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
+ TESTER.clickLink("body:content:tabbedPanel:panel:outerObjectsRepeater:1:outer:container:content:"
+ + "togglePanelContainer:container:actions:actions:actionRepeater:1:action:action");
+
TESTER.assertComponent("body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer", Modal.class);
Component modal = TESTER.getComponentFromLastRenderedPage(
@@ -355,7 +377,10 @@ public class PoliciesITCase extends AbstractConsoleITCase {
+ "searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", description);
Assert.assertNotNull(component);
- TESTER.clickLink(component.getPageRelativePath() + ":cells:6:cell:panelClone:cloneLink");
+ TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
+ TESTER.clickLink("body:content:tabbedPanel:panel:outerObjectsRepeater:1:outer:container:content:"
+ + "togglePanelContainer:container:actions:actions:actionRepeater:1:action:action");
+
TESTER.assertComponent("body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer", Modal.class);
Component modal = TESTER.getComponentFromLastRenderedPage(
@@ -393,7 +418,10 @@ public class PoliciesITCase extends AbstractConsoleITCase {
+ "searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", description);
Assert.assertNotNull(component);
- TESTER.clickLink(component.getPageRelativePath() + ":cells:9:cell:panelEdit:editLink");
+ TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
+ TESTER.clickLink("body:content:tabbedPanel:panel:outerObjectsRepeater:1:outer:container:content:"
+ + "togglePanelContainer:container:actions:actions:actionRepeater:0:action:action");
+
TESTER.assertComponent("body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer", Modal.class);
Component modal = TESTER.getComponentFromLastRenderedPage(
@@ -415,9 +443,10 @@ public class PoliciesITCase extends AbstractConsoleITCase {
+ "searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", description);
Assert.assertNotNull(component);
- TESTER.assertLabel(component.getPageRelativePath() + ":cells:7:cell", "2");
+ TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
+ TESTER.clickLink("body:content:tabbedPanel:panel:outerObjectsRepeater:1:outer:container:content:"
+ + "togglePanelContainer:container:actions:actions:actionRepeater:0:action:action");
- TESTER.clickLink(component.getPageRelativePath() + ":cells:9:cell:panelEdit:editLink");
TESTER.assertComponent("body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer", Modal.class);
TESTER.assertModelValue("body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer:form"
@@ -436,25 +465,28 @@ public class PoliciesITCase extends AbstractConsoleITCase {
+ "searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", policyDescription);
Assert.assertNotNull(component);
- TESTER.clickLink(component.getPageRelativePath() + ":cells:9:cell:panelCompose:composeLink");
+ TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
+ TESTER.clickLink("body:content:tabbedPanel:panel:outerObjectsRepeater:1:outer:container:content:"
+ + "togglePanelContainer:container:actions:actions:actionRepeater:2:action:action");
+
TESTER.assertComponent("body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer", Modal.class);
Component modal = TESTER.getComponentFromLastRenderedPage(
- "body:content:tabbedPanel:panel:outerObjectsRepeater:3:outer");
+ "body:content:tabbedPanel:panel:outerObjectsRepeater:4:outer");
TESTER.clickLink(
- "body:content:tabbedPanel:panel:outerObjectsRepeater:3:outer:form:content:container:content:add");
+ "body:content:tabbedPanel:panel:outerObjectsRepeater:4:outer:form:content:container:content:add");
- FormTester formTester = TESTER.newFormTester("body:content:tabbedPanel:panel:outerObjectsRepeater:3:"
+ FormTester formTester = TESTER.newFormTester("body:content:tabbedPanel:panel:outerObjectsRepeater:4:"
+ "outer:form:content:container:content:wizard:form");
formTester.setValue("view:name:textField", ruleName);
formTester.setValue("view:configuration:dropDownChoiceField", "0");
formTester.submit("buttons:next");
- TESTER.assertModelValue("body:content:tabbedPanel:panel:outerObjectsRepeater:3:outer:form:content:"
+ TESTER.assertModelValue("body:content:tabbedPanel:panel:outerObjectsRepeater:4:outer:form:content:"
+ "container:content:wizard:form:view:bean:propView:1:value:spinner", 0);
- formTester = TESTER.newFormTester("body:content:tabbedPanel:panel:outerObjectsRepeater:3:"
+ formTester = TESTER.newFormTester("body:content:tabbedPanel:panel:outerObjectsRepeater:4:"
+ "outer:form:content:container:content:wizard:form");
formTester.setValue("view:bean:propView:1:value:spinner", "6");
formTester.submit("buttons:finish");
@@ -462,14 +494,14 @@ public class PoliciesITCase extends AbstractConsoleITCase {
TESTER.assertInfoMessages("Operation executed successfully");
TESTER.cleanupFeedbackMessages();
- component = findComponentByProp("name", "body:content:tabbedPanel:panel:outerObjectsRepeater:3:outer:form:"
+ component = findComponentByProp("name", "body:content:tabbedPanel:panel:outerObjectsRepeater:4:outer:form:"
+ "content:container:content:searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable",
ruleName);
Assert.assertNotNull(component);
TESTER.clickLink(
- "body:content:tabbedPanel:panel:outerObjectsRepeater:3:outer:form:content:container:content:exit");
+ "body:content:tabbedPanel:panel:outerObjectsRepeater:4:outer:form:content:container:content:exit");
closeCallBack(modal);
}
@@ -491,7 +523,10 @@ public class PoliciesITCase extends AbstractConsoleITCase {
+ "searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", description);
Assert.assertNotNull(component);
- TESTER.clickLink(component.getPageRelativePath() + ":cells:8:cell:panelEdit:editLink");
+ TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
+ TESTER.clickLink("body:content:tabbedPanel:panel:outerObjectsRepeater:1:outer:container:content:"
+ + "togglePanelContainer:container:actions:actions:actionRepeater:0:action:action");
+
TESTER.assertComponent("body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer", Modal.class);
Component modal = TESTER.getComponentFromLastRenderedPage(
@@ -513,9 +548,10 @@ public class PoliciesITCase extends AbstractConsoleITCase {
+ "searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", description);
Assert.assertNotNull(component);
- TESTER.assertLabel(component.getPageRelativePath() + ":cells:6:cell", "2");
+ TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
+ TESTER.clickLink("body:content:tabbedPanel:panel:outerObjectsRepeater:1:outer:container:content:"
+ + "togglePanelContainer:container:actions:actions:actionRepeater:0:action:action");
- TESTER.clickLink(component.getPageRelativePath() + ":cells:8:cell:panelEdit:editLink");
TESTER.assertComponent("body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer", Modal.class);
TESTER.assertModelValue("body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer:form"
@@ -537,39 +573,42 @@ public class PoliciesITCase extends AbstractConsoleITCase {
+ "searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", description);
Assert.assertNotNull(component);
- TESTER.clickLink(component.getPageRelativePath() + ":cells:8:cell:panelCompose:composeLink");
- TESTER.assertComponent("body:content:tabbedPanel:panel:outerObjectsRepeater:3:outer", Modal.class);
+ TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
+ TESTER.clickLink("body:content:tabbedPanel:panel:outerObjectsRepeater:1:outer:container:content:"
+ + "togglePanelContainer:container:actions:actions:actionRepeater:2:action:action");
+
+ TESTER.assertComponent("body:content:tabbedPanel:panel:outerObjectsRepeater:4:outer", Modal.class);
Component modal = TESTER.getComponentFromLastRenderedPage(
- "body:content:tabbedPanel:panel:outerObjectsRepeater:3:outer");
+ "body:content:tabbedPanel:panel:outerObjectsRepeater:4:outer");
TESTER.clickLink(
- "body:content:tabbedPanel:panel:outerObjectsRepeater:3:outer:form:content:container:content:add");
+ "body:content:tabbedPanel:panel:outerObjectsRepeater:4:outer:form:content:container:content:add");
- FormTester formTester = TESTER.newFormTester("body:content:tabbedPanel:panel:outerObjectsRepeater:3:"
+ FormTester formTester = TESTER.newFormTester("body:content:tabbedPanel:panel:outerObjectsRepeater:4:"
+ "outer:form:content:container:content:wizard:form");
formTester.setValue("view:name:textField", "myrule");
formTester.setValue("view:configuration:dropDownChoiceField", "0");
formTester.submit("buttons:next");
- TESTER.assertModelValue("body:content:tabbedPanel:panel:outerObjectsRepeater:3:outer:form:content:"
+ TESTER.assertModelValue("body:content:tabbedPanel:panel:outerObjectsRepeater:4:outer:form:content:"
+ "container:content:wizard:form:view:bean:propView:0:value:spinner", 0);
- formTester = TESTER.newFormTester("body:content:tabbedPanel:panel:outerObjectsRepeater:3:"
+ formTester = TESTER.newFormTester("body:content:tabbedPanel:panel:outerObjectsRepeater:4:"
+ "outer:form:content:container:content:wizard:form");
formTester.submit("buttons:finish");
TESTER.assertInfoMessages("Operation executed successfully");
TESTER.cleanupFeedbackMessages();
- component = findComponentByProp("name", "body:content:tabbedPanel:panel:outerObjectsRepeater:3:outer:form:"
+ component = findComponentByProp("name", "body:content:tabbedPanel:panel:outerObjectsRepeater:4:outer:form:"
+ "content:container:content:searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable",
"myrule");
Assert.assertNotNull(component);
TESTER.clickLink(
- "body:content:tabbedPanel:panel:outerObjectsRepeater:3:outer:form:content:container:content:exit");
+ "body:content:tabbedPanel:panel:outerObjectsRepeater:4:outer:form:content:container:content:exit");
closeCallBack(modal);
@@ -588,7 +627,10 @@ public class PoliciesITCase extends AbstractConsoleITCase {
"body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer");
Assert.assertNotNull(component);
- TESTER.clickLink(component.getPageRelativePath() + ":cells:6:cell:panelEdit:editLink");
+ TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
+ TESTER.clickLink("body:content:tabbedPanel:panel:outerObjectsRepeater:1:outer:container:content:"
+ + "togglePanelContainer:container:actions:actions:actionRepeater:0:action:action");
+
TESTER.assertComponent("body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer", Modal.class);
FormTester formTester = TESTER.newFormTester(
@@ -607,7 +649,10 @@ public class PoliciesITCase extends AbstractConsoleITCase {
+ "searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", description + "2");
Assert.assertNotNull(component);
- TESTER.clickLink(component.getPageRelativePath() + ":cells:6:cell:panelEdit:editLink");
+ TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
+ TESTER.clickLink("body:content:tabbedPanel:panel:outerObjectsRepeater:1:outer:container:content:"
+ + "togglePanelContainer:container:actions:actions:actionRepeater:0:action:action");
+
TESTER.assertComponent("body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer", Modal.class);
TESTER.assertModelValue("body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer:form"
@@ -629,16 +674,19 @@ public class PoliciesITCase extends AbstractConsoleITCase {
+ "searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", description);
Assert.assertNotNull(component);
- TESTER.clickLink(component.getPageRelativePath() + ":cells:6:cell:panelCompose:composeLink");
- TESTER.assertComponent("body:content:tabbedPanel:panel:outerObjectsRepeater:4:outer", Modal.class);
+ TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
+ TESTER.clickLink("body:content:tabbedPanel:panel:outerObjectsRepeater:1:outer:container:content:"
+ + "togglePanelContainer:container:actions:actions:actionRepeater:2:action:action");
+
+ TESTER.assertComponent("body:content:tabbedPanel:panel:outerObjectsRepeater:5:outer", Modal.class);
Component modal = TESTER.getComponentFromLastRenderedPage(
- "body:content:tabbedPanel:panel:outerObjectsRepeater:4:outer");
+ "body:content:tabbedPanel:panel:outerObjectsRepeater:5:outer");
FormTester formTester = TESTER.newFormTester(
- "body:content:tabbedPanel:panel:outerObjectsRepeater:4:outer:form");
+ "body:content:tabbedPanel:panel:outerObjectsRepeater:5:outer:form");
- TESTER.executeAjaxEvent("body:content:tabbedPanel:panel:outerObjectsRepeater:4:outer:form:content:"
+ TESTER.executeAjaxEvent("body:content:tabbedPanel:panel:outerObjectsRepeater:5:outer:form:content:"
+ "correlationRules:multiValueContainer:innerForm:content:panelPlus:add", Constants.ON_CLICK);
formTester.setValue("content:conflictResolutionAction:dropDownChoiceField", "1");
@@ -646,7 +694,7 @@ public class PoliciesITCase extends AbstractConsoleITCase {
+ "jsonRule:paletteField:recorder", "fullname");
TESTER.clickLink(
- "body:content:tabbedPanel:panel:outerObjectsRepeater:4:outer:dialog:footer:inputs:0:submit");
+ "body:content:tabbedPanel:panel:outerObjectsRepeater:5:outer:dialog:footer:inputs:0:submit");
TESTER.assertInfoMessages("Operation executed successfully");
TESTER.cleanupFeedbackMessages();
@@ -657,18 +705,21 @@ public class PoliciesITCase extends AbstractConsoleITCase {
+ "searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", description);
Assert.assertNotNull(component);
- TESTER.clickLink(component.getPageRelativePath() + ":cells:6:cell:panelCompose:composeLink");
- TESTER.assertComponent("body:content:tabbedPanel:panel:outerObjectsRepeater:4:outer", Modal.class);
+ TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
+ TESTER.clickLink("body:content:tabbedPanel:panel:outerObjectsRepeater:1:outer:container:content:"
+ + "togglePanelContainer:container:actions:actions:actionRepeater:2:action:action");
+
+ TESTER.assertComponent("body:content:tabbedPanel:panel:outerObjectsRepeater:5:outer", Modal.class);
- TESTER.assertModelValue("body:content:tabbedPanel:panel:outerObjectsRepeater:4:outer:form:"
+ TESTER.assertModelValue("body:content:tabbedPanel:panel:outerObjectsRepeater:5:outer:form:"
+ "content:conflictResolutionAction:dropDownChoiceField", ConflictResolutionAction.FIRSTMATCH);
- TESTER.assertModelValue("body:content:tabbedPanel:panel:outerObjectsRepeater:4:outer:form:"
+ TESTER.assertModelValue("body:content:tabbedPanel:panel:outerObjectsRepeater:5:outer:form:"
+ "content:correlationRules:multiValueContainer:innerForm:content:view:0:panel:"
+ "jsonRule:paletteField:recorder", "fullname");
TESTER.clickLink(
- "body:content:tabbedPanel:panel:outerObjectsRepeater:4:outer:dialog:footer:buttons:0:button");
+ "body:content:tabbedPanel:panel:outerObjectsRepeater:5:outer:dialog:footer:buttons:0:button");
closeCallBack(modal);
@@ -688,7 +739,7 @@ public class PoliciesITCase extends AbstractConsoleITCase {
// edit root realm
TESTER.clickLink(
- "body:content:body:container:content:tabbedPanel:panel:actions:actions:panelEdit:editLink");
+ "body:content:body:container:content:tabbedPanel:panel:actions:actions:actionRepeater:1:action:action");
TESTER.assertComponent("body:content:body:outerObjectsRepeater:0:outer", Modal.class);
// set new account policy
@@ -704,7 +755,7 @@ public class PoliciesITCase extends AbstractConsoleITCase {
TESTER.cleanupFeedbackMessages();
TESTER.executeAjaxEvent(
- "body:content:body:outerObjectsRepeater:0:outer:form:content:action:panelClose:closeLink",
+ "body:content:body:outerObjectsRepeater:0:outer:form:content:action:actionRepeater:0:action:action",
Constants.ON_CLICK);
// create user with a valid account name
@@ -715,7 +766,10 @@ public class PoliciesITCase extends AbstractConsoleITCase {
+ ":searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", "rossini");
assertNotNull(component);
- TESTER.clickLink(component.getPageRelativePath() + ":cells:6:cell:panelClone:cloneLink");
+ TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
+ TESTER.clickLink("body:content:body:container:content:tabbedPanel:panel:searchResult:outerObjectsRepeater:"
+ + "1:outer:container:content:togglePanelContainer:container:actions:actions:actionRepeater:1:"
+ + "action:action");
TESTER.assertComponent(
"body:content:body:container:content:tabbedPanel:panel:searchResult:"
@@ -753,7 +807,7 @@ public class PoliciesITCase extends AbstractConsoleITCase {
TESTER.cleanupFeedbackMessages();
TESTER.clickLink("body:content:body:container:content:tabbedPanel:panel:searchResult:"
- + "outerObjectsRepeater:0:outer:form:content:action:panelClose:closeLink");
+ + "outerObjectsRepeater:0:outer:form:content:action:actionRepeater:0:action:action");
component = findComponentByProp("username",
"body:content:body:container:content:tabbedPanel:panel:searchResult:container:content:"
@@ -761,12 +815,18 @@ public class PoliciesITCase extends AbstractConsoleITCase {
assertNotNull(component);
// delete the new user
+ TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
+
TESTER.getRequest().addParameter("confirm", "true");
TESTER.clickLink(TESTER.getComponentFromLastRenderedPage(
- component.getPageRelativePath() + ":cells:6:cell:panelDelete:deleteLink"));
+ "body:content:body:container:content:tabbedPanel:panel:searchResult:outerObjectsRepeater:"
+ + "1:outer:container:content:togglePanelContainer:container:actions:actions:actionRepeater:8:"
+ + "action:action"));
TESTER.executeAjaxEvent(TESTER.getComponentFromLastRenderedPage(
- component.getPageRelativePath() + ":cells:6:cell:panelDelete:deleteLink"), "onclick");
+ "body:content:body:container:content:tabbedPanel:panel:searchResult:outerObjectsRepeater:"
+ + "1:outer:container:content:togglePanelContainer:container:actions:actions:actionRepeater:8:"
+ + "action:action"), Constants.ON_CLICK);
TESTER.assertInfoMessages("Operation executed successfully");
TESTER.cleanupFeedbackMessages();
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/fit/core-reference/src/test/java/org/apache/syncope/fit/console/RealmsITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/RealmsITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/RealmsITCase.java
index c44f52a..1a59db4 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/RealmsITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/RealmsITCase.java
@@ -48,8 +48,7 @@ public class RealmsITCase extends AbstractConsoleITCase {
@Test
public void create() {
TESTER.clickLink(
- "body:content:body:container:content:tabbedPanel:panel:actions:actions:panelCreate:createLink");
-
+ "body:content:body:container:content:tabbedPanel:panel:actions:actions:actionRepeater:0:action:action");
TESTER.assertComponent("body:content:body:outerObjectsRepeater:0:outer", Modal.class);
FormTester formTester = TESTER.newFormTester(
@@ -61,9 +60,8 @@ public class RealmsITCase extends AbstractConsoleITCase {
TESTER.assertInfoMessages("Operation executed successfully");
TESTER.cleanupFeedbackMessages();
- TESTER.executeAjaxEvent(
- "body:content:body:outerObjectsRepeater:0:outer:form:content:action:panelClose:closeLink",
- Constants.ON_CLICK);
+ TESTER.executeAjaxEvent("body:content:body:outerObjectsRepeater:0:outer:form:content:action:actionRepeater:"
+ + "0:action:action", Constants.ON_CLICK);
// remove the new realm just created
TESTER.clickLink("body:realmsLI:realms");
@@ -76,7 +74,7 @@ public class RealmsITCase extends AbstractConsoleITCase {
TESTER.getRequest().addParameter("confirm", "true");
TESTER.clickLink(
- "body:content:body:container:content:tabbedPanel:panel:actions:actions:panelDelete:deleteLink");
+ "body:content:body:container:content:tabbedPanel:panel:actions:actions:actionRepeater:3:action:action");
TESTER.assertInfoMessages("Operation executed successfully");
TESTER.cleanupFeedbackMessages();
@@ -90,7 +88,7 @@ public class RealmsITCase extends AbstractConsoleITCase {
@Test
public void update() {
TESTER.clickLink(
- "body:content:body:container:content:tabbedPanel:panel:actions:actions:panelEdit:editLink");
+ "body:content:body:container:content:tabbedPanel:panel:actions:actions:actionRepeater:1:action:action");
TESTER.assertComponent("body:content:body:outerObjectsRepeater:0:outer", Modal.class);
FormTester formTester = TESTER.newFormTester(
@@ -100,9 +98,8 @@ public class RealmsITCase extends AbstractConsoleITCase {
TESTER.assertInfoMessages("Operation executed successfully");
TESTER.cleanupFeedbackMessages();
- TESTER.executeAjaxEvent(
- "body:content:body:outerObjectsRepeater:0:outer:form:content:action:panelClose:closeLink",
- Constants.ON_CLICK);
+ TESTER.executeAjaxEvent("body:content:body:outerObjectsRepeater:0:outer:form:content:action:actionRepeater:"
+ + "0:action:action", Constants.ON_CLICK);
}
@Test
@@ -114,7 +111,7 @@ public class RealmsITCase extends AbstractConsoleITCase {
TESTER.assertLabel("body:content:realmChoicePanel:container:realm", "/odd");
TESTER.clickLink(
- "body:content:body:container:content:tabbedPanel:panel:actions:actions:panelTemplate:templateLink");
+ "body:content:body:container:content:tabbedPanel:panel:actions:actions:actionRepeater:2:action:action");
TESTER.assertComponent("body:content:toggleTemplates", TogglePanel.class);
FormTester formTester = TESTER.newFormTester(
@@ -134,7 +131,7 @@ public class RealmsITCase extends AbstractConsoleITCase {
TESTER.assertLabel("body:content:realmChoicePanel:container:realm", "/odd");
TESTER.clickLink(
- "body:content:body:container:content:tabbedPanel:panel:actions:actions:panelTemplate:templateLink");
+ "body:content:body:container:content:tabbedPanel:panel:actions:actions:actionRepeater:2:action:action");
TESTER.assertComponent("body:content:toggleTemplates", TogglePanel.class);
formTester = TESTER.newFormTester(
@@ -162,7 +159,7 @@ public class RealmsITCase extends AbstractConsoleITCase {
Constants.ON_CLICK);
TESTER.clickLink(
- "body:content:body:container:content:tabbedPanel:panel:actions:actions:panelEdit:editLink");
+ "body:content:body:container:content:tabbedPanel:panel:actions:actions:actionRepeater:1:action:action");
TESTER.assertComponent("body:content:body:outerObjectsRepeater:0:outer", Modal.class);
TESTER.assertModelValue("body:content:body:outerObjectsRepeater:0:outer:form:content:form:view:details:"
+ "container:generics:name:textField", "two");
@@ -182,7 +179,7 @@ public class RealmsITCase extends AbstractConsoleITCase {
Component component = findComponentByProp("resource", "body:content:body:outerObjectsRepeater:0:outer:form:"
+ "content:customResultBody:firstLevelContainer:first:container", "resource-ldap-orgunit");
- TESTER.clickLink(component.getPageRelativePath() + ":actions:panelView:viewLink");
+ TESTER.clickLink(component.getPageRelativePath() + ":actions:actionRepeater:0:action:action");
TESTER.assertLabel("body:content:body:outerObjectsRepeater:0:outer:form:content:customResultBody:"
+ "secondLevelContainer:second:remoteObject:propView:2:value:oldAttribute:field-label", "ou");
@@ -209,12 +206,11 @@ public class RealmsITCase extends AbstractConsoleITCase {
+ "content:customResultBody:firstLevelContainer:first:container", "resource-ldap-orgunit"));
// ----------------------------------
- TESTER.executeAjaxEvent(
- "body:content:body:outerObjectsRepeater:0:outer:form:content:action:panelClose:closeLink",
- Constants.ON_CLICK);
+ TESTER.executeAjaxEvent("body:content:body:outerObjectsRepeater:0:outer:form:content:action:actionRepeater:"
+ + "0:action:action", Constants.ON_CLICK);
TESTER.clickLink(
- "body:content:body:container:content:tabbedPanel:panel:actions:actions:panelEdit:editLink");
+ "body:content:body:container:content:tabbedPanel:panel:actions:actions:actionRepeater:1:action:action");
TESTER.assertComponent("body:content:body:outerObjectsRepeater:0:outer", Modal.class);
TESTER.assertModelValue("body:content:body:outerObjectsRepeater:0:outer:form:content:form:view:details:"
+ "container:generics:name:textField", "two");
@@ -234,7 +230,7 @@ public class RealmsITCase extends AbstractConsoleITCase {
component = findComponentByProp("resource", "body:content:body:outerObjectsRepeater:0:outer:form:"
+ "content:customResultBody:firstLevelContainer:first:container", "resource-ldap-orgunit");
- TESTER.clickLink(component.getPageRelativePath() + ":actions:panelView:viewLink");
+ TESTER.clickLink(component.getPageRelativePath() + ":actions:actionRepeater:0:action:action");
TESTER.assertLabel("body:content:body:outerObjectsRepeater:0:outer:form:content:customResultBody:"
+ "secondLevelContainer:second:remoteObject:propView:2:value:oldAttribute:field-label", "ou");
@@ -261,8 +257,7 @@ public class RealmsITCase extends AbstractConsoleITCase {
+ "content:customResultBody:firstLevelContainer:first:container", "resource-ldap-orgunit"));
// ----------------------------------
- TESTER.executeAjaxEvent(
- "body:content:body:outerObjectsRepeater:0:outer:form:content:action:panelClose:closeLink",
- Constants.ON_CLICK);
+ TESTER.executeAjaxEvent("body:content:body:outerObjectsRepeater:0:outer:form:content:action:actionRepeater:"
+ + "0:action:action", Constants.ON_CLICK);
}
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/fit/core-reference/src/test/java/org/apache/syncope/fit/console/RelationshipTypesITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/RelationshipTypesITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/RelationshipTypesITCase.java
index c5bde0c..a9fe924 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/RelationshipTypesITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/RelationshipTypesITCase.java
@@ -21,11 +21,10 @@ package org.apache.syncope.fit.console;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
+import org.apache.syncope.client.console.commons.Constants;
import org.apache.syncope.client.console.panels.AjaxDataTablePanel;
import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
-import org.apache.syncope.client.console.wicket.markup.html.form.IndicatingOnConfirmAjaxLink;
import org.apache.wicket.Component;
-import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxLink;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.util.tester.FormTester;
import org.junit.Test;
@@ -41,11 +40,9 @@ public class RelationshipTypesITCase extends AbstractTypesITCase {
TESTER.assertComponent(
result.getPageRelativePath() + ":cells:1:cell", Label.class);
- TESTER.assertComponent(
- result.getPageRelativePath() + ":cells:3:cell:panelEdit:editLink", IndicatingAjaxLink.class);
-
- TESTER.clickLink(
- result.getPageRelativePath() + ":cells:3:cell:panelEdit:editLink");
+ TESTER.executeAjaxEvent(result.getPageRelativePath(), Constants.ON_CLICK);
+ TESTER.clickLink("body:content:tabbedPanel:panel:outerObjectsRepeater:1:outer:container:content:"
+ + "togglePanelContainer:container:actions:actions:actionRepeater:0:action:action");
TESTER.assertComponent(
"body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer", BaseModal.class);
@@ -71,17 +68,15 @@ public class RelationshipTypesITCase extends AbstractTypesITCase {
createRelationshipType(name);
browsingToRelationshipType();
- TESTER.assertComponent(
- DATATABLE_PATH
- + ":tablePanel:groupForm:checkgroup:dataTable:"
- + "body:rows:1:cells:3:cell:panelEdit:editLink", IndicatingAjaxLink.class);
+ Component result = findComponentByProp(KEY, DATATABLE_PATH, name);
+ assertNotNull(result);
- TESTER.clickLink(
- DATATABLE_PATH
- + ":tablePanel:groupForm:checkgroup:dataTable:body:rows:1:cells:3:cell:panelEdit:editLink");
+ TESTER.executeAjaxEvent(result.getPageRelativePath(), Constants.ON_CLICK);
+ TESTER.clickLink("body:content:tabbedPanel:panel:outerObjectsRepeater:1:outer:container:content:"
+ + "togglePanelContainer:container:actions:actions:actionRepeater:0:action:action");
- final FormTester formTester =
- TESTER.newFormTester("body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer:form");
+ final FormTester formTester = TESTER.newFormTester(
+ "body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer:form");
formTester.setValue(
"content:relationshipTypeDetails:container:form:description:textField", "new description");
@@ -99,18 +94,19 @@ public class RelationshipTypesITCase extends AbstractTypesITCase {
TESTER.assertComponent(DATATABLE_PATH, AjaxDataTablePanel.class);
Component result = findComponentByProp(KEY, DATATABLE_PATH, name);
-
assertNotNull(result);
- TESTER.assertComponent(
- result.getPageRelativePath() + ":cells:3:cell:panelDelete:deleteLink",
- IndicatingOnConfirmAjaxLink.class);
+ TESTER.executeAjaxEvent(result.getPageRelativePath(), Constants.ON_CLICK);
TESTER.getRequest().addParameter("confirm", "true");
+
TESTER.clickLink(TESTER.getComponentFromLastRenderedPage(
- result.getPageRelativePath() + ":cells:3:cell:panelDelete:deleteLink"));
+ "body:content:tabbedPanel:panel:outerObjectsRepeater:1:outer:container:content:"
+ + "togglePanelContainer:container:actions:actions:actionRepeater:1:action:action"));
TESTER.executeAjaxEvent(TESTER.getComponentFromLastRenderedPage(
- result.getPageRelativePath() + ":cells:3:cell:panelDelete:deleteLink"), "onclick");
+ "body:content:tabbedPanel:panel:outerObjectsRepeater:1:outer:container:content:"
+ + "togglePanelContainer:container:actions:actions:actionRepeater:1:action:action"), Constants.ON_CLICK);
+
TESTER.assertInfoMessages("Operation executed successfully");
TESTER.cleanupFeedbackMessages();
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/fit/core-reference/src/test/java/org/apache/syncope/fit/console/ReportsITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/ReportsITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/ReportsITCase.java
index 7adf92d..c94b48b 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/ReportsITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/ReportsITCase.java
@@ -73,12 +73,15 @@ public class ReportsITCase extends AbstractConsoleITCase {
assertNotNull(result);
+ TESTER.executeAjaxEvent(result.getPageRelativePath(), Constants.ON_CLICK);
TESTER.getRequest().addParameter("confirm", "true");
- TESTER.clickLink(TESTER.getComponentFromLastRenderedPage(
- result.getPageRelativePath() + ":cells:10:cell:panelDelete:deleteLink"));
+ TESTER.clickLink("body:content:tabbedPanel:panel:firstLevelContainer:first:outerObjectsRepeater:1:outer:"
+ + "container:content:togglePanelContainer:container:actions:actions:actionRepeater:5:action:action");
TESTER.executeAjaxEvent(TESTER.getComponentFromLastRenderedPage(
- result.getPageRelativePath() + ":cells:10:cell:panelDelete:deleteLink"), Constants.ON_CLICK);
+ "body:content:tabbedPanel:panel:firstLevelContainer:first:outerObjectsRepeater:1:outer:"
+ + "container:content:togglePanelContainer:container:actions:actions:actionRepeater:5:action:action"),
+ Constants.ON_CLICK);
TESTER.assertInfoMessages("Operation executed successfully");
TESTER.cleanupFeedbackMessages();
@@ -97,7 +100,9 @@ public class ReportsITCase extends AbstractConsoleITCase {
assertNotNull(result);
- TESTER.clickLink(result.getPageRelativePath() + ":cells:10:cell:panelCompose:composeLink");
+ TESTER.executeAjaxEvent(result.getPageRelativePath(), Constants.ON_CLICK);
+ TESTER.clickLink("body:content:tabbedPanel:panel:firstLevelContainer:first:outerObjectsRepeater:1:outer:"
+ + "container:content:togglePanelContainer:container:actions:actions:actionRepeater:2:action:action");
result = findComponentByProp("name", "body:content:tabbedPanel:panel:firstLevelContainer:first:"
+ "outerObjectsRepeater:0:outer:form:content:container:content:searchContainer:resultTable:tablePanel:"
@@ -105,9 +110,13 @@ public class ReportsITCase extends AbstractConsoleITCase {
assertNotNull(result);
+ TESTER.executeAjaxEvent(result.getPageRelativePath(), Constants.ON_CLICK);
TESTER.getRequest().addParameter("confirm", "true");
+
TESTER.clickLink(TESTER.getComponentFromLastRenderedPage(
- result.getPageRelativePath() + ":cells:3:cell:panelDelete:deleteLink"));
+ "body:content:tabbedPanel:panel:firstLevelContainer:first:outerObjectsRepeater:0:outer:"
+ + "form:content:outerObjectsRepeater:1:outer:container:content:togglePanelContainer:container:actions:"
+ + "actions:actionRepeater:2:action:action"));
TESTER.assertInfoMessages("Operation executed successfully");
TESTER.cleanupFeedbackMessages();
@@ -125,7 +134,9 @@ public class ReportsITCase extends AbstractConsoleITCase {
assertNotNull(result);
- TESTER.clickLink(result.getPageRelativePath() + ":cells:10:cell:panelView:viewLink");
+ TESTER.executeAjaxEvent(result.getPageRelativePath(), Constants.ON_CLICK);
+ TESTER.clickLink("body:content:tabbedPanel:panel:firstLevelContainer:first:outerObjectsRepeater:1:outer:"
+ + "container:content:togglePanelContainer:container:actions:actions:actionRepeater:3:action:action");
TESTER.assertModelValue(
"body:content:tabbedPanel:panel:secondLevelContainer:title", "Executions of report 'test'");
@@ -135,7 +146,11 @@ public class ReportsITCase extends AbstractConsoleITCase {
assertNotNull(result);
- TESTER.clickLink(result.getPageRelativePath() + ":cells:6:cell:panelView:viewLink");
+ TESTER.executeAjaxEvent(result.getPageRelativePath(), Constants.ON_CLICK);
+ TESTER.clickLink("body:content:tabbedPanel:panel:secondLevelContainer:second:executions:firstLevelContainer:"
+ + "first:outerObjectsRepeater:1:outer:container:content:togglePanelContainer:container:actions:"
+ + "actions:actionRepeater:0:action:action");
+
TESTER.clickLink(
"body:content:tabbedPanel:panel:secondLevelContainer:second:executions:secondLevelContainer:back");
@@ -157,14 +172,21 @@ public class ReportsITCase extends AbstractConsoleITCase {
assertNotNull(result);
- TESTER.clickLink(result.getPageRelativePath() + ":cells:10:cell:panelCompose:composeLink");
+ TESTER.executeAjaxEvent(result.getPageRelativePath(), Constants.ON_CLICK);
+ TESTER.clickLink("body:content:tabbedPanel:panel:firstLevelContainer:first:outerObjectsRepeater:1:outer:"
+ + "container:content:togglePanelContainer:container:actions:actions:actionRepeater:2:action:action");
result = findComponentByProp("name", "body:content:tabbedPanel:panel:firstLevelContainer:first:"
+ "outerObjectsRepeater:0:outer:form:content:container:content:searchContainer:resultTable:tablePanel:"
+ "groupForm:checkgroup:dataTable", "testUserReportlet");
assertNotNull(result);
- TESTER.clickLink(result.getPageRelativePath() + ":cells:3:cell:panelClone:cloneLink");
+
+ TESTER.executeAjaxEvent(result.getPageRelativePath(), Constants.ON_CLICK);
+
+ TESTER.clickLink("body:content:tabbedPanel:panel:firstLevelContainer:first:outerObjectsRepeater:0:outer:form:"
+ + "content:outerObjectsRepeater:1:outer:container:content:togglePanelContainer:container:actions:"
+ + "actions:actionRepeater:0:action:action");
FormTester formTester = TESTER.newFormTester("body:content:tabbedPanel:panel:firstLevelContainer:first:"
+ "outerObjectsRepeater:0:outer:form:content:container:content:wizard:form");
@@ -194,7 +216,9 @@ public class ReportsITCase extends AbstractConsoleITCase {
assertNotNull(result);
- TESTER.clickLink(result.getPageRelativePath() + ":cells:10:cell:panelCompose:composeLink");
+ TESTER.executeAjaxEvent(result.getPageRelativePath(), Constants.ON_CLICK);
+ TESTER.clickLink("body:content:tabbedPanel:panel:firstLevelContainer:first:outerObjectsRepeater:1:outer:"
+ + "container:content:togglePanelContainer:container:actions:actions:actionRepeater:2:action:action");
TESTER.clickLink("body:content:tabbedPanel:panel:firstLevelContainer:first:outerObjectsRepeater:0:"
+ "outer:form:content:container:content:add");
@@ -228,7 +252,11 @@ public class ReportsITCase extends AbstractConsoleITCase {
"name", "body:content:tabbedPanel:panel:firstLevelContainer:first:container:"
+ "content:searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", "updateReport");
- TESTER.clickLink(result.getPageRelativePath() + ":cells:10:cell:panelEdit:editLink");
+ assertNotNull(result);
+
+ TESTER.executeAjaxEvent(result.getPageRelativePath(), Constants.ON_CLICK);
+ TESTER.clickLink("body:content:tabbedPanel:panel:firstLevelContainer:first:outerObjectsRepeater:1:outer:"
+ + "container:content:togglePanelContainer:container:actions:actions:actionRepeater:0:action:action");
TESTER.assertModelValue("body:content:tabbedPanel:panel:firstLevelContainer:first:outerObjectsRepeater:"
+ "0:outer:dialog:header:header-label", "Edit Report updateReport");
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/fit/core-reference/src/test/java/org/apache/syncope/fit/console/RolesITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/RolesITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/RolesITCase.java
index 05d98e3..54d8348 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/RolesITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/RolesITCase.java
@@ -63,22 +63,24 @@ public class RolesITCase extends AbstractConsoleITCase {
@Test
public void read() {
- assertNull(findComponentByProp(KEY, "body:content:rolesPanel:container:content:searchContainer:"
- + "resultTable:tablePanel:groupForm:checkgroup:dataTable", "OTHER"));
+ Component result = findComponentByProp(KEY, "body:content:rolesPanel:container:content:searchContainer:"
+ + "resultTable:tablePanel:groupForm:checkgroup:dataTable", "Other");
+ assertNotNull(result);
- TESTER.clickLink("body:content:rolesPanel:container:content:searchContainer:resultTable:tablePanel:"
- + "groupForm:checkgroup:dataTable:body:rows:1:cells:4:cell:panelMembers:membersLink");
+ TESTER.executeAjaxEvent(result.getPageRelativePath(), Constants.ON_CLICK);
+ TESTER.clickLink("body:content:rolesPanel:outerObjectsRepeater:1:outer:container:content:togglePanelContainer:"
+ + "container:actions:actions:actionRepeater:2:action:action");
TESTER.assertModelValue(
- "body:content:rolesPanel:outerObjectsRepeater:4:outer:dialog:header:header-label",
+ "body:content:rolesPanel:outerObjectsRepeater:5:outer:dialog:header:header-label",
"Role 'Other' members");
- assertNotNull(findComponentByProp("username", "body:content:rolesPanel:outerObjectsRepeater:4:outer:form:"
+ assertNotNull(findComponentByProp("username", "body:content:rolesPanel:outerObjectsRepeater:5:outer:form:"
+ "content:searchResult:container:content:searchContainer:resultTable:tablePanel:groupForm:"
+ "checkgroup:dataTable", "rossini"));
TESTER.executeAjaxEvent(
- "body:content:rolesPanel:outerObjectsRepeater:4:outer:dialog:footer:buttons:0:button",
+ "body:content:rolesPanel:outerObjectsRepeater:5:outer:dialog:footer:buttons:0:button",
Constants.ON_CLICK);
}
@@ -93,11 +95,11 @@ public class RolesITCase extends AbstractConsoleITCase {
Component result = findComponentByProp(KEY, "body:content:rolesPanel:container:content:searchContainer:"
+ "resultTable:tablePanel:groupForm:checkgroup:dataTable", "updateRole");
- TESTER.assertLabel(
- result.getPageRelativePath() + ":cells:1:cell", "updateRole");
+ assertNotNull(result);
- TESTER.clickLink(
- result.getPageRelativePath() + ":cells:4:cell:panelEdit:editLink");
+ TESTER.executeAjaxEvent(result.getPageRelativePath(), Constants.ON_CLICK);
+ TESTER.clickLink("body:content:rolesPanel:outerObjectsRepeater:1:outer:container:content:togglePanelContainer:"
+ + "container:actions:actions:actionRepeater:0:action:action");
FormTester formTester = TESTER.newFormTester("body:content:rolesPanel:outerObjectsRepeater:0:outer:form");
formTester.setValue("content:form:view:key:textField", "updateRole");
@@ -121,15 +123,18 @@ public class RolesITCase extends AbstractConsoleITCase {
Component result = findComponentByProp(KEY, "body:content:rolesPanel:container:content:searchContainer:"
+ "resultTable:tablePanel:groupForm:checkgroup:dataTable", "deleteRole");
- TESTER.assertLabel(
- result.getPageRelativePath() + ":cells:1:cell", "deleteRole");
+ assertNotNull(result);
+
+ TESTER.executeAjaxEvent(result.getPageRelativePath(), Constants.ON_CLICK);
TESTER.getRequest().addParameter("confirm", "true");
TESTER.clickLink(TESTER.getComponentFromLastRenderedPage(
- result.getPageRelativePath() + ":cells:4:cell:panelDelete:deleteLink"));
+ "body:content:rolesPanel:outerObjectsRepeater:1:outer:container:content:togglePanelContainer:"
+ + "container:actions:actions:actionRepeater:4:action:action"));
TESTER.executeAjaxEvent(TESTER.getComponentFromLastRenderedPage(
- result.getPageRelativePath() + ":cells:3:cell:panelDelete:deleteLink"), "onclick");
+ "body:content:rolesPanel:outerObjectsRepeater:1:outer:container:content:togglePanelContainer:"
+ + "container:actions:actions:actionRepeater:4:action:action"), "onclick");
TESTER.assertInfoMessages("Operation executed successfully");
TESTER.cleanupFeedbackMessages();
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/fit/core-reference/src/test/java/org/apache/syncope/fit/console/SchemasITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/SchemasITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/SchemasITCase.java
index 75f3057..45303fb 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/SchemasITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/SchemasITCase.java
@@ -25,9 +25,7 @@ import de.agilecoders.wicket.core.markup.html.bootstrap.dialog.Modal;
import org.apache.syncope.client.console.commons.Constants;
import org.apache.syncope.client.console.pages.Types;
import org.apache.syncope.client.console.panels.AjaxDataTablePanel;
-import org.apache.syncope.client.console.wicket.markup.html.form.IndicatingOnConfirmAjaxLink;
import org.apache.wicket.Component;
-import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxLink;
import org.apache.wicket.markup.html.form.DropDownChoice;
import org.apache.wicket.util.tester.FormTester;
import org.junit.Test;
@@ -42,15 +40,13 @@ public class SchemasITCase extends AbstractTypesITCase {
+ ":tablePanel:groupForm:"
+ "checkgroup:dataTable:body:rows:1:cells:1:cell", "aLong");
- TESTER.assertComponent(
- PLAIN_DATATABLE_PATH
- + ":tablePanel:groupForm:checkgroup:dataTable:"
- + "body:rows:1:cells:7:cell:panelEdit:editLink", IndicatingAjaxLink.class);
+ TESTER.executeAjaxEvent(
+ PLAIN_DATATABLE_PATH + ":tablePanel:groupForm:checkgroup:dataTable:body:rows:1",
+ Constants.ON_CLICK);
TESTER.clickLink(
- PLAIN_DATATABLE_PATH
- + ":tablePanel:groupForm:checkgroup:dataTable:"
- + "body:rows:1:cells:7:cell:panelEdit:editLink");
+ "body:content:tabbedPanel:panel:accordionPanel:tabs:0:body:content:outerObjectsRepeater:1:outer:"
+ + "container:content:togglePanelContainer:container:actions:actions:actionRepeater:0:action:action");
TESTER.assertComponent(
"body:content:tabbedPanel:"
@@ -73,8 +69,8 @@ public class SchemasITCase extends AbstractTypesITCase {
formTester.setValue("content:details:form:key:textField", "zBoolean");
formTester.setValue("content:details:form:type:dropDownChoiceField", "3");
- TESTER.clickLink("body:content:tabbedPanel:panel:"
- + "accordionPanel:tabs:0:body:content:outerObjectsRepeater:0:outer:dialog:footer:inputs:0:submit");
+ TESTER.clickLink("body:content:tabbedPanel:panel:accordionPanel:tabs:0:body:content:outerObjectsRepeater:0:"
+ + "outer:dialog:footer:inputs:0:submit");
TESTER.assertInfoMessages("Operation executed successfully");
@@ -88,11 +84,13 @@ public class SchemasITCase extends AbstractTypesITCase {
Component result = findComponentByProp(KEY, PLAIN_DATATABLE_PATH, "ctype");
- TESTER.assertLabel(
- result.getPageRelativePath() + ":cells:1:cell", "ctype");
+ TESTER.assertLabel(result.getPageRelativePath() + ":cells:1:cell", "ctype");
+ assertNotNull(result);
+ TESTER.executeAjaxEvent(result.getPageRelativePath(), Constants.ON_CLICK);
TESTER.clickLink(
- result.getPageRelativePath() + ":cells:7:cell:panelEdit:editLink");
+ "body:content:tabbedPanel:panel:accordionPanel:tabs:0:body:content:outerObjectsRepeater:1:outer:"
+ + "container:content:togglePanelContainer:container:actions:actions:actionRepeater:0:action:action");
TESTER.assertComponent(
"body:content:tabbedPanel:"
@@ -142,17 +140,20 @@ public class SchemasITCase extends AbstractTypesITCase {
TESTER.assertComponent(PLAIN_DATATABLE_PATH, AjaxDataTablePanel.class);
Component result = findComponentByProp(KEY, PLAIN_DATATABLE_PATH, schemaName);
+ assertNotNull(result);
- TESTER.assertComponent(
- result.getPageRelativePath() + ":cells:7:cell:panelDelete:deleteLink",
- IndicatingOnConfirmAjaxLink.class);
+ TESTER.executeAjaxEvent(result.getPageRelativePath(), Constants.ON_CLICK);
TESTER.getRequest().addParameter("confirm", "true");
- TESTER.clickLink(TESTER.getComponentFromLastRenderedPage(
- result.getPageRelativePath() + ":cells:7:cell:panelDelete:deleteLink"));
+ TESTER.clickLink(
+ "body:content:tabbedPanel:panel:accordionPanel:tabs:0:body:content:outerObjectsRepeater:1:outer:"
+ + "container:content:togglePanelContainer:container:actions:actions:actionRepeater:1:action:action");
TESTER.executeAjaxEvent(TESTER.getComponentFromLastRenderedPage(
- result.getPageRelativePath() + ":cells:7:cell:panelDelete:deleteLink"), "onclick");
+ "body:content:tabbedPanel:panel:accordionPanel:tabs:0:body:content:outerObjectsRepeater:1:outer:"
+ + "container:content:togglePanelContainer:container:actions:actions:actionRepeater:1:action:action"),
+ Constants.ON_CLICK);
+
TESTER.assertInfoMessages("Operation executed successfully");
TESTER.cleanupFeedbackMessages();
@@ -182,27 +183,29 @@ public class SchemasITCase extends AbstractTypesITCase {
formTester.setValue("content:details:form:anyType:dropDownChoiceField", "0");
formTester.setValue("content:details:form:extAttrName:textField", "virattr");
- TESTER.executeAjaxEvent("body:content:tabbedPanel:panel:"
- + "accordionPanel:tabs:2:body:content:outerObjectsRepeater:0:outer:dialog:footer:inputs:0:submit",
- Constants.ON_CLICK);
+ TESTER.executeAjaxEvent("body:content:tabbedPanel:panel:accordionPanel:tabs:2:body:content:"
+ + "outerObjectsRepeater:0:outer:dialog:footer:inputs:0:submit", Constants.ON_CLICK);
TESTER.assertInfoMessages("Operation executed successfully");
TESTER.cleanupFeedbackMessages();
TESTER.assertRenderedPage(Types.class);
Component result = findComponentByProp(KEY, VIRTUAL_DATATABLE_PATH, "mynewvir");
- assertNotNull(result);
+ TESTER.executeAjaxEvent(result.getPageRelativePath(), Constants.ON_CLICK);
TESTER.getRequest().addParameter("confirm", "true");
- TESTER.clickLink(TESTER.getComponentFromLastRenderedPage(
- result.getPageRelativePath() + ":cells:6:cell:panelDelete:deleteLink"));
+ TESTER.clickLink(
+ "body:content:tabbedPanel:panel:accordionPanel:tabs:2:body:content:outerObjectsRepeater:1:outer:"
+ + "container:content:togglePanelContainer:container:actions:actions:actionRepeater:1:action:action");
TESTER.executeAjaxEvent(TESTER.getComponentFromLastRenderedPage(
- result.getPageRelativePath() + ":cells:6:cell:panelDelete:deleteLink"), "onclick");
+ "body:content:tabbedPanel:panel:accordionPanel:tabs:2:body:content:outerObjectsRepeater:1:outer:"
+ + "container:content:togglePanelContainer:container:actions:actions:actionRepeater:1:action:action"),
+ Constants.ON_CLICK);
+
TESTER.assertInfoMessages("Operation executed successfully");
TESTER.cleanupFeedbackMessages();
- result = findComponentByProp(KEY, VIRTUAL_DATATABLE_PATH, "mynewvir");
- assertNull(result);
+ assertNull(findComponentByProp(KEY, VIRTUAL_DATATABLE_PATH, "mynewvir"));
}
}
[08/10] syncope git commit: [SYNCOPE-1047] Replaces ActionLinksPanel
with TogglePanel
Posted by fm...@apache.org.
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/java/org/apache/syncope/client/console/panels/RoleDirectoryPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/RoleDirectoryPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/RoleDirectoryPanel.java
index 403938e..d911887 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/RoleDirectoryPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/RoleDirectoryPanel.java
@@ -38,11 +38,9 @@ import org.apache.syncope.client.console.panels.RoleDirectoryPanel.RoleDataProvi
import org.apache.syncope.client.console.rest.AnyTypeClassRestClient;
import org.apache.syncope.client.console.rest.AnyTypeRestClient;
import org.apache.syncope.client.console.rest.RoleRestClient;
-import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.ActionColumn;
import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
-import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink.ActionType;
-import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionsPanel;
import org.apache.syncope.client.console.wicket.markup.html.form.JsonEditorPanel;
import org.apache.syncope.client.console.wizards.AjaxWizard;
import org.apache.syncope.client.console.wizards.WizardMgtPanel;
@@ -82,6 +80,7 @@ public class RoleDirectoryPanel extends DirectoryPanel<RoleTO, RoleWrapper, Role
MetaDataRoleAuthorizationStrategy.authorize(addAjaxLink, RENDER, StandardEntitlement.ROLE_CREATE);
setReadOnly(!SyncopeConsoleSession.get().owns(StandardEntitlement.ROLE_UPDATE));
+ disableCheckBoxes();
setShowResultPage(true);
modal.size(Modal.Size.Large);
@@ -117,166 +116,149 @@ public class RoleDirectoryPanel extends DirectoryPanel<RoleTO, RoleWrapper, Role
columns.add(new PropertyColumn<RoleTO, String>(
new ResourceModel("realms"), null, "realms"));
- columns.add(new ActionColumn<RoleTO, String>(new ResourceModel("actions")) {
+ return columns;
+ }
+
+ @Override
+ public ActionsPanel<RoleTO> getActions(final IModel<RoleTO> model) {
+ final ActionsPanel<RoleTO> panel = super.getActions(model);
- private static final long serialVersionUID = -3503023501954863131L;
+ panel.add(new ActionLink<RoleTO>() {
+
+ private static final long serialVersionUID = -7978723352517770644L;
@Override
- public ActionLinksPanel<RoleTO> getActions(final String componentId, final IModel<RoleTO> model) {
- final ActionLinksPanel.Builder<RoleTO> panel = ActionLinksPanel.builder();
+ public void onClick(final AjaxRequestTarget target, final RoleTO ignore) {
+ send(RoleDirectoryPanel.this, Broadcast.EXACT,
+ new AjaxWizard.EditItemActionEvent<>(
+ new RoleWrapper(new RoleRestClient().read(model.getObject().getKey())),
+ target));
+ }
+ }, ActionLink.ActionType.EDIT, StandardEntitlement.ROLE_READ);
- panel.add(new ActionLink<RoleTO>() {
+ panel.add(new ActionLink<RoleTO>() {
- private static final long serialVersionUID = -7978723352517770644L;
+ private static final long serialVersionUID = -7978723352517770644L;
- @Override
- public void onClick(final AjaxRequestTarget target, final RoleTO ignore) {
- final String query = SyncopeClient.getUserSearchConditionBuilder().and(
- SyncopeClient.getUserSearchConditionBuilder().inRoles(model.getObject().getKey()),
- SyncopeClient.getUserSearchConditionBuilder().is("key").notNullValue()).query();
-
- final AnyTypeRestClient typeRestClient = new AnyTypeRestClient();
- final AnyTypeClassRestClient classRestClient = new AnyTypeClassRestClient();
-
- final AnyTypeTO anyTypeTO = typeRestClient.read(AnyTypeKind.USER.name());
-
- ModalPanel panel = new AnyPanel(BaseModal.CONTENT_ID, anyTypeTO, null, null, false, pageRef) {
-
- private static final long serialVersionUID = -7514498203393023415L;
-
- @Override
- protected Panel getDirectoryPanel(final String id) {
- final Panel panel = new UserDirectoryPanel.Builder(
- classRestClient.list(anyTypeTO.getClasses()), anyTypeTO.getKey(), pageRef).
- setRealm("/").
- setFiltered(true).
- setFiql(query).
- disableCheckBoxes().
- addNewItemPanelBuilder(FormLayoutInfoUtils.instantiate(
- new UserTO(),
- anyTypeTO.getClasses(),
- FormLayoutInfoUtils.fetch(typeRestClient.list()).getLeft(),
- pageRef), false).
- setWizardInModal(false).build(id);
-
- MetaDataRoleAuthorizationStrategy.authorize(
- panel,
- WebPage.RENDER,
- StandardEntitlement.USER_SEARCH);
-
- return panel;
- }
- };
-
- membersModal.header(new StringResourceModel("role.members", RoleDirectoryPanel.this, model));
- membersModal.setContent(panel);
- membersModal.show(true);
- target.add(membersModal);
- }
- }, ActionLink.ActionType.MEMBERS, StandardEntitlement.USER_SEARCH).add(new ActionLink<RoleTO>() {
+ @Override
+ public void onClick(final AjaxRequestTarget target, final RoleTO ignore) {
+ final RoleTO clone = SerializationUtils.clone(model.getObject());
+ clone.setKey(null);
+ send(RoleDirectoryPanel.this, Broadcast.EXACT,
+ new AjaxWizard.NewItemActionEvent<>(new RoleWrapper(clone), target));
+ }
+ }, ActionLink.ActionType.CLONE, StandardEntitlement.ROLE_CREATE);
- private static final long serialVersionUID = -7978723352517770644L;
+ panel.add(new ActionLink<RoleTO>() {
- @Override
- public void onClick(final AjaxRequestTarget target, final RoleTO ignore) {
- send(RoleDirectoryPanel.this, Broadcast.EXACT,
- new AjaxWizard.EditItemActionEvent<>(
- new RoleWrapper(new RoleRestClient().read(model.getObject().getKey())),
- target));
- }
- }, ActionLink.ActionType.EDIT, StandardEntitlement.ROLE_READ).add(new ActionLink<RoleTO>() {
+ private static final long serialVersionUID = -7978723352517770644L;
- private static final long serialVersionUID = -7978723352517770644L;
+ @Override
+ public void onClick(final AjaxRequestTarget target, final RoleTO ignore) {
+ final String query = SyncopeClient.getUserSearchConditionBuilder().and(
+ SyncopeClient.getUserSearchConditionBuilder().inRoles(model.getObject().getKey()),
+ SyncopeClient.getUserSearchConditionBuilder().is("key").notNullValue()).query();
- @Override
- public void onClick(final AjaxRequestTarget target, final RoleTO ignore) {
- final RoleTO clone = SerializationUtils.clone(model.getObject());
- clone.setKey(null);
- send(RoleDirectoryPanel.this, Broadcast.EXACT,
- new AjaxWizard.NewItemActionEvent<>(new RoleWrapper(clone), target));
- }
- }, ActionLink.ActionType.CLONE, StandardEntitlement.ROLE_CREATE).add(new ActionLink<RoleTO>() {
+ final AnyTypeRestClient typeRestClient = new AnyTypeRestClient();
+ final AnyTypeClassRestClient classRestClient = new AnyTypeClassRestClient();
- private static final long serialVersionUID = -7978723352517770644L;
+ final AnyTypeTO anyTypeTO = typeRestClient.read(AnyTypeKind.USER.name());
- @Override
- public void onClick(final AjaxRequestTarget target, final RoleTO ignore) {
- final ConsoleLayoutInfo info = new ConsoleLayoutInfo(model.getObject().getKey());
- info.setContent(restClient.readConsoleLayoutInfo(model.getObject().getKey()));
-
- utilityModal.header(new ResourceModel("console.layout.info", "JSON Content"));
- utilityModal.setContent(new JsonEditorPanel(
- utilityModal, new PropertyModel<String>(info, "content"), false, pageRef) {
-
- private static final long serialVersionUID = -8927036362466990179L;
-
- @Override
- public void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
- try {
- restClient.setConsoleLayoutInfo(info.getKey(), info.getContent());
- SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));
- modal.show(false);
- modal.close(target);
- } catch (Exception e) {
- LOG.error("While updating onsole layout info for role {}", info.getKey(), e);
- SyncopeConsoleSession.get().error(StringUtils.isBlank(e.getMessage())
- ? e.getClass().getName() : e.
- getMessage());
- }
- ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target);
- }
- });
- utilityModal.show(true);
- target.add(utilityModal);
- }
- }, ActionLink.ActionType.LAYOUT_EDIT, StandardEntitlement.ROLE_UPDATE).add(new ActionLink<RoleTO>() {
+ ModalPanel panel = new AnyPanel(BaseModal.CONTENT_ID, anyTypeTO, null, null, false, pageRef) {
- private static final long serialVersionUID = -7978723352517770644L;
+ private static final long serialVersionUID = -7514498203393023415L;
@Override
- public void onClick(final AjaxRequestTarget target, final RoleTO ignore) {
- try {
- restClient.delete(model.getObject().getKey());
- SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));
- target.add(container);
- } catch (SyncopeClientException e) {
- LOG.error("While deleting object {}", model.getObject().getKey(), e);
- SyncopeConsoleSession.get().error(StringUtils.isBlank(e.getMessage()) ? e.getClass().
- getName() : e.getMessage());
- }
- ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target);
+ protected Panel getDirectoryPanel(final String id) {
+ final Panel panel = new UserDirectoryPanel.Builder(
+ classRestClient.list(anyTypeTO.getClasses()), anyTypeTO.getKey(), pageRef).
+ setRealm("/").
+ setFiltered(true).
+ setFiql(query).
+ disableCheckBoxes().
+ addNewItemPanelBuilder(FormLayoutInfoUtils.instantiate(
+ new UserTO(),
+ anyTypeTO.getClasses(),
+ FormLayoutInfoUtils.fetch(typeRestClient.list()).getLeft(),
+ pageRef), false).
+ setWizardInModal(false).build(id);
+
+ MetaDataRoleAuthorizationStrategy.authorize(
+ panel,
+ WebPage.RENDER,
+ StandardEntitlement.USER_SEARCH);
+
+ return panel;
}
- }, ActionLink.ActionType.DELETE, StandardEntitlement.ROLE_DELETE);
+ };
- return panel.build(componentId);
+ membersModal.header(new StringResourceModel("role.members", RoleDirectoryPanel.this, model));
+ membersModal.setContent(panel);
+ membersModal.show(true);
+ target.add(membersModal);
}
+ }, ActionLink.ActionType.MEMBERS, StandardEntitlement.USER_SEARCH);
+
+ panel.add(new ActionLink<RoleTO>() {
+
+ private static final long serialVersionUID = -7978723352517770644L;
@Override
- public ActionLinksPanel<RoleTO> getHeader(final String componentId) {
- final ActionLinksPanel.Builder<RoleTO> panel = ActionLinksPanel.builder();
+ public void onClick(final AjaxRequestTarget target, final RoleTO ignore) {
+ final ConsoleLayoutInfo info = new ConsoleLayoutInfo(model.getObject().getKey());
+ info.setContent(restClient.readConsoleLayoutInfo(model.getObject().getKey()));
- return panel.add(new ActionLink<RoleTO>() {
+ utilityModal.header(new ResourceModel("console.layout.info", "JSON Content"));
+ utilityModal.setContent(new JsonEditorPanel(
+ utilityModal, new PropertyModel<String>(info, "content"), false, pageRef) {
- private static final long serialVersionUID = -7978723352517770644L;
+ private static final long serialVersionUID = -8927036362466990179L;
@Override
- public void onClick(final AjaxRequestTarget target, final RoleTO ignore) {
- if (target != null) {
- target.add(container);
+ public void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
+ try {
+ restClient.setConsoleLayoutInfo(info.getKey(), info.getContent());
+ SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));
+ modal.show(false);
+ modal.close(target);
+ } catch (Exception e) {
+ LOG.error("While updating onsole layout info for role {}", info.getKey(), e);
+ SyncopeConsoleSession.get().error(StringUtils.isBlank(e.getMessage())
+ ? e.getClass().getName() : e.
+ getMessage());
}
+ ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target);
}
- }, ActionLink.ActionType.RELOAD, StandardEntitlement.ROLE_LIST).build(componentId);
+ });
+ utilityModal.show(true);
+ target.add(utilityModal);
}
- });
+ }, ActionLink.ActionType.LAYOUT_EDIT, StandardEntitlement.ROLE_UPDATE);
+ panel.add(new ActionLink<RoleTO>() {
- return columns;
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target, final RoleTO ignore) {
+ try {
+ restClient.delete(model.getObject().getKey());
+ SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));
+ target.add(container);
+ } catch (SyncopeClientException e) {
+ LOG.error("While deleting object {}", model.getObject().getKey(), e);
+ SyncopeConsoleSession.get().error(StringUtils.isBlank(e.getMessage()) ? e.getClass().
+ getName() : e.getMessage());
+ }
+ ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target);
+ }
+ }, ActionLink.ActionType.DELETE, StandardEntitlement.ROLE_DELETE, true);
+
+ return panel;
}
@Override
protected Collection<ActionLink.ActionType> getBulkActions() {
- final List<ActionType> bulkActions = new ArrayList<>();
- bulkActions.add(ActionType.DELETE);
- return bulkActions;
+ return Collections.<ActionLink.ActionType>singletonList(ActionLink.ActionType.DELETE);
}
public abstract static class Builder
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/java/org/apache/syncope/client/console/panels/SchemaTypePanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/SchemaTypePanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/SchemaTypePanel.java
index 70ed5d6..af1b84c 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/SchemaTypePanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/SchemaTypePanel.java
@@ -38,10 +38,9 @@ import org.apache.syncope.client.console.pages.BasePage;
import org.apache.syncope.client.console.panels.SchemaTypePanel.SchemaProvider;
import org.apache.syncope.client.console.rest.ConfRestClient;
import org.apache.syncope.client.console.rest.SchemaRestClient;
-import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.ActionColumn;
import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.BooleanPropertyColumn;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
-import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionsPanel;
import org.apache.syncope.client.console.wizards.AbstractModalPanelBuilder;
import org.apache.syncope.client.console.wizards.AjaxWizard;
import org.apache.syncope.common.lib.to.AbstractSchemaTO;
@@ -180,80 +179,55 @@ public class SchemaTypePanel extends TypesDirectoryPanel<AbstractSchemaTO, Schem
}
}
- columns.add(new ActionColumn<AbstractSchemaTO, String>(new ResourceModel("actions")) {
-
- private static final long serialVersionUID = 906457126287899096L;
-
- @Override
- public ActionLinksPanel<AbstractSchemaTO> getActions(
- final String componentId, final IModel<AbstractSchemaTO> model) {
-
- ActionLinksPanel<AbstractSchemaTO> panel = ActionLinksPanel.<AbstractSchemaTO>builder().
- add(new ActionLink<AbstractSchemaTO>() {
-
- private static final long serialVersionUID = -3722207913631435501L;
+ return columns;
+ }
- @Override
- public void onClick(final AjaxRequestTarget target, final AbstractSchemaTO ignore) {
- send(SchemaTypePanel.this, Broadcast.EXACT,
- new AjaxWizard.EditItemActionEvent<>(model.getObject(), target));
- }
- }, ActionLink.ActionType.EDIT, StandardEntitlement.SCHEMA_UPDATE).
- add(new ActionLink<AbstractSchemaTO>() {
-
- private static final long serialVersionUID = -3722207913631435501L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final AbstractSchemaTO ignore) {
- try {
- switch (schemaType) {
- case DERIVED:
- restClient.deleteDerSchema(model.getObject().getKey());
- break;
-
- case VIRTUAL:
- restClient.deleteVirSchema(model.getObject().getKey());
- break;
-
- default:
- restClient.deletePlainSchema(model.getObject().getKey());
- break;
- }
-
- SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));
- target.add(container);
- } catch (Exception e) {
- LOG.error("While deleting {}", model.getObject(), e);
- SyncopeConsoleSession.get().error(StringUtils.isBlank(e.getMessage())
- ? e.getClass().getName() : e.getMessage());
- }
- ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target);
- }
- }, ActionLink.ActionType.DELETE, StandardEntitlement.SCHEMA_DELETE).
- build(componentId);
+ @Override
+ public ActionsPanel<AbstractSchemaTO> getActions(final IModel<AbstractSchemaTO> model) {
+ final ActionsPanel<AbstractSchemaTO> panel = super.getActions(model);
+ panel.add(new ActionLink<AbstractSchemaTO>() {
- return panel;
- }
+ private static final long serialVersionUID = -3722207913631435501L;
@Override
- public ActionLinksPanel<AbstractSchemaTO> getHeader(final String componentId) {
- final ActionLinksPanel.Builder<AbstractSchemaTO> panel = ActionLinksPanel.builder();
-
- return panel.add(new ActionLink<AbstractSchemaTO>() {
+ public void onClick(final AjaxRequestTarget target, final AbstractSchemaTO ignore) {
+ send(SchemaTypePanel.this, Broadcast.EXACT,
+ new AjaxWizard.EditItemActionEvent<>(model.getObject(), target));
+ }
+ }, ActionLink.ActionType.EDIT, StandardEntitlement.SCHEMA_UPDATE);
+ panel.add(new ActionLink<AbstractSchemaTO>() {
- private static final long serialVersionUID = -1140254463922516111L;
+ private static final long serialVersionUID = -3722207913631435501L;
- @Override
- public void onClick(final AjaxRequestTarget target, final AbstractSchemaTO ignore) {
- if (target != null) {
- target.add(container);
- }
+ @Override
+ public void onClick(final AjaxRequestTarget target, final AbstractSchemaTO ignore) {
+ try {
+ switch (schemaType) {
+ case DERIVED:
+ restClient.deleteDerSchema(model.getObject().getKey());
+ break;
+
+ case VIRTUAL:
+ restClient.deleteVirSchema(model.getObject().getKey());
+ break;
+
+ default:
+ restClient.deletePlainSchema(model.getObject().getKey());
+ break;
}
- }, ActionLink.ActionType.RELOAD).build(componentId);
+
+ SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));
+ target.add(container);
+ } catch (Exception e) {
+ LOG.error("While deleting {}", model.getObject(), e);
+ SyncopeConsoleSession.get().error(StringUtils.isBlank(e.getMessage())
+ ? e.getClass().getName() : e.getMessage());
+ }
+ ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target);
}
- });
+ }, ActionLink.ActionType.DELETE, StandardEntitlement.SCHEMA_DELETE, true);
- return columns;
+ return panel;
}
protected final class SchemaProvider extends DirectoryDataProvider<AbstractSchemaTO> {
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/java/org/apache/syncope/client/console/panels/SecurityQuestionsPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/SecurityQuestionsPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/SecurityQuestionsPanel.java
index 312c409..c7748d0 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/SecurityQuestionsPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/SecurityQuestionsPanel.java
@@ -32,10 +32,9 @@ import org.apache.syncope.client.console.commons.SortableDataProviderComparator;
import org.apache.syncope.client.console.pages.BasePage;
import org.apache.syncope.client.console.panels.SecurityQuestionsPanel.SecurityQuestionsProvider;
import org.apache.syncope.client.console.rest.SecurityQuestionRestClient;
-import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.ActionColumn;
import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.KeyPropertyColumn;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
-import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionsPanel;
import org.apache.syncope.client.console.wizards.AbstractModalPanelBuilder;
import org.apache.syncope.client.console.wizards.AjaxWizard;
import org.apache.syncope.client.console.wizards.WizardMgtPanel;
@@ -50,7 +49,6 @@ import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn;
import org.apache.wicket.extensions.markup.html.repeater.data.table.PropertyColumn;
import org.apache.wicket.model.CompoundPropertyModel;
import org.apache.wicket.model.IModel;
-import org.apache.wicket.model.ResourceModel;
import org.apache.wicket.model.StringResourceModel;
public class SecurityQuestionsPanel extends DirectoryPanel<
@@ -129,72 +127,47 @@ public class SecurityQuestionsPanel extends DirectoryPanel<
List<IColumn<SecurityQuestionTO, String>> columns = new ArrayList<>();
columns.add(new KeyPropertyColumn<SecurityQuestionTO>(
- new StringResourceModel("key", this), "key", "key"));
-
+ new StringResourceModel("key", this), "key"));
columns.add(new PropertyColumn<SecurityQuestionTO, String>(
new StringResourceModel("content", this), "content", "content"));
- columns.add(new ActionColumn<SecurityQuestionTO, String>(new ResourceModel("actions")) {
+ return columns;
+ }
- private static final long serialVersionUID = -8089193528195091515L;
+ @Override
+ public ActionsPanel<SecurityQuestionTO> getActions(final IModel<SecurityQuestionTO> model) {
+ final ActionsPanel<SecurityQuestionTO> panel = super.getActions(model);
- @Override
- public ActionLinksPanel<SecurityQuestionTO> getActions(
- final String componentId, final IModel<SecurityQuestionTO> model) {
-
- ActionLinksPanel<SecurityQuestionTO> panel = ActionLinksPanel.<SecurityQuestionTO>builder().
- add(new ActionLink<SecurityQuestionTO>() {
-
- private static final long serialVersionUID = -3722207913631435501L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final SecurityQuestionTO ignore) {
- send(SecurityQuestionsPanel.this, Broadcast.EXACT,
- new AjaxWizard.EditItemActionEvent<>(model.getObject(), target));
- }
- }, ActionLink.ActionType.EDIT, StandardEntitlement.SECURITY_QUESTION_UPDATE).
- add(new ActionLink<SecurityQuestionTO>() {
-
- private static final long serialVersionUID = -3722207913631435501L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final SecurityQuestionTO ignore) {
- try {
- restClient.delete(model.getObject().getKey());
- SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));
- target.add(container);
- } catch (Exception e) {
- LOG.error("While deleting {}", model.getObject(), e);
- SyncopeConsoleSession.get().error(StringUtils.isBlank(e.getMessage())
- ? e.getClass().getName() : e.getMessage());
- }
- ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target);
- }
- }, ActionLink.ActionType.DELETE, StandardEntitlement.TASK_DELETE).
- build(componentId);
-
- return panel;
- }
+ panel.add(new ActionLink<SecurityQuestionTO>() {
- @Override
- public ActionLinksPanel<SecurityQuestionTO> getHeader(final String componentId) {
- final ActionLinksPanel.Builder<SecurityQuestionTO> panel = ActionLinksPanel.builder();
+ private static final long serialVersionUID = -3722207913631435501L;
- return panel.add(new ActionLink<SecurityQuestionTO>() {
+ @Override
+ public void onClick(final AjaxRequestTarget target, final SecurityQuestionTO ignore) {
+ send(SecurityQuestionsPanel.this, Broadcast.EXACT,
+ new AjaxWizard.EditItemActionEvent<>(model.getObject(), target));
+ }
+ }, ActionLink.ActionType.EDIT, StandardEntitlement.SECURITY_QUESTION_UPDATE);
+ panel.add(new ActionLink<SecurityQuestionTO>() {
- private static final long serialVersionUID = -1140254463922516111L;
+ private static final long serialVersionUID = -3722207913631435501L;
- @Override
- public void onClick(final AjaxRequestTarget target, final SecurityQuestionTO ignore) {
- if (target != null) {
- target.add(container);
- }
- }
- }, ActionLink.ActionType.RELOAD).build(componentId);
+ @Override
+ public void onClick(final AjaxRequestTarget target, final SecurityQuestionTO ignore) {
+ try {
+ restClient.delete(model.getObject().getKey());
+ SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));
+ target.add(container);
+ } catch (Exception e) {
+ LOG.error("While deleting {}", model.getObject(), e);
+ SyncopeConsoleSession.get().error(StringUtils.isBlank(e.getMessage())
+ ? e.getClass().getName() : e.getMessage());
+ }
+ ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target);
}
- });
+ }, ActionLink.ActionType.DELETE, StandardEntitlement.TASK_DELETE, true);
- return columns;
+ return panel;
}
protected final class SecurityQuestionsProvider extends DirectoryDataProvider<SecurityQuestionTO> {
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/java/org/apache/syncope/client/console/panels/TogglePanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/TogglePanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/TogglePanel.java
index 52ad84d..436d332 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/TogglePanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/TogglePanel.java
@@ -118,8 +118,7 @@ public abstract class TogglePanel<T extends Serializable> extends WizardMgtPanel
target.add(this.header);
}
- protected void close(final AjaxRequestTarget target) {
- status = Status.INACTIVE;
+ public void close(final AjaxRequestTarget target) {
toggle(target, false);
}
@@ -136,13 +135,13 @@ public abstract class TogglePanel<T extends Serializable> extends WizardMgtPanel
target.add(TogglePanel.this.container);
target.appendJavaScript(
selector + ".toggle(\"slow\");"
- + selector + ".attr(\"class\", \"topology-menu active-topology-menu\");");
+ + selector + ".attr(\"class\", \"toggle-menu active-toggle-menu\");");
status = Status.ACTIVE;
}
} else if (status == Status.ACTIVE) {
target.appendJavaScript(
selector + ".toggle(\"slow\");"
- + selector + ".attr(\"class\", \"topology-menu inactive-topology-menu\");");
+ + selector + ".attr(\"class\", \"toggle-menu inactive-toggle-menu\");");
status = Status.INACTIVE;
}
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/java/org/apache/syncope/client/console/panels/TypeExtensionDirectoryPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/TypeExtensionDirectoryPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/TypeExtensionDirectoryPanel.java
index 2eefdfc..7b5f682 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/TypeExtensionDirectoryPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/TypeExtensionDirectoryPanel.java
@@ -24,6 +24,7 @@ import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
+import org.apache.commons.lang3.StringUtils;
import org.apache.syncope.client.console.SyncopeConsoleSession;
import org.apache.syncope.client.console.commons.Constants;
import org.apache.syncope.client.console.commons.DirectoryDataProvider;
@@ -31,10 +32,9 @@ import org.apache.syncope.client.console.pages.BasePage;
import org.apache.syncope.client.console.panels.TypeExtensionDirectoryPanel.TypeExtensionDataProvider;
import org.apache.syncope.client.console.rest.BaseRestClient;
import org.apache.syncope.client.console.rest.GroupRestClient;
-import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.ActionColumn;
import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
-import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionsPanel;
import org.apache.syncope.client.console.wizards.AjaxWizard;
import org.apache.syncope.client.console.wizards.any.TypeExtensionWizardBuilder;
import org.apache.syncope.common.lib.patch.GroupPatch;
@@ -50,7 +50,6 @@ import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.model.CompoundPropertyModel;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.Model;
-import org.apache.wicket.model.ResourceModel;
import org.apache.wicket.model.StringResourceModel;
public class TypeExtensionDirectoryPanel
@@ -131,40 +130,36 @@ public class TypeExtensionDirectoryPanel
columns.add(new PropertyColumn<TypeExtensionTO, String>(
new StringResourceModel("auxClasses", this), "auxClasses", "auxClasses"));
- columns.add(new ActionColumn<TypeExtensionTO, String>(new ResourceModel("actions", "")) {
-
- private static final long serialVersionUID = 2054811145491901166L;
-
- @Override
- public ActionLinksPanel<TypeExtensionTO> getActions(
- final String componentId, final IModel<TypeExtensionTO> model) {
+ return columns;
+ }
- final TypeExtensionTO typeExtension = model.getObject();
+ @Override
+ public ActionsPanel<TypeExtensionTO> getActions(final IModel<TypeExtensionTO> model) {
+ final ActionsPanel<TypeExtensionTO> panel = super.getActions(model);
+ final TypeExtensionTO typeExtension = model.getObject();
- return ActionLinksPanel.<TypeExtensionTO>builder().add(new ActionLink<TypeExtensionTO>() {
+ panel.add(new ActionLink<TypeExtensionTO>() {
- private static final long serialVersionUID = -3722207913631435501L;
+ private static final long serialVersionUID = -3722207913631435501L;
- @Override
- public void onClick(final AjaxRequestTarget target, final TypeExtensionTO ignore) {
- send(TypeExtensionDirectoryPanel.this, Broadcast.EXACT,
- new AjaxWizard.EditItemActionEvent<>(typeExtension, target));
- }
- }, ActionLink.ActionType.EDIT).add(new ActionLink<TypeExtensionTO>() {
+ @Override
+ public void onClick(final AjaxRequestTarget target, final TypeExtensionTO ignore) {
+ send(TypeExtensionDirectoryPanel.this, Broadcast.EXACT,
+ new AjaxWizard.EditItemActionEvent<>(typeExtension, target));
+ }
+ }, ActionLink.ActionType.EDIT, StringUtils.EMPTY);
+ panel.add(new ActionLink<TypeExtensionTO>() {
- private static final long serialVersionUID = -3722207913631435501L;
+ private static final long serialVersionUID = -3722207913631435501L;
- @Override
- public void onClick(final AjaxRequestTarget target, final TypeExtensionTO ignore) {
- groupTO.getTypeExtensions().remove(
- groupTO.getTypeExtension(typeExtension.getAnyType()));
- target.add(container);
- }
- }, ActionLink.ActionType.DELETE).build(componentId);
+ @Override
+ public void onClick(final AjaxRequestTarget target, final TypeExtensionTO ignore) {
+ groupTO.getTypeExtensions().remove(
+ groupTO.getTypeExtension(typeExtension.getAnyType()));
+ target.add(container);
}
- });
-
- return columns;
+ }, ActionLink.ActionType.DELETE, StringUtils.EMPTY, true);
+ return panel;
}
@Override
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/java/org/apache/syncope/client/console/panels/UserDirectoryPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/UserDirectoryPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/UserDirectoryPanel.java
index 80c958f..ad8bbec 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/UserDirectoryPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/UserDirectoryPanel.java
@@ -33,11 +33,11 @@ import org.apache.syncope.client.console.rest.UserRestClient;
import org.apache.syncope.client.console.status.AnyStatusModal;
import org.apache.syncope.client.console.status.ChangePasswordModal;
import org.apache.syncope.client.console.tasks.AnyPropagationTasks;
-import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.ActionColumn;
import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.AttrColumn;
+import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.KeyPropertyColumn;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink.ActionType;
-import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionsPanel;
import org.apache.syncope.client.console.wizards.AjaxWizard;
import org.apache.syncope.client.console.wizards.WizardMgtPanel;
import org.apache.syncope.client.console.wizards.any.AnyWrapper;
@@ -100,246 +100,251 @@ public class UserDirectoryPanel extends AnyDirectoryPanel<UserTO, UserRestClient
}
@Override
+ public ActionsPanel<Serializable> getHeader(final String componentId) {
+ final ActionsPanel<Serializable> panel = super.getHeader(componentId);
+
+ panel.add(new ActionLink<Serializable>() {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target, final Serializable ignore) {
+ target.add(displayAttributeModal.setContent(new UserDisplayAttributesModalPanel<>(
+ displayAttributeModal, page.getPageReference(), pSchemaNames, dSchemaNames)));
+
+ displayAttributeModal.header(new ResourceModel("any.attr.display"));
+ displayAttributeModal.addSubmitButton();
+ displayAttributeModal.show(true);
+ }
+
+ @Override
+ protected boolean statusCondition(final Serializable modelObject) {
+ return wizardInModal;
+ }
+ }, ActionType.CHANGE_VIEW, StandardEntitlement.USER_READ).hideLabel();
+ return panel;
+ }
+
+ @Override
protected List<IColumn<UserTO, String>> getColumns() {
final List<IColumn<UserTO, String>> columns = new ArrayList<>();
+ final List<IColumn<UserTO, String>> prefcolumns = new ArrayList<IColumn<UserTO, String>>();
+
+ columns.add(new KeyPropertyColumn<UserTO>(
+ new ResourceModel(Constants.KEY_FIELD_NAME, Constants.KEY_FIELD_NAME), Constants.KEY_FIELD_NAME));
for (String name : prefMan.getList(getRequest(), Constants.PREF_USERS_DETAILS_VIEW)) {
- addPropertyColumn(name, ReflectionUtils.findField(UserTO.class, name), columns);
+ if (!Constants.KEY_FIELD_NAME.equalsIgnoreCase(name)) {
+ addPropertyColumn(name, ReflectionUtils.findField(UserTO.class, name), prefcolumns);
+ }
}
for (String name : prefMan.getList(getRequest(), Constants.PREF_USERS_PLAIN_ATTRS_VIEW)) {
if (pSchemaNames.contains(name)) {
- columns.add(new AttrColumn<UserTO>(name, SchemaType.PLAIN));
+ prefcolumns.add(new AttrColumn<UserTO>(name, SchemaType.PLAIN));
}
}
for (String name : prefMan.getList(getRequest(), Constants.PREF_USERS_DER_ATTRS_VIEW)) {
if (dSchemaNames.contains(name)) {
- columns.add(new AttrColumn<UserTO>(name, SchemaType.DERIVED));
+ prefcolumns.add(new AttrColumn<UserTO>(name, SchemaType.DERIVED));
}
}
// Add defaults in case of no selection
- if (columns.isEmpty()) {
+ if (prefcolumns.isEmpty()) {
for (String name : UserDisplayAttributesModalPanel.DEFAULT_SELECTION) {
- addPropertyColumn(name, ReflectionUtils.findField(UserTO.class, name), columns);
+ addPropertyColumn(name, ReflectionUtils.findField(UserTO.class, name), prefcolumns);
}
prefMan.setList(getRequest(), getResponse(), Constants.PREF_USERS_DETAILS_VIEW,
Arrays.asList(UserDisplayAttributesModalPanel.DEFAULT_SELECTION));
}
- columns.add(new ActionColumn<UserTO, String>(new ResourceModel("actions")) {
+ columns.addAll(prefcolumns);
+ return columns;
+ }
+
+ @Override
+ public ActionsPanel<UserTO> getActions(final IModel<UserTO> model) {
+ final ActionsPanel<UserTO> panel = super.getActions(model);
+
+ panel.add(new ActionLink<UserTO>() {
- private static final long serialVersionUID = -3503023501954863131L;
+ private static final long serialVersionUID = -7978723352517770644L;
@Override
- public ActionLinksPanel<UserTO> getActions(final String componentId, final IModel<UserTO> model) {
- final ActionLinksPanel.Builder<UserTO> panel = ActionLinksPanel.builder();
-
- panel.add(new ActionLink<UserTO>() {
-
- private static final long serialVersionUID = -7978723352517770644L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final UserTO ignore) {
- try {
- UserRestClient.class.cast(restClient).mustChangePassword(
- model.getObject().getETagValue(),
- !model.getObject().isMustChangePassword(),
- model.getObject().getKey());
- SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));
- target.add(container);
- } catch (Exception e) {
- LOG.error("While deleting object {}", model.getObject().getKey(), e);
- SyncopeConsoleSession.get().error(StringUtils.isBlank(e.getMessage()) ? e.getClass().
- getName() : e.getMessage());
- }
- ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target);
- }
- }, ActionType.MUSTCHANGEPASSWORD, StandardEntitlement.USER_UPDATE).add(new ActionLink<UserTO>() {
-
- private static final long serialVersionUID = -7978723352517770644L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final UserTO ignore) {
- send(UserDirectoryPanel.this, Broadcast.EXACT,
- new AjaxWizard.EditItemActionEvent<>(
- new UserWrapper(new UserRestClient().read(model.getObject().getKey())),
- target));
- }
- }, ActionType.EDIT, new StringBuilder().append(StandardEntitlement.USER_READ).append(",").
- append(StandardEntitlement.USER_UPDATE).toString()).add(new ActionLink<UserTO>() {
-
- private static final long serialVersionUID = -7978723352517770644L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final UserTO ignore) {
- UserTO clone = SerializationUtils.clone(model.getObject());
- clone.setKey(null);
- clone.setUsername(model.getObject().getUsername() + "_clone");
- send(UserDirectoryPanel.this, Broadcast.EXACT,
- new AjaxWizard.NewItemActionEvent<>(new UserWrapper(clone), target));
- }
-
- @Override
- protected boolean statusCondition(final UserTO modelObject) {
- return addAjaxLink.isVisibleInHierarchy();
- }
-
- }, ActionType.CLONE, StandardEntitlement.USER_CREATE).add(new ActionLink<UserTO>() {
-
- private static final long serialVersionUID = -7978723352517770644L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final UserTO ignore) {
- try {
- restClient.delete(model.getObject().getETagValue(), model.getObject().getKey());
- SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));
- target.add(container);
- } catch (Exception e) {
- LOG.error("While deleting object {}", model.getObject().getKey(), e);
- SyncopeConsoleSession.get().error(StringUtils.isBlank(e.getMessage()) ? e.getClass().
- getName() : e.getMessage());
- }
- ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target);
- }
- }, ActionType.DELETE, StandardEntitlement.USER_DELETE);
-
- if (wizardInModal) {
- panel.add(new ActionLink<UserTO>() {
-
- private static final long serialVersionUID = -7978723352517770644L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final UserTO ignore) {
- IModel<AnyWrapper<UserTO>> formModel = new CompoundPropertyModel<>(
- new AnyWrapper<>(model.getObject()));
- altDefaultModal.setFormModel(formModel);
-
- target.add(altDefaultModal.setContent(new AnyStatusModal<>(
- altDefaultModal,
- pageRef,
- formModel.getObject().getInnerObject(),
- "resourceName",
- false)));
-
- altDefaultModal.header(new Model<>(
- getString("any.edit", new Model<>(new AnyWrapper<>(model.getObject())))));
-
- altDefaultModal.show(true);
- }
- }, ActionType.MANAGE_RESOURCES, StandardEntitlement.USER_UPDATE).add(new ActionLink<UserTO>() {
-
- private static final long serialVersionUID = -7978723352517770644L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final UserTO ignore) {
- IModel<AnyWrapper<UserTO>> formModel = new CompoundPropertyModel<>(
- new AnyWrapper<>(model.getObject()));
- altDefaultModal.setFormModel(formModel);
-
- target.add(altDefaultModal.setContent(new AnyStatusModal<>(
- altDefaultModal,
- pageRef,
- formModel.getObject().getInnerObject(),
- "resourceName",
- true)));
-
- altDefaultModal.header(new Model<>(
- getString("any.edit", new Model<>(new AnyWrapper<>(model.getObject())))));
-
- altDefaultModal.show(true);
- }
- }, ActionType.ENABLE, StandardEntitlement.USER_UPDATE).add(new ActionLink<UserTO>() {
-
- private static final long serialVersionUID = -7978723352517770644L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final UserTO ignore) {
- target.add(utilityModal.setContent(new AnyPropagationTasks(
- utilityModal, AnyTypeKind.USER, model.getObject().getKey(), pageRef)));
-
- utilityModal.header(new StringResourceModel("any.propagation.tasks", model));
- utilityModal.show(true);
- }
- }, ActionType.PROPAGATION_TASKS, StandardEntitlement.TASK_LIST).add(new ActionLink<UserTO>() {
-
- private static final long serialVersionUID = -7978723352517770644L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final UserTO ignore) {
- target.add(utilityModal.setContent(
- new NotificationTasks(AnyTypeKind.USER, model.getObject().getKey(), pageRef)));
- utilityModal.header(new StringResourceModel("any.notification.tasks", model));
- utilityModal.show(true);
- target.add(utilityModal);
- }
- }, ActionType.NOTIFICATION_TASKS, StandardEntitlement.TASK_LIST).add(new ActionLink<UserTO>() {
-
- private static final long serialVersionUID = -4875218360625971340L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final UserTO ignore) {
- IModel<AnyWrapper<UserTO>> formModel = new CompoundPropertyModel<>(
- new AnyWrapper<>(model.getObject()));
- displayAttributeModal.setFormModel(formModel);
-
- target.add(displayAttributeModal.setContent(new ChangePasswordModal(
- displayAttributeModal,
- pageRef,
- new UserWrapper(model.getObject()))));
-
- displayAttributeModal.header(new Model<>(
- getString("any.edit", new Model<>(new AnyWrapper<>(model.getObject())))));
-
- displayAttributeModal.show(true);
- }
- }, ActionType.PASSWORD_RESET,
- new StringBuilder().append(StandardEntitlement.USER_UPDATE).toString());
- }
+ public void onClick(final AjaxRequestTarget target, final UserTO ignore) {
+ send(UserDirectoryPanel.this, Broadcast.EXACT,
+ new AjaxWizard.EditItemActionEvent<>(
+ new UserWrapper(new UserRestClient().read(model.getObject().getKey())),
+ target));
+ }
+ }, ActionType.EDIT, new StringBuilder().append(StandardEntitlement.USER_READ).append(",").
+ append(StandardEntitlement.USER_UPDATE).toString());
+
+ panel.add(new ActionLink<UserTO>() {
- return panel.build(componentId, model.getObject());
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target, final UserTO ignore) {
+ UserTO clone = SerializationUtils.clone(model.getObject());
+ clone.setKey(null);
+ clone.setUsername(model.getObject().getUsername() + "_clone");
+ send(UserDirectoryPanel.this, Broadcast.EXACT,
+ new AjaxWizard.NewItemActionEvent<>(new UserWrapper(clone), target));
}
@Override
- public ActionLinksPanel<Serializable> getHeader(final String componentId) {
- final ActionLinksPanel.Builder<Serializable> panel = ActionLinksPanel.builder();
-
- return panel.add(new ActionLink<Serializable>() {
-
- private static final long serialVersionUID = -7978723352517770644L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final Serializable ignore) {
- target.add(displayAttributeModal.setContent(new UserDisplayAttributesModalPanel<>(
- displayAttributeModal, page.getPageReference(), pSchemaNames, dSchemaNames)));
-
- displayAttributeModal.header(new ResourceModel("any.attr.display"));
- displayAttributeModal.addSubmitButton();
- displayAttributeModal.show(true);
- }
-
- @Override
- protected boolean statusCondition(final Serializable modelObject) {
- return wizardInModal;
- }
- }, ActionType.CHANGE_VIEW, StandardEntitlement.USER_READ).add(
- new ActionLink<Serializable>() {
-
- private static final long serialVersionUID = -7978723352517770644L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final Serializable ignore) {
- if (target != null) {
- target.add(container);
- }
- }
- }, ActionType.RELOAD, StandardEntitlement.USER_SEARCH).build(componentId);
+ protected boolean statusCondition(final UserTO modelObject) {
+ return addAjaxLink.isVisibleInHierarchy();
}
- });
- return columns;
+ }, ActionType.CLONE, StandardEntitlement.USER_CREATE);
+
+ panel.add(new ActionLink<UserTO>() {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target, final UserTO ignore) {
+ try {
+ UserRestClient.class.cast(restClient).mustChangePassword(
+ model.getObject().getETagValue(),
+ !model.getObject().isMustChangePassword(),
+ model.getObject().getKey());
+ SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));
+ target.add(container);
+ } catch (Exception e) {
+ LOG.error("While deleting object {}", model.getObject().getKey(), e);
+ SyncopeConsoleSession.get().error(StringUtils.isBlank(e.getMessage()) ? e.getClass().
+ getName() : e.getMessage());
+ }
+ ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target);
+ }
+ }, ActionType.MUSTCHANGEPASSWORD, StandardEntitlement.USER_UPDATE);
+
+ if (wizardInModal) {
+ panel.add(new ActionLink<UserTO>() {
+
+ private static final long serialVersionUID = -4875218360625971340L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target, final UserTO ignore) {
+ IModel<AnyWrapper<UserTO>> formModel = new CompoundPropertyModel<>(
+ new AnyWrapper<>(model.getObject()));
+ displayAttributeModal.setFormModel(formModel);
+
+ target.add(displayAttributeModal.setContent(new ChangePasswordModal(
+ displayAttributeModal,
+ pageRef,
+ new UserWrapper(model.getObject()))));
+
+ displayAttributeModal.header(new Model<>(
+ getString("any.edit", new Model<>(new AnyWrapper<>(model.getObject())))));
+
+ displayAttributeModal.show(true);
+ }
+ }, ActionType.PASSWORD_RESET,
+ new StringBuilder().append(StandardEntitlement.USER_UPDATE).toString());
+
+ panel.add(new ActionLink<UserTO>() {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target, final UserTO ignore) {
+ IModel<AnyWrapper<UserTO>> formModel = new CompoundPropertyModel<>(
+ new AnyWrapper<>(model.getObject()));
+ altDefaultModal.setFormModel(formModel);
+
+ target.add(altDefaultModal.setContent(new AnyStatusModal<>(
+ altDefaultModal,
+ pageRef,
+ formModel.getObject().getInnerObject(),
+ "resourceName",
+ true)));
+
+ altDefaultModal.header(new Model<>(
+ getString("any.edit", new Model<>(new AnyWrapper<>(model.getObject())))));
+
+ altDefaultModal.show(true);
+ }
+ }, ActionType.ENABLE, StandardEntitlement.USER_UPDATE);
+
+ panel.add(new ActionLink<UserTO>() {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target, final UserTO ignore) {
+ IModel<AnyWrapper<UserTO>> formModel = new CompoundPropertyModel<>(
+ new AnyWrapper<>(model.getObject()));
+ altDefaultModal.setFormModel(formModel);
+
+ target.add(altDefaultModal.setContent(new AnyStatusModal<>(
+ altDefaultModal,
+ pageRef,
+ formModel.getObject().getInnerObject(),
+ "resourceName",
+ false)));
+
+ altDefaultModal.header(new Model<>(
+ getString("any.edit", new Model<>(new AnyWrapper<>(model.getObject())))));
+
+ altDefaultModal.show(true);
+ }
+ }, ActionType.MANAGE_RESOURCES, StandardEntitlement.USER_UPDATE);
+
+ panel.add(new ActionLink<UserTO>() {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target, final UserTO ignore) {
+ target.add(utilityModal.setContent(new AnyPropagationTasks(
+ utilityModal, AnyTypeKind.USER, model.getObject().getKey(), pageRef)));
+
+ utilityModal.header(new StringResourceModel("any.propagation.tasks", model));
+ utilityModal.show(true);
+ }
+ }, ActionType.PROPAGATION_TASKS, StandardEntitlement.TASK_LIST);
+ panel.add(new ActionLink<UserTO>() {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target, final UserTO ignore) {
+ target.add(utilityModal.setContent(
+ new NotificationTasks(AnyTypeKind.USER, model.getObject().getKey(), pageRef)));
+ utilityModal.header(new StringResourceModel("any.notification.tasks", model));
+ utilityModal.show(true);
+ target.add(utilityModal);
+ }
+ }, ActionType.NOTIFICATION_TASKS, StandardEntitlement.TASK_LIST);
+ }
+
+ panel.add(new ActionLink<UserTO>() {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target, final UserTO ignore) {
+ try {
+ restClient.delete(model.getObject().getETagValue(), model.getObject().getKey());
+ SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));
+ target.add(container);
+ } catch (Exception e) {
+ LOG.error("While deleting object {}", model.getObject().getKey(), e);
+ SyncopeConsoleSession.get().error(StringUtils.isBlank(e.getMessage()) ? e.getClass().
+ getName() : e.getMessage());
+ }
+ ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target);
+ }
+ }, ActionType.DELETE, StandardEntitlement.USER_DELETE, true);
+
+ return panel;
}
public static class Builder extends AnyDirectoryPanel.Builder<UserTO, UserRestClient> {
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/java/org/apache/syncope/client/console/panels/UserDisplayAttributesModalPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/UserDisplayAttributesModalPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/UserDisplayAttributesModalPanel.java
index 1ef96ca..513ec9d 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/UserDisplayAttributesModalPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/UserDisplayAttributesModalPanel.java
@@ -35,7 +35,7 @@ public class UserDisplayAttributesModalPanel<T extends Serializable> extends Dis
private static final long serialVersionUID = 5194630813773543054L;
- public static final String[] DEFAULT_SELECTION = { "key", "username", "status", "mustChangePassword" };
+ public static final String[] DEFAULT_SELECTION = { "username", "status", "mustChangePassword" };
public UserDisplayAttributesModalPanel(
final BaseModal<T> modal,
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/java/org/apache/syncope/client/console/panels/WorkflowDirectoryPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/WorkflowDirectoryPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/WorkflowDirectoryPanel.java
index 8b5eece..2217da0 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/WorkflowDirectoryPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/WorkflowDirectoryPanel.java
@@ -37,12 +37,11 @@ import org.apache.syncope.client.console.pages.BasePage;
import org.apache.syncope.client.console.pages.ModelerPopupPage;
import org.apache.syncope.client.console.panels.WorkflowDirectoryPanel.WorkflowDefinitionDataProvider;
import org.apache.syncope.client.console.rest.WorkflowRestClient;
-import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.ActionColumn;
import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.BooleanPropertyColumn;
import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.KeyPropertyColumn;
import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
-import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionsPanel;
import org.apache.syncope.client.console.wicket.markup.html.form.ImageModalPanel;
import org.apache.syncope.client.console.wicket.markup.html.form.XMLEditorPanel;
import org.apache.syncope.client.console.wizards.AjaxWizardBuilder;
@@ -155,142 +154,130 @@ public class WorkflowDirectoryPanel extends DirectoryPanel<
protected List<IColumn<WorkflowDefinitionTO, String>> getColumns() {
List<IColumn<WorkflowDefinitionTO, String>> columns = new ArrayList<>();
- columns.add(new KeyPropertyColumn<WorkflowDefinitionTO>(new ResourceModel("key"), "key", "key"));
+ columns.add(new KeyPropertyColumn<WorkflowDefinitionTO>(new ResourceModel("key"), "key"));
columns.add(new PropertyColumn<WorkflowDefinitionTO, String>(new ResourceModel("name"), "name", "name"));
columns.add(new BooleanPropertyColumn<WorkflowDefinitionTO>(new ResourceModel("main"), null, "main"));
- columns.add(new ActionColumn<WorkflowDefinitionTO, String>(new ResourceModel("actions")) {
-
- private static final long serialVersionUID = 906457126287899096L;
+ return columns;
+ }
- @Override
- public ActionLinksPanel<?> getActions(final String componentId, final IModel<WorkflowDefinitionTO> model) {
- final ActionLinksPanel.Builder<WorkflowDefinitionTO> panel = ActionLinksPanel.builder();
+ @Override
+ public ActionsPanel<WorkflowDefinitionTO> getActions(final IModel<WorkflowDefinitionTO> model) {
+ final ActionsPanel<WorkflowDefinitionTO> panel = super.getActions(model);
- panel.add(new ActionLink<WorkflowDefinitionTO>() {
+ panel.add(new ActionLink<WorkflowDefinitionTO>() {
- private static final long serialVersionUID = 3109256773218160485L;
+ private static final long serialVersionUID = -184018732772021627L;
- @Override
- public void onClick(final AjaxRequestTarget target, final WorkflowDefinitionTO ignore) {
- modal.header(Model.of(model.getObject().getKey()));
- modal.setContent(new ImageModalPanel<>(
- modal, restClient.getDiagram(model.getObject().getKey()), pageRef));
- modal.show(target);
- target.add(modal);
- }
- }, ActionLink.ActionType.VIEW, StandardEntitlement.WORKFLOW_DEF_GET);
+ @Override
+ public void onClick(final AjaxRequestTarget target, final WorkflowDefinitionTO ignore) {
+ final IModel<String> wfDefinition = new Model<>();
+ try {
+ wfDefinition.setObject(IOUtils.toString(restClient.getDefinition(
+ MediaType.APPLICATION_XML_TYPE, model.getObject().getKey())));
+ } catch (IOException e) {
+ LOG.error("Could not get workflow definition", e);
+ }
- panel.add(new ActionLink<WorkflowDefinitionTO>() {
+ utility.header(Model.of(model.getObject().getKey()));
+ utility.setContent(new XMLEditorPanel(utility, wfDefinition, false, pageRef) {
- private static final long serialVersionUID = -184018732772021627L;
+ private static final long serialVersionUID = -7688359318035249200L;
@Override
- public void onClick(final AjaxRequestTarget target, final WorkflowDefinitionTO ignore) {
- final IModel<String> wfDefinition = new Model<>();
- try {
- wfDefinition.setObject(IOUtils.toString(restClient.getDefinition(
- MediaType.APPLICATION_XML_TYPE, model.getObject().getKey())));
- } catch (IOException e) {
- LOG.error("Could not get workflow definition", e);
- }
-
- utility.header(Model.of(model.getObject().getKey()));
- utility.setContent(new XMLEditorPanel(utility, wfDefinition, false, pageRef) {
-
- private static final long serialVersionUID = -7688359318035249200L;
-
- @Override
- public void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
- if (StringUtils.isNotBlank(wfDefinition.getObject())) {
- try {
- restClient.setDefinition(MediaType.APPLICATION_XML_TYPE,
- model.getObject().getKey(), wfDefinition.getObject());
- SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));
-
- target.add(container);
- utility.show(false);
- utility.close(target);
- } catch (SyncopeClientException e) {
- SyncopeConsoleSession.get().error(StringUtils.isBlank(e.getMessage())
- ? e.getClass().getName() : e.getMessage());
- }
- ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target);
- }
+ public void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
+ if (StringUtils.isNotBlank(wfDefinition.getObject())) {
+ try {
+ restClient.setDefinition(MediaType.APPLICATION_XML_TYPE,
+ model.getObject().getKey(), wfDefinition.getObject());
+ SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));
+
+ target.add(container);
+ utility.show(false);
+ utility.close(target);
+ } catch (SyncopeClientException e) {
+ SyncopeConsoleSession.get().error(StringUtils.isBlank(e.getMessage())
+ ? e.getClass().getName() : e.getMessage());
}
- });
- utility.show(target);
- target.add(utility);
+ ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target);
+ }
}
- }, ActionLink.ActionType.EDIT, StandardEntitlement.WORKFLOW_DEF_SET);
-
- panel.add(new ActionLink<WorkflowDefinitionTO>() {
+ });
+ utility.show(target);
+ target.add(utility);
+ }
+ }, ActionLink.ActionType.EDIT, StandardEntitlement.WORKFLOW_DEF_SET);
- private static final long serialVersionUID = -184018732772021627L;
+ panel.add(new ActionLink<WorkflowDefinitionTO>() {
- @Override
- public Class<? extends Page> getPageClass() {
- return ModelerPopupPage.class;
- }
+ private static final long serialVersionUID = 3109256773218160485L;
- @Override
- public PageParameters getPageParameters() {
- PageParameters parameters = new PageParameters();
- if (modelerCtx != null) {
- parameters.add(Constants.MODELER_CONTEXT, modelerCtx);
- }
- parameters.add(Constants.MODEL_ID_PARAM, model.getObject().getModelId());
+ @Override
+ public void onClick(final AjaxRequestTarget target, final WorkflowDefinitionTO ignore) {
+ modal.header(Model.of(model.getObject().getKey()));
+ modal.setContent(new ImageModalPanel<>(
+ modal, restClient.getDiagram(model.getObject().getKey()), pageRef));
+ modal.show(target);
+ target.add(modal);
+ }
+ }, ActionLink.ActionType.VIEW, StandardEntitlement.WORKFLOW_DEF_GET);
- return parameters;
- }
+ panel.add(new ActionLink<WorkflowDefinitionTO>() {
- @Override
- public void onClick(final AjaxRequestTarget target, final WorkflowDefinitionTO ignore) {
- // do nothing
- }
- }, ActionLink.ActionType.WORKFLOW_MODELER, StandardEntitlement.WORKFLOW_DEF_SET, modelerCtx != null);
+ private static final long serialVersionUID = -184018732772021627L;
- panel.add(new ActionLink<WorkflowDefinitionTO>() {
+ @Override
+ public Class<? extends Page> getPageClass() {
+ return ModelerPopupPage.class;
+ }
- private static final long serialVersionUID = -7978723352517770644L;
+ @Override
+ public PageParameters getPageParameters() {
+ PageParameters parameters = new PageParameters();
+ if (modelerCtx != null) {
+ parameters.add(Constants.MODELER_CONTEXT, modelerCtx);
+ }
+ parameters.add(Constants.MODEL_ID_PARAM, model.getObject().getModelId());
- @Override
- public void onClick(final AjaxRequestTarget target, final WorkflowDefinitionTO ignore) {
- try {
- restClient.deleteDefinition(model.getObject().getKey());
- SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));
- target.add(container);
- } catch (SyncopeClientException e) {
- LOG.error("While deleting workflow definition {}", model.getObject().getName(), e);
- SyncopeConsoleSession.get().error(
- StringUtils.isBlank(e.getMessage()) ? e.getClass().getName() : e.getMessage());
- }
- ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target);
- }
- }, ActionLink.ActionType.DELETE, StandardEntitlement.WORKFLOW_DEF_DELETE, !model.getObject().isMain());
+ return parameters;
+ }
- return panel.build(componentId);
+ @Override
+ protected boolean statusCondition(final WorkflowDefinitionTO modelObject) {
+ return modelerCtx != null;
}
@Override
- public ActionLinksPanel<WorkflowDefinitionTO> getHeader(final String componentId) {
- final ActionLinksPanel.Builder<WorkflowDefinitionTO> panel = ActionLinksPanel.builder();
+ public void onClick(final AjaxRequestTarget target, final WorkflowDefinitionTO ignore) {
+ // do nothing
+ }
+ }, ActionLink.ActionType.WORKFLOW_MODELER, StandardEntitlement.WORKFLOW_DEF_SET);
- return panel.add(new ActionLink<WorkflowDefinitionTO>() {
+ panel.add(new ActionLink<WorkflowDefinitionTO>() {
- private static final long serialVersionUID = -184018732772021627L;
+ private static final long serialVersionUID = -7978723352517770644L;
- @Override
- public void onClick(final AjaxRequestTarget target, final WorkflowDefinitionTO ignore) {
- if (target != null) {
- target.add(container);
- }
- }
- }, ActionLink.ActionType.RELOAD, StandardEntitlement.WORKFLOW_DEF_LIST).build(componentId);
+ @Override
+ protected boolean statusCondition(final WorkflowDefinitionTO modelObject) {
+ return !modelObject.isMain();
}
- });
- return columns;
+ @Override
+ public void onClick(final AjaxRequestTarget target, final WorkflowDefinitionTO ignore) {
+ try {
+ restClient.deleteDefinition(model.getObject().getKey());
+ SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));
+ target.add(container);
+ } catch (SyncopeClientException e) {
+ LOG.error("While deleting workflow definition {}", model.getObject().getName(), e);
+ SyncopeConsoleSession.get().error(
+ StringUtils.isBlank(e.getMessage()) ? e.getClass().getName() : e.getMessage());
+ }
+ ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target);
+ }
+ }, ActionLink.ActionType.DELETE, StandardEntitlement.WORKFLOW_DEF_DELETE, true);
+
+ return panel;
}
@Override
http://git-wip-us.apache.org/repos/asf/syncope/blob/2e7e2cee/client/console/src/main/java/org/apache/syncope/client/console/panels/search/AnyObjectSelectionDirectoryPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/search/AnyObjectSelectionDirectoryPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/search/AnyObjectSelectionDirectoryPanel.java
index d89b3ea..8276be9 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/search/AnyObjectSelectionDirectoryPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/search/AnyObjectSelectionDirectoryPanel.java
@@ -20,7 +20,6 @@ package org.apache.syncope.client.console.panels.search;
import java.util.List;
import org.apache.syncope.client.console.commons.Constants;
-import org.apache.syncope.client.console.panels.AnyObjectDisplayAttributesModalPanel;
import org.apache.syncope.client.console.rest.AnyObjectRestClient;
import org.apache.syncope.client.console.wizards.WizardMgtPanel;
import org.apache.syncope.client.console.wizards.any.AnyWrapper;
@@ -43,11 +42,6 @@ public final class AnyObjectSelectionDirectoryPanel
}
@Override
- protected String[] getDisplayAttributes() {
- return AnyObjectDisplayAttributesModalPanel.DEFAULT_SELECTION;
- }
-
- @Override
public String getPrefDetailsView() {
return String.format(Constants.PREF_ANY_OBJECT_DETAILS_VIEW, type);
}