syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ilgro...@apache.org
Subject svn commit: r1446584 [2/6] - in /syncope/branches/1_0_X/console/src/main: java/org/apache/syncope/console/pages/ java/org/apache/syncope/console/pages/panels/ java/org/apache/syncope/console/wicket/ajax/markup/html/ java/org/apache/syncope/console/wick...
Date Fri, 15 Feb 2013 14:00:05 GMT
Modified: syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/Schema.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/Schema.java?rev=1446584&r1=1446583&r2=1446584&view=diff
==============================================================================
--- syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/Schema.java (original)
+++ syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/Schema.java Fri Feb 15 14:00:02 2013
@@ -26,13 +26,22 @@ import org.apache.syncope.client.Abstrac
 import org.apache.syncope.client.to.DerivedSchemaTO;
 import org.apache.syncope.client.to.SchemaTO;
 import org.apache.syncope.client.to.VirtualSchemaTO;
+import org.apache.syncope.console.commons.Constants;
+import org.apache.syncope.console.commons.PreferenceManager;
+import org.apache.syncope.console.commons.SchemaModalPageFactory;
+import org.apache.syncope.console.commons.SelectChoiceRenderer;
+import org.apache.syncope.console.commons.SortableDataProviderComparator;
+import org.apache.syncope.console.rest.SchemaRestClient;
+import org.apache.syncope.console.wicket.ajax.markup.html.ClearIndicatingAjaxLink;
+import org.apache.syncope.console.wicket.markup.html.form.ActionLink;
+import org.apache.syncope.console.wicket.markup.html.form.ActionLink.ActionType;
+import org.apache.syncope.console.wicket.markup.html.form.ActionLinksPanel;
 import org.apache.syncope.types.AttributableType;
 import org.apache.wicket.Page;
 import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
 import org.apache.wicket.ajax.markup.html.AjaxLink;
 import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy;
-import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxLink;
 import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
 import org.apache.wicket.extensions.ajax.markup.html.repeater.data.table.AjaxFallbackDefaultDataTable;
 import org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator;
@@ -51,15 +60,6 @@ import org.apache.wicket.model.PropertyM
 import org.apache.wicket.model.ResourceModel;
 import org.apache.wicket.request.mapper.parameter.PageParameters;
 import org.apache.wicket.spring.injection.annot.SpringBean;
-import org.apache.syncope.console.commons.Constants;
-import org.apache.syncope.console.commons.PreferenceManager;
-import org.apache.syncope.console.commons.SchemaModalPageFactory;
-import org.apache.syncope.console.commons.SelectChoiceRenderer;
-import org.apache.syncope.console.commons.SortableDataProviderComparator;
-import org.apache.syncope.console.rest.SchemaRestClient;
-import org.apache.syncope.console.wicket.markup.html.form.ActionLink;
-import org.apache.syncope.console.wicket.markup.html.form.ActionLink.ActionType;
-import org.apache.syncope.console.wicket.markup.html.form.ActionLinksPanel;
 
 /**
  * Schema WebPage.
@@ -731,7 +731,7 @@ public class Schema extends BasePage {
 
                 final AbstractBaseBean schemaTO = model.getObject();
 
-                final ActionLinksPanel panel = new ActionLinksPanel(componentId, model);
+                final ActionLinksPanel panel = new ActionLinksPanel(componentId, model, getPageReference());
 
                 panel.add(new ActionLink() {
 
@@ -823,13 +823,12 @@ public class Schema extends BasePage {
             final AttributableType attributableType, final SchemaModalPageFactory.SchemaType schemaType,
             final String winLinkName, final String winName, final String createPermissions) {
 
-        AjaxLink createSchemaWinLink = new IndicatingAjaxLink(winLinkName) {
+        AjaxLink createSchemaWinLink = new ClearIndicatingAjaxLink(winLinkName, getPageReference()) {
 
             private static final long serialVersionUID = -7978723352517770644L;
 
             @Override
-            public void onClick(final AjaxRequestTarget target) {
-
+            protected void onClickInternal(final AjaxRequestTarget target) {
                 createSchemaWin.setPageCreator(new ModalWindow.PageCreator() {
 
                     private static final long serialVersionUID = -7834632442532690940L;

Modified: syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/SchemaModalPage.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/SchemaModalPage.java?rev=1446584&r1=1446583&r2=1446584&view=diff
==============================================================================
--- syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/SchemaModalPage.java (original)
+++ syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/SchemaModalPage.java Fri Feb 15 14:00:02 2013
@@ -25,12 +25,21 @@ import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
 import org.apache.commons.lang.StringUtils;
+import org.apache.syncope.client.AbstractBaseBean;
+import org.apache.syncope.client.to.SchemaTO;
+import org.apache.syncope.client.validation.SyncopeClientCompositeErrorException;
+import org.apache.syncope.console.wicket.ajax.markup.html.ClearIndicatingAjaxButton;
+import org.apache.syncope.console.wicket.markup.html.form.AjaxCheckBoxPanel;
+import org.apache.syncope.console.wicket.markup.html.form.AjaxDropDownChoicePanel;
+import org.apache.syncope.console.wicket.markup.html.form.AjaxTextFieldPanel;
+import org.apache.syncope.console.wicket.markup.html.form.MultiValueSelectorPanel;
+import org.apache.syncope.types.AttributableType;
+import org.apache.syncope.types.SchemaType;
 import org.apache.wicket.PageReference;
 import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
 import org.apache.wicket.ajax.markup.html.form.AjaxButton;
 import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy;
-import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxButton;
 import org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteTextField;
 import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
 import org.apache.wicket.markup.html.form.DropDownChoice;
@@ -42,15 +51,6 @@ import org.apache.wicket.model.Model;
 import org.apache.wicket.model.PropertyModel;
 import org.apache.wicket.model.ResourceModel;
 import org.apache.wicket.util.string.Strings;
-import org.apache.syncope.client.AbstractBaseBean;
-import org.apache.syncope.client.to.SchemaTO;
-import org.apache.syncope.client.validation.SyncopeClientCompositeErrorException;
-import org.apache.syncope.console.wicket.markup.html.form.AjaxCheckBoxPanel;
-import org.apache.syncope.console.wicket.markup.html.form.AjaxDropDownChoicePanel;
-import org.apache.syncope.console.wicket.markup.html.form.AjaxTextFieldPanel;
-import org.apache.syncope.console.wicket.markup.html.form.MultiValueSelectorPanel;
-import org.apache.syncope.types.AttributableType;
-import org.apache.syncope.types.SchemaType;
 
 /**
  * Modal window with Schema form.
@@ -64,7 +64,7 @@ public class SchemaModalPage extends Abs
     }
 
     @Override
-    public void setSchemaModalPage(final PageReference callerPageRef, final ModalWindow window,
+    public void setSchemaModalPage(final PageReference pageRef, final ModalWindow window,
             AbstractBaseBean schemaTO, final boolean createFlag) {
         final SchemaTO schema;
         if (schemaTO != null && schemaTO instanceof SchemaTO) {
@@ -203,13 +203,12 @@ public class SchemaModalPage extends Abs
         final AjaxCheckBoxPanel uniqueConstraint = new AjaxCheckBoxPanel("uniqueConstraint",
                 getString("uniqueConstraint"), new PropertyModel<Boolean>(schema, "uniqueConstraint"));
 
-        final AjaxButton submit = new IndicatingAjaxButton("apply", new ResourceModel("submit")) {
+        final AjaxButton submit = new ClearIndicatingAjaxButton("apply", new ResourceModel("submit"), pageRef) {
 
             private static final long serialVersionUID = -958724007591692537L;
 
             @Override
-            protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
-
+            protected void onSubmitInternal(final AjaxRequestTarget target, final Form<?> form) {
                 final SchemaTO schemaTO = (SchemaTO) form.getDefaultModelObject();
 
                 schemaTO.setEnumerationValues(getEnumValuesAsString(enumerationValues.getView().getModelObject()));
@@ -227,8 +226,8 @@ public class SchemaModalPage extends Abs
                     } else {
                         restClient.updateSchema(kind, schemaTO);
                     }
-                    if (callerPageRef.getPage() instanceof BasePage) {
-                        ((BasePage) callerPageRef.getPage()).setModalResult(true);
+                    if (pageRef.getPage() instanceof BasePage) {
+                        ((BasePage) pageRef.getPage()).setModalResult(true);
                     }
 
                     window.close(target);
@@ -240,7 +239,6 @@ public class SchemaModalPage extends Abs
 
             @Override
             protected void onError(final AjaxRequestTarget target, final Form<?> form) {
-
                 target.add(feedbackPanel);
             }
         };

Modified: syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/StatusModalPage.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/StatusModalPage.java?rev=1446584&r1=1446583&r2=1446584&view=diff
==============================================================================
--- syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/StatusModalPage.java (original)
+++ syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/StatusModalPage.java Fri Feb 15 14:00:02 2013
@@ -20,18 +20,18 @@ package org.apache.syncope.console.pages
 
 import java.util.ArrayList;
 import java.util.List;
+import org.apache.syncope.client.to.UserTO;
+import org.apache.syncope.console.commons.StatusBean;
+import org.apache.syncope.console.pages.panels.StatusPanel;
+import org.apache.syncope.console.rest.UserRestClient;
+import org.apache.syncope.console.wicket.ajax.markup.html.ClearIndicatingAjaxButton;
 import org.apache.wicket.PageReference;
 import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.ajax.markup.html.form.AjaxButton;
-import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxButton;
 import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
 import org.apache.wicket.markup.html.form.Form;
 import org.apache.wicket.model.ResourceModel;
 import org.apache.wicket.spring.injection.annot.SpringBean;
-import org.apache.syncope.client.to.UserTO;
-import org.apache.syncope.console.commons.StatusBean;
-import org.apache.syncope.console.pages.panels.StatusPanel;
-import org.apache.syncope.console.rest.UserRestClient;
 
 public class StatusModalPage extends BaseModalPage {
 
@@ -40,7 +40,7 @@ public class StatusModalPage extends Bas
     @SpringBean
     private UserRestClient userRestClient;
 
-    public StatusModalPage(final PageReference callerPageRef, final ModalWindow window, final UserTO userTO) {
+    public StatusModalPage(final PageReference pageRef, final ModalWindow window, final UserTO userTO) {
 
         super();
 
@@ -52,18 +52,18 @@ public class StatusModalPage extends Bas
         final StatusPanel statusPanel = new StatusPanel("statuspanel", userTO, statuses);
         form.add(statusPanel);
 
-        final AjaxButton disable = new IndicatingAjaxButton("disable", new ResourceModel("disable", "Disable")) {
+        final AjaxButton disable = new ClearIndicatingAjaxButton("disable",
+                new ResourceModel("disable", "Disable"), pageRef) {
 
             private static final long serialVersionUID = -958724007591692537L;
 
             @Override
-            protected void onSubmit(final AjaxRequestTarget target, final Form form) {
-
+            protected void onSubmitInternal(final AjaxRequestTarget target, final Form form) {
                 try {
                     userRestClient.suspend(userTO.getId(), statuses);
 
-                    if (callerPageRef.getPage() instanceof BasePage) {
-                        ((BasePage) callerPageRef.getPage()).setModalResult(true);
+                    if (pageRef.getPage() instanceof BasePage) {
+                        ((BasePage) pageRef.getPage()).setModalResult(true);
                     }
 
                     window.close(target);
@@ -76,22 +76,21 @@ public class StatusModalPage extends Bas
 
             @Override
             protected void onError(final AjaxRequestTarget target, final Form<?> form) {
-
                 target.add(feedbackPanel);
             }
         };
 
-        final AjaxButton enable = new IndicatingAjaxButton("enable", new ResourceModel("enable", "Enable")) {
+        final AjaxButton enable = new ClearIndicatingAjaxButton("enable",
+                new ResourceModel("enable", "Enable"), pageRef) {
 
             private static final long serialVersionUID = -958724007591692537L;
 
             @Override
-            protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
-
+            protected void onSubmitInternal(final AjaxRequestTarget target, final Form<?> form) {
                 try {
                     userRestClient.reactivate(userTO.getId(), statuses);
 
-                    ((BasePage) callerPageRef.getPage()).setModalResult(true);
+                    ((BasePage) pageRef.getPage()).setModalResult(true);
 
                     window.close(target);
                 } catch (Exception e) {
@@ -103,7 +102,6 @@ public class StatusModalPage extends Bas
 
             @Override
             protected void onError(final AjaxRequestTarget target, final Form<?> form) {
-
                 target.add(feedbackPanel);
             }
         };

Modified: syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/TaskModalPage.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/TaskModalPage.java?rev=1446584&r1=1446583&r2=1446584&view=diff
==============================================================================
--- syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/TaskModalPage.java (original)
+++ syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/TaskModalPage.java Fri Feb 15 14:00:02 2013
@@ -22,6 +22,19 @@ import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
+import org.apache.syncope.client.to.NotificationTaskTO;
+import org.apache.syncope.client.to.PropagationTaskTO;
+import org.apache.syncope.client.to.SchedTaskTO;
+import org.apache.syncope.client.to.SyncTaskTO;
+import org.apache.syncope.client.to.TaskExecTO;
+import org.apache.syncope.client.to.TaskTO;
+import org.apache.syncope.client.validation.SyncopeClientCompositeErrorException;
+import org.apache.syncope.console.commons.SortableDataProviderComparator;
+import org.apache.syncope.console.rest.TaskRestClient;
+import org.apache.syncope.console.wicket.extensions.markup.html.repeater.data.table.DatePropertyColumn;
+import org.apache.syncope.console.wicket.markup.html.form.ActionLink;
+import org.apache.syncope.console.wicket.markup.html.form.ActionLinksPanel;
+import org.apache.syncope.console.wicket.markup.html.form.AjaxTextFieldPanel;
 import org.apache.wicket.Page;
 import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
@@ -43,19 +56,6 @@ import org.apache.wicket.model.PropertyM
 import org.apache.wicket.model.ResourceModel;
 import org.apache.wicket.spring.injection.annot.SpringBean;
 import org.springframework.util.StringUtils;
-import org.apache.syncope.client.to.NotificationTaskTO;
-import org.apache.syncope.client.to.PropagationTaskTO;
-import org.apache.syncope.client.to.SchedTaskTO;
-import org.apache.syncope.client.to.SyncTaskTO;
-import org.apache.syncope.client.to.TaskExecTO;
-import org.apache.syncope.client.to.TaskTO;
-import org.apache.syncope.client.validation.SyncopeClientCompositeErrorException;
-import org.apache.syncope.console.commons.SortableDataProviderComparator;
-import org.apache.syncope.console.rest.TaskRestClient;
-import org.apache.syncope.console.wicket.extensions.markup.html.repeater.data.table.DatePropertyColumn;
-import org.apache.syncope.console.wicket.markup.html.form.ActionLink;
-import org.apache.syncope.console.wicket.markup.html.form.ActionLinksPanel;
-import org.apache.syncope.console.wicket.markup.html.form.AjaxTextFieldPanel;
 
 /**
  * Modal window with Task form (to stop and start execution).
@@ -136,7 +136,7 @@ public abstract class TaskModalPage exte
 
                 final TaskExecTO taskExecutionTO = model.getObject();
 
-                final ActionLinksPanel panel = new ActionLinksPanel(componentId, model);
+                final ActionLinksPanel panel = new ActionLinksPanel(componentId, model, getPageReference());
 
                 panel.add(new ActionLink() {
 

Modified: syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/Tasks.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/Tasks.java?rev=1446584&r1=1446583&r2=1446584&view=diff
==============================================================================
--- syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/Tasks.java (original)
+++ syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/Tasks.java Fri Feb 15 14:00:02 2013
@@ -50,8 +50,8 @@ public class Tasks extends BasePage {
     public Tasks(final PageParameters parameters) {
         super();
 
-        add(new PropagationTasks("propagation"));
-        add(new NotificationTasks("notification"));
+        add(new PropagationTasks("propagation", getPageReference()));
+        add(new NotificationTasks("notification", getPageReference()));
         add(new SchedTasks("sched", getPageReference()));
         add(new SyncTasks("sync", getPageReference()));
     }

Modified: syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/Todo.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/Todo.java?rev=1446584&r1=1446583&r2=1446584&view=diff
==============================================================================
--- syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/Todo.java (original)
+++ syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/Todo.java Fri Feb 15 14:00:02 2013
@@ -22,6 +22,20 @@ import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
+import org.apache.syncope.client.to.UserRequestTO;
+import org.apache.syncope.client.to.WorkflowFormTO;
+import org.apache.syncope.client.validation.SyncopeClientCompositeErrorException;
+import org.apache.syncope.console.SyncopeSession;
+import org.apache.syncope.console.commons.Constants;
+import org.apache.syncope.console.commons.PreferenceManager;
+import org.apache.syncope.console.commons.SortableDataProviderComparator;
+import org.apache.syncope.console.rest.ApprovalRestClient;
+import org.apache.syncope.console.rest.UserRequestRestClient;
+import org.apache.syncope.console.rest.UserRestClient;
+import org.apache.syncope.console.wicket.extensions.markup.html.repeater.data.table.DatePropertyColumn;
+import org.apache.syncope.console.wicket.markup.html.form.ActionLink;
+import org.apache.syncope.console.wicket.markup.html.form.ActionLinksPanel;
+import org.apache.syncope.types.UserRequestType;
 import org.apache.wicket.Page;
 import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
@@ -45,20 +59,6 @@ import org.apache.wicket.model.PropertyM
 import org.apache.wicket.model.ResourceModel;
 import org.apache.wicket.request.mapper.parameter.PageParameters;
 import org.apache.wicket.spring.injection.annot.SpringBean;
-import org.apache.syncope.client.to.UserRequestTO;
-import org.apache.syncope.client.to.WorkflowFormTO;
-import org.apache.syncope.client.validation.SyncopeClientCompositeErrorException;
-import org.apache.syncope.console.SyncopeSession;
-import org.apache.syncope.console.commons.Constants;
-import org.apache.syncope.console.commons.PreferenceManager;
-import org.apache.syncope.console.commons.SortableDataProviderComparator;
-import org.apache.syncope.console.rest.ApprovalRestClient;
-import org.apache.syncope.console.rest.UserRequestRestClient;
-import org.apache.syncope.console.rest.UserRestClient;
-import org.apache.syncope.console.wicket.extensions.markup.html.repeater.data.table.DatePropertyColumn;
-import org.apache.syncope.console.wicket.markup.html.form.ActionLink;
-import org.apache.syncope.console.wicket.markup.html.form.ActionLinksPanel;
-import org.apache.syncope.types.UserRequestType;
 
 public class Todo extends BasePage {
 
@@ -136,7 +136,7 @@ public class Todo extends BasePage {
 
                 final WorkflowFormTO formTO = model.getObject();
 
-                final ActionLinksPanel panel = new ActionLinksPanel(componentId, model);
+                final ActionLinksPanel panel = new ActionLinksPanel(componentId, model, getPageReference());
 
                 panel.add(new ActionLink() {
 
@@ -248,7 +248,7 @@ public class Todo extends BasePage {
 
                 final UserRequestTO request = model.getObject();
 
-                final ActionLinksPanel panel = new ActionLinksPanel(componentId, model);
+                final ActionLinksPanel panel = new ActionLinksPanel(componentId, model, getPageReference());
 
                 panel.add(new ActionLink() {
 

Modified: syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/UserModalPage.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/UserModalPage.java?rev=1446584&r1=1446583&r2=1446584&view=diff
==============================================================================
--- syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/UserModalPage.java (original)
+++ syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/UserModalPage.java Fri Feb 15 14:00:02 2013
@@ -26,11 +26,11 @@ import org.apache.syncope.console.pages.
 import org.apache.syncope.console.pages.panels.UserDetailsPanel;
 import org.apache.syncope.console.pages.panels.UserManagementResultPanel;
 import org.apache.syncope.console.pages.panels.VirtualAttributesPanel;
+import org.apache.syncope.console.wicket.ajax.markup.html.ClearIndicatingAjaxButton;
 import org.apache.wicket.PageReference;
 import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.ajax.markup.html.form.AjaxButton;
 import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy;
-import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxButton;
 import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
 import org.apache.wicket.markup.html.basic.Label;
 import org.apache.wicket.markup.html.form.Form;
@@ -54,7 +54,7 @@ public abstract class UserModalPage exte
 
     private static final long serialVersionUID = 5002005009737457667L;
 
-    protected final PageReference callerPageRef;
+    protected final PageReference pageRef;
 
     protected final ModalWindow window;
 
@@ -66,12 +66,12 @@ public abstract class UserModalPage exte
 
     private final boolean resetPassword;
 
-    public UserModalPage(final PageReference callerPageRef, final ModalWindow window, final UserTO userTO,
+    public UserModalPage(final PageReference pageRef, final ModalWindow window, final UserTO userTO,
             final Mode mode, final boolean resetPassword) {
 
         super();
 
-        this.callerPageRef = callerPageRef;
+        this.pageRef = pageRef;
         this.window = window;
         this.userTO = userTO;
         this.mode = mode;
@@ -85,7 +85,7 @@ public abstract class UserModalPage exte
     public UserModalPage(final ModalWindow window, final UserTO userTO, final Mode mode) {
         super();
 
-        this.callerPageRef = null;
+        this.pageRef = null;
         this.window = window;
         this.mode = mode;
         this.userTO = userTO;
@@ -141,13 +141,13 @@ public abstract class UserModalPage exte
         //--------------------------------
         // Derived attributes panel
         //--------------------------------
-        form.add(new DerivedAttributesPanel("derivedAttributes", userTO));
+        form.add(new DerivedAttributesPanel("derivedAttributes", userTO, pageRef));
         //--------------------------------
 
         //--------------------------------
         // Virtual attributes panel
         //--------------------------------
-        form.add(new VirtualAttributesPanel("virtualAttributes", userTO, mode == Mode.TEMPLATE));
+        form.add(new VirtualAttributesPanel("virtualAttributes", userTO, mode == Mode.TEMPLATE, pageRef));
         //--------------------------------
 
         //--------------------------------
@@ -178,18 +178,17 @@ public abstract class UserModalPage exte
     }
 
     protected AjaxButton getOnSubmit() {
-        return new IndicatingAjaxButton("apply", new ResourceModel("submit")) {
+        return new ClearIndicatingAjaxButton("apply", new ResourceModel("submit"), pageRef) {
 
             private static final long serialVersionUID = -958724007591692537L;
 
             @Override
-            protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
-
+            protected void onSubmitInternal(final AjaxRequestTarget target, final Form<?> form) {
                 try {
                     submitAction(target, form);
 
-                    if (callerPageRef.getPage() instanceof BasePage) {
-                        ((BasePage) callerPageRef.getPage()).setModalResult(true);
+                    if (pageRef.getPage() instanceof BasePage) {
+                        ((BasePage) pageRef.getPage()).setModalResult(true);
                     }
 
                     closeAction(target, form);

Modified: syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/Users.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/Users.java?rev=1446584&r1=1446583&r2=1446584&view=diff
==============================================================================
--- syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/Users.java (original)
+++ syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/Users.java Fri Feb 15 14:00:02 2013
@@ -18,23 +18,23 @@
  */
 package org.apache.syncope.console.pages;
 
+import org.apache.syncope.client.search.NodeCond;
+import org.apache.syncope.client.to.UserTO;
+import org.apache.syncope.console.pages.panels.ResultSetPanel;
+import org.apache.syncope.console.pages.panels.ResultSetPanel.EventDataWrapper;
+import org.apache.syncope.console.pages.panels.UserSearchPanel;
+import org.apache.syncope.console.wicket.ajax.markup.html.ClearIndicatingAjaxButton;
+import org.apache.syncope.console.wicket.ajax.markup.html.ClearIndicatingAjaxLink;
 import org.apache.wicket.Page;
 import org.apache.wicket.Session;
 import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.ajax.markup.html.AjaxLink;
 import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy;
 import org.apache.wicket.event.Broadcast;
-import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxButton;
-import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxLink;
 import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
 import org.apache.wicket.markup.html.form.Form;
 import org.apache.wicket.model.ResourceModel;
 import org.apache.wicket.request.mapper.parameter.PageParameters;
-import org.apache.syncope.client.search.NodeCond;
-import org.apache.syncope.client.to.UserTO;
-import org.apache.syncope.console.pages.panels.ResultSetPanel;
-import org.apache.syncope.console.pages.panels.ResultSetPanel.EventDataWrapper;
-import org.apache.syncope.console.pages.panels.UserSearchPanel;
 
 public class Users extends BasePage {
 
@@ -62,12 +62,12 @@ public class Users extends BasePage {
         add(listResult);
 
         // create new user
-        final AjaxLink createLink = new IndicatingAjaxLink("createLink") {
+        final AjaxLink createLink = new ClearIndicatingAjaxLink("createLink", getPageReference()) {
 
             private static final long serialVersionUID = -7978723352517770644L;
 
             @Override
-            public void onClick(final AjaxRequestTarget target) {
+            protected void onClickInternal(final AjaxRequestTarget target) {
                 editModalWin.setPageCreator(new ModalWindow.PageCreator() {
 
                     private static final long serialVersionUID = -7834632442532690940L;
@@ -90,16 +90,15 @@ public class Users extends BasePage {
         final Form searchForm = new Form("searchForm");
         add(searchForm);
 
-        final UserSearchPanel searchPanel = new UserSearchPanel("searchPanel");
+        final UserSearchPanel searchPanel = new UserSearchPanel("searchPanel", getPageReference());
         searchForm.add(searchPanel);
 
-        searchForm.add(new IndicatingAjaxButton("search", new ResourceModel("search")) {
+        searchForm.add(new ClearIndicatingAjaxButton("search", new ResourceModel("search"), getPageReference()) {
 
             private static final long serialVersionUID = -958724007591692537L;
 
             @Override
-            protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
-
+            protected void onSubmitInternal(final AjaxRequestTarget target, final Form<?> form) {
                 final NodeCond searchCond = searchPanel.buildSearchCond();
                 LOG.debug("Node condition " + searchCond);
 

Modified: syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/VirtualSchemaModalPage.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/VirtualSchemaModalPage.java?rev=1446584&r1=1446583&r2=1446584&view=diff
==============================================================================
--- syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/VirtualSchemaModalPage.java (original)
+++ syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/VirtualSchemaModalPage.java Fri Feb 15 14:00:02 2013
@@ -21,17 +21,18 @@ package org.apache.syncope.console.pages
 import org.apache.syncope.client.AbstractBaseBean;
 import org.apache.syncope.client.to.VirtualSchemaTO;
 import org.apache.syncope.client.validation.SyncopeClientCompositeErrorException;
+import org.apache.syncope.console.wicket.ajax.markup.html.ClearIndicatingAjaxButton;
+import org.apache.syncope.console.wicket.markup.html.form.AjaxTextFieldPanel;
 import org.apache.syncope.types.AttributableType;
 import org.apache.wicket.PageReference;
 import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.markup.html.form.AjaxButton;
 import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy;
-import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxButton;
 import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
 import org.apache.wicket.markup.html.form.Form;
 import org.apache.wicket.model.CompoundPropertyModel;
 import org.apache.wicket.model.PropertyModel;
 import org.apache.wicket.model.ResourceModel;
-import org.apache.syncope.console.wicket.markup.html.form.AjaxTextFieldPanel;
 
 /**
  * Modal window with Schema form.
@@ -45,7 +46,7 @@ public class VirtualSchemaModalPage exte
     }
 
     @Override
-    public void setSchemaModalPage(final PageReference callerPageRef, final ModalWindow window,
+    public void setSchemaModalPage(final PageReference pageRef, final ModalWindow window,
             AbstractBaseBean schema, final boolean createFlag) {
 
         if (schema == null) {
@@ -62,23 +63,21 @@ public class VirtualSchemaModalPage exte
 
         name.setEnabled(createFlag);
 
-        final IndicatingAjaxButton submit = new IndicatingAjaxButton("apply", new ResourceModel("submit")) {
+        final AjaxButton submit = new ClearIndicatingAjaxButton("apply", new ResourceModel("submit"), pageRef) {
 
             private static final long serialVersionUID = -958724007591692537L;
 
             @Override
-            protected void onSubmit(final AjaxRequestTarget target, final Form form) {
-
+            protected void onSubmitInternal(final AjaxRequestTarget target, final Form form) {
                 VirtualSchemaTO schemaTO = (VirtualSchemaTO) form.getDefaultModelObject();
-
                 try {
                     if (createFlag) {
                         restClient.createVirtualSchema(kind, schemaTO);
                     } else {
                         restClient.updateVirtualSchema(kind, schemaTO);
                     }
-                    if (callerPageRef.getPage() instanceof BasePage) {
-                        ((BasePage) callerPageRef.getPage()).setModalResult(true);
+                    if (pageRef.getPage() instanceof BasePage) {
+                        ((BasePage) pageRef.getPage()).setModalResult(true);
                     }
 
                     window.close(target);
@@ -90,7 +89,6 @@ public class VirtualSchemaModalPage exte
 
             @Override
             protected void onError(final AjaxRequestTarget target, final Form form) {
-
                 target.add(feedbackPanel);
             }
         };

Modified: syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/panels/DerivedAttributesPanel.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/panels/DerivedAttributesPanel.java?rev=1446584&r1=1446583&r2=1446584&view=diff
==============================================================================
--- syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/panels/DerivedAttributesPanel.java (original)
+++ syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/panels/DerivedAttributesPanel.java Fri Feb 15 14:00:02 2013
@@ -19,12 +19,20 @@
 package org.apache.syncope.console.pages.panels;
 
 import java.util.List;
+import org.apache.syncope.client.to.AbstractAttributableTO;
+import org.apache.syncope.client.to.AttributeTO;
+import org.apache.syncope.client.to.RoleTO;
+import org.apache.syncope.client.to.UserTO;
+import org.apache.syncope.console.rest.SchemaRestClient;
+import org.apache.syncope.console.wicket.ajax.markup.html.ClearIndicatingAjaxButton;
+import org.apache.syncope.console.wicket.markup.html.form.AjaxDecoratedCheckbox;
+import org.apache.syncope.types.AttributableType;
+import org.apache.wicket.PageReference;
 import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.ajax.IAjaxCallDecorator;
 import org.apache.wicket.ajax.calldecorator.AjaxPreprocessingCallDecorator;
 import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
 import org.apache.wicket.ajax.markup.html.form.AjaxButton;
-import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxButton;
 import org.apache.wicket.markup.html.WebMarkupContainer;
 import org.apache.wicket.markup.html.form.DropDownChoice;
 import org.apache.wicket.markup.html.form.Form;
@@ -40,13 +48,6 @@ import org.apache.wicket.model.ResourceM
 import org.apache.wicket.spring.injection.annot.SpringBean;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.apache.syncope.client.to.AbstractAttributableTO;
-import org.apache.syncope.client.to.AttributeTO;
-import org.apache.syncope.client.to.RoleTO;
-import org.apache.syncope.client.to.UserTO;
-import org.apache.syncope.console.rest.SchemaRestClient;
-import org.apache.syncope.console.wicket.markup.html.form.AjaxDecoratedCheckbox;
-import org.apache.syncope.types.AttributableType;
 
 public class DerivedAttributesPanel extends Panel {
 
@@ -60,7 +61,8 @@ public class DerivedAttributesPanel exte
     @SpringBean
     private SchemaRestClient schemaRestClient;
 
-    public <T extends AbstractAttributableTO> DerivedAttributesPanel(final String id, final T entityTO) {
+    public <T extends AbstractAttributableTO> DerivedAttributesPanel(final String id, final T entityTO,
+            final PageReference pageRef) {
 
         super(id);
         setOutputMarkupId(true);
@@ -86,20 +88,19 @@ public class DerivedAttributesPanel exte
         attributesContainer.setOutputMarkupId(true);
         add(attributesContainer);
 
-        AjaxButton addAttributeBtn = new IndicatingAjaxButton("addAttributeBtn", new ResourceModel("addAttributeBtn")) {
+        AjaxButton addAttributeBtn = new ClearIndicatingAjaxButton("addAttributeBtn",
+                new ResourceModel("addAttributeBtn"), pageRef) {
 
             private static final long serialVersionUID = -4804368561204623354L;
 
             @Override
-            protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
-
+            protected void onSubmitInternal(final AjaxRequestTarget target, final Form<?> form) {
                 entityTO.getDerivedAttributes().add(new AttributeTO());
                 target.add(attributesContainer);
             }
 
             @Override
             protected void onError(final AjaxRequestTarget target, final Form<?> form) {
-
                 target.add(attributesContainer);
             }
         };

Modified: syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/panels/NotificationTasks.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/panels/NotificationTasks.java?rev=1446584&r1=1446583&r2=1446584&view=diff
==============================================================================
--- syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/panels/NotificationTasks.java (original)
+++ syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/panels/NotificationTasks.java Fri Feb 15 14:00:02 2013
@@ -20,7 +20,20 @@ package org.apache.syncope.console.pages
 
 import java.util.ArrayList;
 import java.util.List;
+import org.apache.syncope.client.to.NotificationTaskTO;
+import org.apache.syncope.client.to.TaskTO;
+import org.apache.syncope.client.validation.SyncopeClientCompositeErrorException;
+import org.apache.syncope.console.commons.Constants;
+import org.apache.syncope.console.commons.PreferenceManager;
+import org.apache.syncope.console.commons.XMLRolesReader;
+import org.apache.syncope.console.pages.NotificationTaskModalPage;
+import org.apache.syncope.console.pages.Tasks;
+import org.apache.syncope.console.pages.Tasks.TasksProvider;
+import org.apache.syncope.console.rest.TaskRestClient;
+import org.apache.syncope.console.wicket.markup.html.form.ActionLink;
+import org.apache.syncope.console.wicket.markup.html.form.ActionLinksPanel;
 import org.apache.wicket.Page;
+import org.apache.wicket.PageReference;
 import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
 import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
@@ -39,19 +52,6 @@ import org.apache.wicket.model.PropertyM
 import org.apache.wicket.model.ResourceModel;
 import org.apache.wicket.request.http.WebResponse;
 import org.apache.wicket.spring.injection.annot.SpringBean;
-import org.apache.syncope.client.to.NotificationTaskTO;
-import org.apache.syncope.client.to.PropagationTaskTO;
-import org.apache.syncope.client.to.TaskTO;
-import org.apache.syncope.client.validation.SyncopeClientCompositeErrorException;
-import org.apache.syncope.console.commons.Constants;
-import org.apache.syncope.console.commons.PreferenceManager;
-import org.apache.syncope.console.commons.XMLRolesReader;
-import org.apache.syncope.console.pages.NotificationTaskModalPage;
-import org.apache.syncope.console.pages.Tasks;
-import org.apache.syncope.console.pages.Tasks.TasksProvider;
-import org.apache.syncope.console.rest.TaskRestClient;
-import org.apache.syncope.console.wicket.markup.html.form.ActionLink;
-import org.apache.syncope.console.wicket.markup.html.form.ActionLinksPanel;
 
 public class NotificationTasks extends Panel {
 
@@ -82,7 +82,7 @@ public class NotificationTasks extends P
 
     private AjaxFallbackDefaultDataTable<TaskTO> table;
 
-    public NotificationTasks(String id) {
+    public NotificationTasks(final String id, final PageReference pageRef) {
         super(id);
 
         container = new WebMarkupContainer("container");
@@ -117,7 +117,7 @@ public class NotificationTasks extends P
 
                 final TaskTO taskTO = model.getObject();
 
-                final ActionLinksPanel panel = new ActionLinksPanel(componentId, model);
+                final ActionLinksPanel panel = new ActionLinksPanel(componentId, model, pageRef);
 
                 panel.add(new ActionLink() {
 
@@ -223,7 +223,8 @@ public class NotificationTasks extends P
 
                 table = Tasks.updateTaskTable(
                         columns,
-                        new TasksProvider<NotificationTaskTO>(restClient, paginatorRows, getId(), NotificationTaskTO.class),
+                        new TasksProvider<NotificationTaskTO>(restClient, paginatorRows, getId(),
+                        NotificationTaskTO.class),
                         container,
                         table == null ? 0 : table.getCurrentPage());
 

Modified: syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/panels/PoliciesPanel.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/panels/PoliciesPanel.java?rev=1446584&r1=1446583&r2=1446584&view=diff
==============================================================================
--- syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/panels/PoliciesPanel.java (original)
+++ syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/panels/PoliciesPanel.java Fri Feb 15 14:00:02 2013
@@ -22,12 +22,28 @@ import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
-
+import org.apache.syncope.client.to.AccountPolicyTO;
+import org.apache.syncope.client.to.PasswordPolicyTO;
+import org.apache.syncope.client.to.PolicyTO;
+import org.apache.syncope.client.to.SyncPolicyTO;
+import org.apache.syncope.client.validation.SyncopeClientCompositeErrorException;
+import org.apache.syncope.console.commons.Constants;
+import org.apache.syncope.console.commons.PreferenceManager;
+import org.apache.syncope.console.commons.SortableDataProviderComparator;
+import org.apache.syncope.console.commons.XMLRolesReader;
+import org.apache.syncope.console.pages.BasePage;
+import org.apache.syncope.console.pages.PolicyModalPage;
+import org.apache.syncope.console.rest.PolicyRestClient;
+import org.apache.syncope.console.wicket.ajax.markup.html.ClearIndicatingAjaxLink;
+import org.apache.syncope.console.wicket.markup.html.form.ActionLink;
+import org.apache.syncope.console.wicket.markup.html.form.ActionLinksPanel;
+import org.apache.syncope.types.PolicyType;
 import org.apache.wicket.Page;
+import org.apache.wicket.PageReference;
 import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
+import org.apache.wicket.ajax.markup.html.AjaxLink;
 import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy;
-import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxLink;
 import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
 import org.apache.wicket.extensions.ajax.markup.html.repeater.data.table.AjaxFallbackDefaultDataTable;
 import org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator;
@@ -50,20 +66,6 @@ import org.apache.wicket.request.http.We
 import org.apache.wicket.spring.injection.annot.SpringBean;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.apache.syncope.client.to.AccountPolicyTO;
-import org.apache.syncope.client.to.PasswordPolicyTO;
-import org.apache.syncope.client.to.PolicyTO;
-import org.apache.syncope.client.to.SyncPolicyTO;
-import org.apache.syncope.client.validation.SyncopeClientCompositeErrorException;
-import org.apache.syncope.console.commons.Constants;
-import org.apache.syncope.console.commons.PreferenceManager;
-import org.apache.syncope.console.commons.SortableDataProviderComparator;
-import org.apache.syncope.console.commons.XMLRolesReader;
-import org.apache.syncope.console.pages.PolicyModalPage;
-import org.apache.syncope.console.rest.PolicyRestClient;
-import org.apache.syncope.console.wicket.markup.html.form.ActionLink;
-import org.apache.syncope.console.wicket.markup.html.form.ActionLinksPanel;
-import org.apache.syncope.types.PolicyType;
 
 public class PoliciesPanel extends Panel {
 
@@ -93,7 +95,7 @@ public class PoliciesPanel extends Panel
 
     private PolicyType policyType;
 
-    public PoliciesPanel(final String id, final PolicyType policyType) {
+    public PoliciesPanel(final String id, final PageReference pageRef, final PolicyType policyType) {
         super(id);
 
         this.policyType = policyType;
@@ -146,7 +148,7 @@ public class PoliciesPanel extends Panel
 
                 final PolicyTO accountPolicyTO = model.getObject();
 
-                final ActionLinksPanel panel = new ActionLinksPanel(componentId, model);
+                final ActionLinksPanel panel = new ActionLinksPanel(componentId, model, pageRef);
 
                 panel.add(new ActionLink() {
 
@@ -161,8 +163,7 @@ public class PoliciesPanel extends Panel
 
                             @Override
                             public Page createPage() {
-                                final PolicyModalPage page = new PolicyModalPage(mwindow, accountPolicyTO);
-                                return page;
+                                return new PolicyModalPage(mwindow, accountPolicyTO, pageRef);
                             }
                         });
 
@@ -184,8 +185,8 @@ public class PoliciesPanel extends Panel
                         } catch (SyncopeClientCompositeErrorException e) {
                             error(getString("operation_error"));
 
-                            LOG.error("While deleting resource {}({})", new Object[] { accountPolicyTO.getId(),
-                                    accountPolicyTO.getDescription() }, e);
+                            LOG.error("While deleting resource {}({})", new Object[]{accountPolicyTO.getId(),
+                                        accountPolicyTO.getDescription()}, e);
                         }
 
                         target.add(container);
@@ -202,21 +203,19 @@ public class PoliciesPanel extends Panel
 
         container.add(table);
 
-        final IndicatingAjaxLink createButton = new IndicatingAjaxLink("createLink") {
+        final AjaxLink createButton = new ClearIndicatingAjaxLink("createLink", pageRef) {
 
             private static final long serialVersionUID = -7978723352517770644L;
 
             @Override
-            public void onClick(final AjaxRequestTarget target) {
-
+            protected void onClickInternal(final AjaxRequestTarget target) {
                 mwindow.setPageCreator(new ModalWindow.PageCreator() {
 
                     private static final long serialVersionUID = -7834632442532690940L;
 
                     @Override
                     public Page createPage() {
-                        final PolicyModalPage page = new PolicyModalPage(mwindow, getPolicyTOInstance(policyType));
-                        return page;
+                        return new PolicyModalPage(mwindow, getPolicyTOInstance(policyType), pageRef);
                     }
                 });
 

Modified: syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/panels/PropagationTasks.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/panels/PropagationTasks.java?rev=1446584&r1=1446583&r2=1446584&view=diff
==============================================================================
--- syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/panels/PropagationTasks.java (original)
+++ syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/panels/PropagationTasks.java Fri Feb 15 14:00:02 2013
@@ -20,8 +20,22 @@ package org.apache.syncope.console.pages
 
 import java.util.ArrayList;
 import java.util.List;
-
+import org.apache.syncope.client.to.PropagationTaskTO;
+import org.apache.syncope.client.to.TaskTO;
+import org.apache.syncope.client.validation.SyncopeClientCompositeErrorException;
+import org.apache.syncope.console.commons.Constants;
+import org.apache.syncope.console.commons.PreferenceManager;
+import org.apache.syncope.console.commons.XMLRolesReader;
+import org.apache.syncope.console.pages.BasePage;
+import org.apache.syncope.console.pages.PropagationTaskModalPage;
+import org.apache.syncope.console.pages.Tasks;
+import org.apache.syncope.console.pages.Tasks.TasksProvider;
+import org.apache.syncope.console.rest.TaskRestClient;
+import org.apache.syncope.console.wicket.extensions.markup.html.repeater.data.table.DatePropertyColumn;
+import org.apache.syncope.console.wicket.markup.html.form.ActionLink;
+import org.apache.syncope.console.wicket.markup.html.form.ActionLinksPanel;
 import org.apache.wicket.Page;
+import org.apache.wicket.PageReference;
 import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
 import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
@@ -40,19 +54,6 @@ import org.apache.wicket.model.PropertyM
 import org.apache.wicket.model.ResourceModel;
 import org.apache.wicket.request.http.WebResponse;
 import org.apache.wicket.spring.injection.annot.SpringBean;
-import org.apache.syncope.client.to.PropagationTaskTO;
-import org.apache.syncope.client.to.TaskTO;
-import org.apache.syncope.client.validation.SyncopeClientCompositeErrorException;
-import org.apache.syncope.console.commons.Constants;
-import org.apache.syncope.console.commons.PreferenceManager;
-import org.apache.syncope.console.commons.XMLRolesReader;
-import org.apache.syncope.console.pages.PropagationTaskModalPage;
-import org.apache.syncope.console.pages.Tasks;
-import org.apache.syncope.console.pages.Tasks.TasksProvider;
-import org.apache.syncope.console.rest.TaskRestClient;
-import org.apache.syncope.console.wicket.extensions.markup.html.repeater.data.table.DatePropertyColumn;
-import org.apache.syncope.console.wicket.markup.html.form.ActionLink;
-import org.apache.syncope.console.wicket.markup.html.form.ActionLinksPanel;
 
 /**
  * Tasks page.
@@ -86,7 +87,7 @@ public class PropagationTasks extends Pa
 
     private AjaxFallbackDefaultDataTable<TaskTO> table;
 
-    public PropagationTasks(final String id) {
+    public PropagationTasks(final String id, final PageReference pageRef) {
         super(id);
 
         container = new WebMarkupContainer("container");
@@ -109,9 +110,9 @@ public class PropagationTasks extends Pa
 
         columns.add(new PropertyColumn(new ResourceModel("propagationOperation"), "propagationOperation",
                 "propagationOperation"));
-        
+
         columns.add(new DatePropertyColumn(new ResourceModel("startDate"), "startDate", "startDate"));
-        
+
         columns.add(new DatePropertyColumn(new ResourceModel("endDate"), "endDate", "endDate"));
 
         columns.add(new PropertyColumn(new ResourceModel("latestExecStatus"), "latestExecStatus", "latestExecStatus"));
@@ -131,7 +132,7 @@ public class PropagationTasks extends Pa
 
                 final TaskTO taskTO = model.getObject();
 
-                final ActionLinksPanel panel = new ActionLinksPanel(componentId, model);
+                final ActionLinksPanel panel = new ActionLinksPanel(componentId, model, pageRef);
 
                 panel.add(new ActionLink() {
 

Modified: syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/panels/ResourceConnConfPanel.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/panels/ResourceConnConfPanel.java?rev=1446584&r1=1446583&r2=1446584&view=diff
==============================================================================
--- syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/panels/ResourceConnConfPanel.java (original)
+++ syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/panels/ResourceConnConfPanel.java Fri Feb 15 14:00:02 2013
@@ -27,6 +27,7 @@ import org.apache.syncope.console.pages.
 import org.apache.syncope.console.pages.ResourceModalPage.ResourceEvent;
 import org.apache.syncope.console.pages.panels.ResourceDetailsPanel.DetailsModEvent;
 import org.apache.syncope.console.rest.ConnectorRestClient;
+import org.apache.syncope.console.wicket.ajax.markup.html.ClearIndicatingAjaxLink;
 import org.apache.syncope.console.wicket.markup.html.form.AjaxCheckBoxPanel;
 import org.apache.syncope.console.wicket.markup.html.form.AjaxNumberFieldPanel;
 import org.apache.syncope.console.wicket.markup.html.form.AjaxPasswordFieldPanel;
@@ -35,12 +36,12 @@ import org.apache.syncope.console.wicket
 import org.apache.syncope.console.wicket.markup.html.form.MultiValueSelectorPanel;
 import org.apache.syncope.console.wicket.markup.html.form.MultiValueSelectorPanel.MultiValueSelectorEvent;
 import org.apache.syncope.types.ConnConfProperty;
+import org.apache.wicket.PageReference;
 import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
 import org.apache.wicket.ajax.markup.html.AjaxLink;
 import org.apache.wicket.event.Broadcast;
 import org.apache.wicket.event.IEvent;
-import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxLink;
 import org.apache.wicket.markup.html.WebMarkupContainer;
 import org.apache.wicket.markup.html.basic.Label;
 import org.apache.wicket.markup.html.form.PasswordTextField;
@@ -93,7 +94,8 @@ public class ResourceConnConfPanel exten
 
     private ResourceTO resourceTO;
 
-    public ResourceConnConfPanel(final String id, final ResourceTO resourceTO, final boolean createFlag) {
+    public ResourceConnConfPanel(final String id, final ResourceTO resourceTO, final boolean createFlag,
+            final PageReference pageRef) {
 
         super(id);
         setOutputMarkupId(true);
@@ -107,13 +109,12 @@ public class ResourceConnConfPanel exten
         connConfPropContainer.setOutputMarkupId(true);
         add(connConfPropContainer);
 
-        check = new IndicatingAjaxLink("check", new ResourceModel("check")) {
+        check = new ClearIndicatingAjaxLink("check", new ResourceModel("check"), pageRef) {
 
             private static final long serialVersionUID = -4199438518229098169L;
 
             @Override
-            public void onClick(final AjaxRequestTarget target) {
-
+            protected void onClickInternal(final AjaxRequestTarget target) {
                 if (connRestClient.check(resourceTO)) {
                     info(getString("success_connection"));
                 } else {

Modified: syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/panels/ResourceMappingPanel.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/panels/ResourceMappingPanel.java?rev=1446584&r1=1446583&r2=1446584&view=diff
==============================================================================
--- syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/panels/ResourceMappingPanel.java (original)
+++ syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/panels/ResourceMappingPanel.java Fri Feb 15 14:00:02 2013
@@ -24,13 +24,28 @@ import java.util.Collections;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
+import org.apache.syncope.client.to.ConnInstanceTO;
+import org.apache.syncope.client.to.ResourceTO;
+import org.apache.syncope.client.to.SchemaMappingTO;
+import org.apache.syncope.console.pages.panels.ResourceConnConfPanel.ConnConfModEvent;
+import org.apache.syncope.console.rest.ConnectorRestClient;
+import org.apache.syncope.console.rest.SchemaRestClient;
+import org.apache.syncope.console.wicket.ajax.markup.html.ClearIndicatingAjaxButton;
+import org.apache.syncope.console.wicket.markup.html.form.AjaxCheckBoxPanel;
+import org.apache.syncope.console.wicket.markup.html.form.AjaxDecoratedCheckbox;
+import org.apache.syncope.console.wicket.markup.html.form.AjaxDropDownChoicePanel;
+import org.apache.syncope.console.wicket.markup.html.form.AjaxTextFieldPanel;
+import org.apache.syncope.console.wicket.markup.html.form.FieldPanel;
+import org.apache.syncope.types.AttributableType;
+import org.apache.syncope.types.ConnConfProperty;
+import org.apache.syncope.types.IntMappingType;
+import org.apache.wicket.PageReference;
 import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.ajax.IAjaxCallDecorator;
 import org.apache.wicket.ajax.calldecorator.AjaxPreprocessingCallDecorator;
 import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
 import org.apache.wicket.ajax.markup.html.form.AjaxButton;
 import org.apache.wicket.event.IEvent;
-import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxButton;
 import org.apache.wicket.markup.html.WebMarkupContainer;
 import org.apache.wicket.markup.html.form.Form;
 import org.apache.wicket.markup.html.list.ListItem;
@@ -42,20 +57,6 @@ import org.apache.wicket.model.ResourceM
 import org.apache.wicket.spring.injection.annot.SpringBean;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.apache.syncope.client.to.ConnInstanceTO;
-import org.apache.syncope.client.to.ResourceTO;
-import org.apache.syncope.client.to.SchemaMappingTO;
-import org.apache.syncope.console.pages.panels.ResourceConnConfPanel.ConnConfModEvent;
-import org.apache.syncope.console.rest.ConnectorRestClient;
-import org.apache.syncope.console.rest.SchemaRestClient;
-import org.apache.syncope.console.wicket.markup.html.form.AjaxCheckBoxPanel;
-import org.apache.syncope.console.wicket.markup.html.form.AjaxDecoratedCheckbox;
-import org.apache.syncope.console.wicket.markup.html.form.AjaxDropDownChoicePanel;
-import org.apache.syncope.console.wicket.markup.html.form.AjaxTextFieldPanel;
-import org.apache.syncope.console.wicket.markup.html.form.FieldPanel;
-import org.apache.syncope.types.AttributableType;
-import org.apache.syncope.types.ConnConfProperty;
-import org.apache.syncope.types.IntMappingType;
 
 /**
  * Resource mapping panel.
@@ -140,7 +141,7 @@ public class ResourceMappingPanel extend
      * @param panelid panel id.
      * @param resourceTO external resource.
      */
-    public ResourceMappingPanel(final String panelid, final ResourceTO resourceTO) {
+    public ResourceMappingPanel(final String panelid, final ResourceTO resourceTO, final PageReference pageRef) {
 
         super(panelid);
         setOutputMarkupId(true);
@@ -353,20 +354,15 @@ public class ResourceMappingPanel extend
         mappings.setReuseItems(true);
         mappingContainer.add(mappings);
 
-        addMappingBtn = new IndicatingAjaxButton("addUserSchemaMappingBtn", new ResourceModel("add")) {
+        addMappingBtn = new ClearIndicatingAjaxButton("addUserSchemaMappingBtn", new ResourceModel("add"), pageRef) {
 
             private static final long serialVersionUID = -4804368561204623354L;
 
             @Override
-            protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
+            protected void onSubmitInternal(final AjaxRequestTarget target, final Form<?> form) {
                 resourceTO.getMappings().add(new SchemaMappingTO());
                 target.add(mappingContainer);
             }
-
-            @Override
-            protected void onError(final AjaxRequestTarget target, final Form<?> form) {
-                // ignore errors
-            }
         };
 
         addMappingBtn.setDefaultFormProcessing(false);

Modified: syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/panels/ResultSetPanel.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/panels/ResultSetPanel.java?rev=1446584&r1=1446583&r2=1446584&view=diff
==============================================================================
--- syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/panels/ResultSetPanel.java (original)
+++ syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/panels/ResultSetPanel.java Fri Feb 15 14:00:02 2013
@@ -35,6 +35,7 @@ import org.apache.syncope.console.pages.
 import org.apache.syncope.console.pages.EditUserModalPage;
 import org.apache.syncope.console.pages.StatusModalPage;
 import org.apache.syncope.console.rest.UserRestClient;
+import org.apache.syncope.console.wicket.ajax.markup.html.ClearIndicatingAjaxLink;
 import org.apache.syncope.console.wicket.extensions.markup.html.repeater.data.table.DatePropertyColumn;
 import org.apache.syncope.console.wicket.extensions.markup.html.repeater.data.table.TokenColumn;
 import org.apache.syncope.console.wicket.extensions.markup.html.repeater.data.table.UserAttrColumn;
@@ -51,7 +52,6 @@ import org.apache.wicket.behavior.Behavi
 import org.apache.wicket.event.Broadcast;
 import org.apache.wicket.event.IEvent;
 import org.apache.wicket.event.IEventSource;
-import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxLink;
 import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
 import org.apache.wicket.extensions.ajax.markup.html.repeater.data.table.AjaxFallbackDefaultDataTable;
 import org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator;
@@ -187,12 +187,12 @@ public class ResultSetPanel extends Pane
     private final BasePage page;
 
     public <T extends AbstractAttributableTO> ResultSetPanel(final String id, final boolean filtered,
-            final NodeCond searchCond, final PageReference callerRef) {
+            final NodeCond searchCond, final PageReference pageRef) {
         super(id);
 
         setOutputMarkupId(true);
 
-        page = (BasePage) callerRef.getPage();
+        page = (BasePage) pageRef.getPage();
 
         this.filtered = filtered;
         this.filter = searchCond;
@@ -232,13 +232,12 @@ public class ResultSetPanel extends Pane
         // ---------------------------
         // Link to select schemas/columns to be shown
         // ---------------------------
-        final AjaxLink displayAttrsLink = new IndicatingAjaxLink("displayAttrsLink") {
+        final AjaxLink displayAttrs = new ClearIndicatingAjaxLink("displayAttrsLink", page.getPageReference()) {
 
             private static final long serialVersionUID = -7978723352517770644L;
 
             @Override
-            public void onClick(final AjaxRequestTarget target) {
-
+            protected void onClickInternal(final AjaxRequestTarget target) {
                 displaymodal.setPageCreator(new ModalWindow.PageCreator() {
 
                     private static final long serialVersionUID = -7834632442532690940L;
@@ -255,7 +254,7 @@ public class ResultSetPanel extends Pane
 
         // Add class to specify relative position of the link.
         // Position depends on result pages number.
-        displayAttrsLink.add(new Behavior() {
+        displayAttrs.add(new Behavior() {
 
             private static final long serialVersionUID = 1469628524240283489L;
 
@@ -273,9 +272,9 @@ public class ResultSetPanel extends Pane
         });
 
         MetaDataRoleAuthorizationStrategy.authorize(
-                displayAttrsLink, ENABLE, xmlRolesReader.getAllAllowedRoles("Users", "changeView"));
+                displayAttrs, ENABLE, xmlRolesReader.getAllAllowedRoles("Users", "changeView"));
 
-        container.add(displayAttrsLink);
+        container.add(displayAttrs);
         // ---------------------------
 
         // ---------------------------
@@ -390,7 +389,7 @@ public class ResultSetPanel extends Pane
             public void populateItem(final Item<ICellPopulator<UserTO>> cellItem, final String componentId,
                     final IModel<UserTO> model) {
 
-                final ActionLinksPanel panel = new ActionLinksPanel(componentId, model);
+                final ActionLinksPanel panel = new ActionLinksPanel(componentId, model, page.getPageReference());
 
                 panel.add(new ActionLink() {
 

Modified: syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/panels/RoleAttributesPanel.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/panels/RoleAttributesPanel.java?rev=1446584&r1=1446583&r2=1446584&view=diff
==============================================================================
--- syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/panels/RoleAttributesPanel.java (original)
+++ syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/panels/RoleAttributesPanel.java Fri Feb 15 14:00:02 2013
@@ -18,17 +18,18 @@
  */
 package org.apache.syncope.console.pages.panels;
 
+import org.apache.syncope.client.to.RoleTO;
+import org.apache.syncope.console.commons.SelectChoiceRenderer;
+import org.apache.syncope.console.rest.EntitlementRestClient;
+import org.apache.syncope.console.wicket.markup.html.form.AjaxCheckBoxPanel;
+import org.apache.syncope.console.wicket.markup.html.form.AjaxTextFieldPanel;
+import org.apache.wicket.PageReference;
 import org.apache.wicket.extensions.markup.html.form.palette.Palette;
 import org.apache.wicket.markup.html.form.Form;
 import org.apache.wicket.markup.html.panel.Panel;
 import org.apache.wicket.model.PropertyModel;
 import org.apache.wicket.model.util.ListModel;
 import org.apache.wicket.spring.injection.annot.SpringBean;
-import org.apache.syncope.client.to.RoleTO;
-import org.apache.syncope.console.commons.SelectChoiceRenderer;
-import org.apache.syncope.console.rest.EntitlementRestClient;
-import org.apache.syncope.console.wicket.markup.html.form.AjaxCheckBoxPanel;
-import org.apache.syncope.console.wicket.markup.html.form.AjaxTextFieldPanel;
 
 public class RoleAttributesPanel extends Panel {
 
@@ -39,8 +40,7 @@ public class RoleAttributesPanel extends
 
     final Palette<String> entitlementsPalette;
 
-    public RoleAttributesPanel(final String id, final Form form, final RoleTO roleTO) {
-
+    public RoleAttributesPanel(final String id, final Form form, final RoleTO roleTO, final PageReference pageRef) {
         super(id);
 
         //--------------------------------
@@ -61,7 +61,7 @@ public class RoleAttributesPanel extends
         //--------------------------------
         // Derived attributes container
         //--------------------------------
-        this.add(new DerivedAttributesPanel("derivedAttributes", roleTO));
+        this.add(new DerivedAttributesPanel("derivedAttributes", roleTO, pageRef));
 
         final AjaxCheckBoxPanel inhDerivedAttributes = new AjaxCheckBoxPanel("inheritDerivedAttributes",
                 "inheritDerivedAttributes", new PropertyModel<Boolean>(roleTO, "inheritDerivedAttributes"));
@@ -72,7 +72,7 @@ public class RoleAttributesPanel extends
         //--------------------------------
         // Virtual attributes container
         //--------------------------------
-        this.add(new VirtualAttributesPanel("virtualAttributes", roleTO, false));
+        this.add(new VirtualAttributesPanel("virtualAttributes", roleTO, false, pageRef));
 
         final AjaxCheckBoxPanel inhVirtualAttributes = new AjaxCheckBoxPanel("inheritVirtualAttributes",
                 "inheritVirtualAttributes", new PropertyModel<Boolean>(roleTO, "inheritVirtualAttributes"));

Modified: syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/panels/RoleSummaryPanel.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/panels/RoleSummaryPanel.java?rev=1446584&r1=1446583&r2=1446584&view=diff
==============================================================================
--- syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/panels/RoleSummaryPanel.java (original)
+++ syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/panels/RoleSummaryPanel.java Fri Feb 15 14:00:02 2013
@@ -45,15 +45,14 @@ public class RoleSummaryPanel extends Pa
 
     private TreeActionLinkPanel actionLink;
 
-    private PageReference callerPageRef;
+    private PageReference pageRef;
 
     private ModalWindow window;
 
-    public RoleSummaryPanel(final String id, final ModalWindow window, final PageReference callerPageRef) {
-
+    public RoleSummaryPanel(final String id, final ModalWindow window, final PageReference pageRef) {
         super(id);
 
-        this.callerPageRef = callerPageRef;
+        this.pageRef = pageRef;
         this.window = window;
 
         fragment = new Fragment("rolePanel",
@@ -65,10 +64,10 @@ public class RoleSummaryPanel extends Pa
         if (this.selectedNode != null) {
             if (this.selectedNode.getId() == 0) {
                 actionLink = new TreeActionLinkPanel("actionLink", this.selectedNode.getId(),
-                        new CompoundPropertyModel(this.selectedNode), window, callerPageRef);
+                        new CompoundPropertyModel(this.selectedNode), window, pageRef);
                 fragment.add(actionLink);
             } else {
-                roleTabPanel = new RoleTabPanel("nodeViewPanel", selectedNode, window, callerPageRef);
+                roleTabPanel = new RoleTabPanel("nodeViewPanel", selectedNode, window, pageRef);
                 roleTabPanel.setOutputMarkupId(true);
                 fragment.add(roleTabPanel);
             }
@@ -93,12 +92,12 @@ public class RoleSummaryPanel extends Pa
 
             if (update.getSelectedNodeId() == 0) {
                 actionLink = new TreeActionLinkPanel("actionLink", update.getSelectedNodeId(),
-                        new CompoundPropertyModel(this.selectedNode), window, callerPageRef);
+                        new CompoundPropertyModel(this.selectedNode), window, pageRef);
                 actionLink.setOutputMarkupId(true);
                 fragment.addOrReplace(actionLink);
             } else {
                 this.selectedNode = restClient.readRole(update.getSelectedNodeId());
-                roleTabPanel = new RoleTabPanel("nodeViewPanel", this.selectedNode, window, callerPageRef);
+                roleTabPanel = new RoleTabPanel("nodeViewPanel", this.selectedNode, window, pageRef);
                 roleTabPanel.setOutputMarkupId(true);
                 fragment.addOrReplace(roleTabPanel);
             }
@@ -115,7 +114,6 @@ public class RoleSummaryPanel extends Pa
         private Long selectedNodeId;
 
         public TreeNodeClickUpdate(final AjaxRequestTarget target, final Long selectedNodeId) {
-
             this.target = target;
             this.selectedNodeId = selectedNodeId;
         }

Modified: syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/panels/RoleTabPanel.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/panels/RoleTabPanel.java?rev=1446584&r1=1446583&r2=1446584&view=diff
==============================================================================
--- syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/panels/RoleTabPanel.java (original)
+++ syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/panels/RoleTabPanel.java Fri Feb 15 14:00:02 2013
@@ -18,9 +18,13 @@
  */
 package org.apache.syncope.console.pages.panels;
 
+import org.apache.syncope.client.search.MembershipCond;
+import org.apache.syncope.client.search.NodeCond;
+import org.apache.syncope.client.to.RoleTO;
+import org.apache.syncope.console.wicket.ajax.markup.html.ClearIndicatingAjaxButton;
+import org.apache.syncope.console.wicket.markup.html.tree.TreeActionLinkPanel;
 import org.apache.wicket.PageReference;
 import org.apache.wicket.ajax.AjaxRequestTarget;
-import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxButton;
 import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
 import org.apache.wicket.markup.html.WebMarkupContainer;
 import org.apache.wicket.markup.html.basic.Label;
@@ -28,29 +32,20 @@ import org.apache.wicket.markup.html.for
 import org.apache.wicket.markup.html.panel.Panel;
 import org.apache.wicket.model.CompoundPropertyModel;
 import org.apache.wicket.model.ResourceModel;
-import org.apache.wicket.spring.injection.annot.SpringBean;
-import org.apache.syncope.client.search.MembershipCond;
-import org.apache.syncope.client.search.NodeCond;
-import org.apache.syncope.client.to.RoleTO;
-import org.apache.syncope.console.commons.XMLRolesReader;
-import org.apache.syncope.console.wicket.markup.html.tree.TreeActionLinkPanel;
 
 public class RoleTabPanel extends Panel {
 
     private static final long serialVersionUID = 859236186975983959L;
 
-    @SpringBean
-    protected XMLRolesReader xmlRolesReader;
-
     public RoleTabPanel(final String id, final RoleTO roleTO, final ModalWindow window,
-            final PageReference callerPageRef) {
+            final PageReference pageRef) {
 
         super(id);
 
         final Form form = new Form("RoleForm");
 
         final TreeActionLinkPanel actionLink = new TreeActionLinkPanel("actionLink", roleTO.getId(),
-                new CompoundPropertyModel(roleTO), window, callerPageRef);
+                new CompoundPropertyModel(roleTO), window, pageRef);
 
         this.add(actionLink);
         this.add(new Label("displayName", roleTO.getDisplayName()));
@@ -58,7 +53,7 @@ public class RoleTabPanel extends Panel 
         form.setModel(new CompoundPropertyModel(roleTO));
         form.setOutputMarkupId(true);
 
-        final RoleAttributesPanel attributesPanel = new RoleAttributesPanel("attributesPanel", form, roleTO);
+        final RoleAttributesPanel attributesPanel = new RoleAttributesPanel("attributesPanel", form, roleTO, pageRef);
 
         attributesPanel.setEnabled(false);
 
@@ -68,27 +63,23 @@ public class RoleTabPanel extends Panel 
 
         userListContainer.setOutputMarkupId(true);
         userListContainer.setEnabled(true);
-        userListContainer.add(new ResultSetPanel("userList", true, null, callerPageRef));
-        userListContainer.add(new IndicatingAjaxButton("search", new ResourceModel("search")) {
-
-            private static final long serialVersionUID = -958724007591692537L;
-
-            @Override
-            protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
-
-                final MembershipCond membershipCond = new MembershipCond();
-                membershipCond.setRoleName(roleTO.getName());
-                NodeCond cond = NodeCond.getLeafCond(membershipCond);
-
-                userListContainer.replace(new ResultSetPanel("userList", true, cond, callerPageRef));
-
-                target.add(userListContainer);
-            }
-
-            @Override
-            protected void onError(final AjaxRequestTarget target, final Form<?> form) {
-            }
-        });
+        userListContainer.add(new ResultSetPanel("userList", true, null, pageRef));
+        userListContainer.add(
+                new ClearIndicatingAjaxButton("search", new ResourceModel("search"), pageRef) {
+
+                    private static final long serialVersionUID = -958724007591692537L;
+
+                    @Override
+                    protected void onSubmitInternal(final AjaxRequestTarget target, final Form<?> form) {
+                        final MembershipCond membershipCond = new MembershipCond();
+                        membershipCond.setRoleName(roleTO.getName());
+                        NodeCond cond = NodeCond.getLeafCond(membershipCond);
+
+                        userListContainer.replace(new ResultSetPanel("userList", true, cond, pageRef));
+
+                        target.add(userListContainer);
+                    }
+                });
 
         form.add(userListContainer);
         add(form);

Modified: syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/panels/RolesPanel.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/panels/RolesPanel.java?rev=1446584&r1=1446583&r2=1446584&view=diff
==============================================================================
--- syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/panels/RolesPanel.java (original)
+++ syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/panels/RolesPanel.java Fri Feb 15 14:00:02 2013
@@ -20,10 +20,17 @@ package org.apache.syncope.console.pages
 
 import java.util.List;
 import javax.swing.tree.DefaultMutableTreeNode;
+import org.apache.syncope.client.to.MembershipTO;
+import org.apache.syncope.client.to.RoleTO;
+import org.apache.syncope.client.to.UserTO;
+import org.apache.syncope.console.commons.RoleTreeBuilder;
+import org.apache.syncope.console.pages.MembershipModalPage;
+import org.apache.syncope.console.pages.UserModalPage;
+import org.apache.syncope.console.wicket.ajax.markup.html.ClearIndicatingAjaxLink;
+import org.apache.syncope.console.wicket.ajax.markup.html.IndicatingDeleteOnConfirmAjaxLink;
 import org.apache.wicket.Page;
 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.extensions.ajax.markup.html.modal.ModalWindow;
 import org.apache.wicket.markup.html.WebMarkupContainer;
 import org.apache.wicket.markup.html.basic.Label;
@@ -36,13 +43,6 @@ import org.apache.wicket.model.IModel;
 import org.apache.wicket.model.Model;
 import org.apache.wicket.model.PropertyModel;
 import org.apache.wicket.spring.injection.annot.SpringBean;
-import org.apache.syncope.client.to.MembershipTO;
-import org.apache.syncope.client.to.RoleTO;
-import org.apache.syncope.client.to.UserTO;
-import org.apache.syncope.console.commons.RoleTreeBuilder;
-import org.apache.syncope.console.pages.MembershipModalPage;
-import org.apache.syncope.console.pages.UserModalPage;
-import org.apache.syncope.console.wicket.ajax.markup.html.IndicatingDeleteOnConfirmAjaxLink;
 
 public class RolesPanel extends Panel {
 
@@ -56,7 +56,6 @@ public class RolesPanel extends Panel {
     private UserTO userTO = null;
 
     public RolesPanel(final String id, final UserTO userTO, final boolean templateMode) {
-
         super(id);
         this.userTO = userTO;
 
@@ -128,12 +127,12 @@ public class RolesPanel extends Panel {
                 item.add(new Label("roleId", new Model(membershipTO.getRoleId())));
                 item.add(new Label("roleName", new Model(membershipTO.getRoleName())));
 
-                AjaxLink editLink = new IndicatingAjaxLink("editLink") {
+                AjaxLink editLink = new ClearIndicatingAjaxLink("editLink", getPage().getPageReference()) {
 
                     private static final long serialVersionUID = -7978723352517770644L;
 
                     @Override
-                    public void onClick(final AjaxRequestTarget target) {
+                    protected void onClickInternal(final AjaxRequestTarget target) {
                         membershipWin.setPageCreator(new ModalWindow.PageCreator() {
 
                             private static final long serialVersionUID = -7834632442532690940L;
@@ -150,17 +149,17 @@ public class RolesPanel extends Panel {
                 };
                 item.add(editLink);
 
-                AjaxLink deleteLink = new IndicatingDeleteOnConfirmAjaxLink("deleteLink") {
+                AjaxLink delete = new IndicatingDeleteOnConfirmAjaxLink("deleteLink", getPage().getPageReference()) {
 
                     private static final long serialVersionUID = -7978723352517770644L;
 
                     @Override
-                    public void onClick(final AjaxRequestTarget target) {
+                    protected void onClickInternal(final AjaxRequestTarget target) {
                         userTO.removeMembership(membershipTO);
                         target.add(membershipsContainer);
                     }
                 };
-                item.add(deleteLink);
+                item.add(delete);
             }
         };
 

Modified: syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/panels/SchedTasks.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/panels/SchedTasks.java?rev=1446584&r1=1446583&r2=1446584&view=diff
==============================================================================
--- syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/panels/SchedTasks.java (original)
+++ syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/panels/SchedTasks.java Fri Feb 15 14:00:02 2013
@@ -20,14 +20,26 @@ package org.apache.syncope.console.pages
 
 import java.util.ArrayList;
 import java.util.List;
-
+import org.apache.syncope.client.to.SchedTaskTO;
+import org.apache.syncope.client.to.TaskTO;
+import org.apache.syncope.client.validation.SyncopeClientCompositeErrorException;
+import org.apache.syncope.console.commons.Constants;
+import org.apache.syncope.console.commons.PreferenceManager;
+import org.apache.syncope.console.commons.XMLRolesReader;
+import org.apache.syncope.console.pages.SchedTaskModalPage;
+import org.apache.syncope.console.pages.Tasks;
+import org.apache.syncope.console.pages.Tasks.TasksProvider;
+import org.apache.syncope.console.rest.TaskRestClient;
+import org.apache.syncope.console.wicket.ajax.markup.html.ClearIndicatingAjaxLink;
+import org.apache.syncope.console.wicket.extensions.markup.html.repeater.data.table.DatePropertyColumn;
+import org.apache.syncope.console.wicket.markup.html.form.ActionLink;
+import org.apache.syncope.console.wicket.markup.html.form.ActionLinksPanel;
 import org.apache.wicket.Page;
 import org.apache.wicket.PageReference;
 import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
 import org.apache.wicket.ajax.markup.html.AjaxLink;
 import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy;
-import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxLink;
 import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
 import org.apache.wicket.extensions.ajax.markup.html.repeater.data.table.AjaxFallbackDefaultDataTable;
 import org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator;
@@ -44,19 +56,6 @@ import org.apache.wicket.model.PropertyM
 import org.apache.wicket.model.ResourceModel;
 import org.apache.wicket.request.http.WebResponse;
 import org.apache.wicket.spring.injection.annot.SpringBean;
-import org.apache.syncope.client.to.SchedTaskTO;
-import org.apache.syncope.client.to.TaskTO;
-import org.apache.syncope.client.validation.SyncopeClientCompositeErrorException;
-import org.apache.syncope.console.commons.Constants;
-import org.apache.syncope.console.commons.PreferenceManager;
-import org.apache.syncope.console.commons.XMLRolesReader;
-import org.apache.syncope.console.pages.SchedTaskModalPage;
-import org.apache.syncope.console.pages.Tasks;
-import org.apache.syncope.console.pages.Tasks.TasksProvider;
-import org.apache.syncope.console.rest.TaskRestClient;
-import org.apache.syncope.console.wicket.extensions.markup.html.repeater.data.table.DatePropertyColumn;
-import org.apache.syncope.console.wicket.markup.html.form.ActionLink;
-import org.apache.syncope.console.wicket.markup.html.form.ActionLinksPanel;
 
 public class SchedTasks extends Panel {
 
@@ -85,7 +84,7 @@ public class SchedTasks extends Panel {
 
     private AjaxFallbackDefaultDataTable<TaskTO> table;
 
-    public SchedTasks(final String id, final PageReference callerPageRef) {
+    public SchedTasks(final String id, final PageReference pageRef) {
 
         super(id);
 
@@ -100,7 +99,7 @@ public class SchedTasks extends Panel {
         window.setCookieName("view-task-win");
         add(window);
 
-        ((Tasks) callerPageRef.getPage()).setWindowClosedCallback(window, container);
+        ((Tasks) pageRef.getPage()).setWindowClosedCallback(window, container);
 
         paginatorRows = prefMan.getPaginatorRows(getWebRequest(), Constants.PREF_SCHED_TASKS_PAGINATOR_ROWS);
 
@@ -131,7 +130,7 @@ public class SchedTasks extends Panel {
 
                 final SchedTaskTO taskTO = (SchedTaskTO) model.getObject();
 
-                final ActionLinksPanel panel = new ActionLinksPanel(componentId, model);
+                final ActionLinksPanel panel = new ActionLinksPanel(componentId, model, pageRef);
 
                 panel.add(new ActionLink() {
 
@@ -139,14 +138,13 @@ public class SchedTasks extends Panel {
 
                     @Override
                     public void onClick(final AjaxRequestTarget target) {
-
                         window.setPageCreator(new ModalWindow.PageCreator() {
 
                             private static final long serialVersionUID = -7834632442532690940L;
 
                             @Override
                             public Page createPage() {
-                                return new SchedTaskModalPage(window, taskTO, callerPageRef);
+                                return new SchedTaskModalPage(window, taskTO, pageRef);
                             }
                         });
 
@@ -246,19 +244,19 @@ public class SchedTasks extends Panel {
         paginatorForm.add(rowsChooser);
         add(paginatorForm);
 
-        AjaxLink createLink = new IndicatingAjaxLink("createLink") {
+        AjaxLink createLink = new ClearIndicatingAjaxLink("createLink", pageRef) {
 
             private static final long serialVersionUID = -7978723352517770644L;
 
             @Override
-            public void onClick(final AjaxRequestTarget target) {
+            protected void onClickInternal(final AjaxRequestTarget target) {
                 window.setPageCreator(new ModalWindow.PageCreator() {
 
                     private static final long serialVersionUID = -7834632442532690940L;
 
                     @Override
                     public Page createPage() {
-                        return new SchedTaskModalPage(window, new SchedTaskTO(), callerPageRef);
+                        return new SchedTaskModalPage(window, new SchedTaskTO(), pageRef);
                     }
                 });
 



Mime
View raw message