syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ilgro...@apache.org
Subject svn commit: r1447162 [1/3] - in /syncope/trunk: ./ console/src/main/java/org/apache/syncope/console/pages/ console/src/main/java/org/apache/syncope/console/pages/panels/ console/src/main/java/org/apache/syncope/console/rest/ console/src/main/java/org/a...
Date Mon, 18 Feb 2013 09:19:27 GMT
Author: ilgrosso
Date: Mon Feb 18 09:19:25 2013
New Revision: 1447162

URL: http://svn.apache.org/r1447162
Log:
[SYNCOPE-315] Merge from 1_0_X

Added:
    syncope/trunk/console/src/main/java/org/apache/syncope/console/wicket/ajax/markup/html/ClearIndicatingAjaxButton.java
      - copied unchanged from r1446585, syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/wicket/ajax/markup/html/ClearIndicatingAjaxButton.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/wicket/ajax/markup/html/ClearIndicatingAjaxLink.java
      - copied unchanged from r1446585, syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/wicket/ajax/markup/html/ClearIndicatingAjaxLink.java
Modified:
    syncope/trunk/   (props changed)
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/AbstractSchedTaskModalPage.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ApprovalModalPage.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/BaseModalPage.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/Configuration.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ConfigurationModalPage.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ConnectorModalPage.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/DerivedSchemaModalPage.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/DisplayAttributesModalPage.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/EditUserModalPage.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/Login.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/MembershipModalPage.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/NotificationModalPage.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/NotificationTaskModalPage.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/PolicyModalPage.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/PropagationTaskModalPage.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ReportModalPage.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ReportletConfModalPage.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/Reports.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ResourceModalPage.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/Resources.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/RoleModalPage.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/Roles.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/Schema.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/SchemaModalPage.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/StatusModalPage.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/SyncTaskModalPage.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/TaskModalPage.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/Tasks.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/Todo.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/UserModalPage.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/Users.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/VirtualSchemaModalPage.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/AbstractSearchResultPanel.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/DerivedAttributesPanel.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/MembershipsPanel.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/NotificationTasks.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/PoliciesPanel.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/PropagationTasks.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/ResourceConnConfPanel.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/ResourceMappingPanel.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/RolePanel.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/RoleSearchResultPanel.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/RoleTabPanel.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/SchedTasks.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/SelectOnlyUserSearchResultPanel.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/SyncTasks.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/UserSearchPanel.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/UserSearchResultPanel.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/VirtualAttributesPanel.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/ApprovalRestClient.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/wicket/ajax/markup/html/IndicatingDeleteOnConfirmAjaxLink.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/wicket/markup/html/form/ActionLinksPanel.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/wicket/markup/html/tree/TreeActionLinkPanel.java
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/DisplayAttributesModalPage.properties
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/DisplayAttributesModalPage_it.properties
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/Resources.html

Propchange: syncope/trunk/
------------------------------------------------------------------------------
  Merged /syncope/branches/1_0_X:r1446276-1446585

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/AbstractSchedTaskModalPage.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/AbstractSchedTaskModalPage.java?rev=1447162&r1=1447161&r2=1447162&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/AbstractSchedTaskModalPage.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/AbstractSchedTaskModalPage.java Mon Feb 18 09:19:25 2013
@@ -23,11 +23,12 @@ import org.apache.syncope.common.to.Sync
 import org.apache.syncope.common.validation.SyncopeClientCompositeErrorException;
 import org.apache.syncope.console.commons.DateFormatROModel;
 import org.apache.syncope.console.markup.html.CrontabContainer;
+import org.apache.syncope.console.wicket.ajax.markup.html.ClearIndicatingAjaxButton;
 import org.apache.syncope.console.wicket.markup.html.form.AjaxTextFieldPanel;
 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.PropertyModel;
@@ -44,9 +45,9 @@ public abstract class AbstractSchedTaskM
     protected CrontabContainer crontab;
 
     public AbstractSchedTaskModalPage(final ModalWindow window, final SchedTaskTO taskTO,
-            final PageReference callerPageRef) {
+            final PageReference pageRef) {
 
-        super(taskTO);
+        super(taskTO, pageRef);
 
         crontab = new CrontabContainer("crontab", new PropertyModel<String>(taskTO, "cronExpression"),
                 taskTO.getCronExpression());
@@ -72,13 +73,12 @@ public abstract class AbstractSchedTaskM
         nextExec.setEnabled(false);
         profile.add(nextExec);
 
-        final IndicatingAjaxButton submit = new IndicatingAjaxButton("apply", new ResourceModel("apply")) {
+        final AjaxButton submit = new ClearIndicatingAjaxButton("apply", new ResourceModel("apply"), 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) {
                 SchedTaskTO taskTO = (SchedTaskTO) form.getModelObject();
                 taskTO.setCronExpression(!StringUtils.hasText(taskTO.getCronExpression())
                         ? null
@@ -99,7 +99,7 @@ public abstract class AbstractSchedTaskM
                         }
                     }
 
-                    ((BasePage) callerPageRef.getPage()).setModalResult(true);
+                    ((BasePage) pageRef.getPage()).setModalResult(true);
 
                     window.close(target);
                 } catch (SyncopeClientCompositeErrorException e) {
@@ -111,23 +111,18 @@ public abstract class AbstractSchedTaskM
 
             @Override
             protected void onError(final AjaxRequestTarget target, final Form<?> form) {
-
                 target.add(feedbackPanel);
             }
         };
 
-        final IndicatingAjaxButton cancel = new IndicatingAjaxButton("cancel", new ResourceModel("cancel")) {
+        final AjaxButton cancel = new ClearIndicatingAjaxButton("cancel", new ResourceModel("cancel"), 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) {
                 window.close(target);
             }
-
-            @Override
-            protected void onError(final AjaxRequestTarget target, final Form<?> form) {
-            }
         };
 
         cancel.setDefaultFormProcessing(false);

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ApprovalModalPage.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ApprovalModalPage.java?rev=1447162&r1=1447161&r2=1447162&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ApprovalModalPage.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ApprovalModalPage.java Mon Feb 18 09:19:25 2013
@@ -72,7 +72,7 @@ public class ApprovalModalPage extends B
 
     private final ModalWindow editUserWin;
 
-    public ApprovalModalPage(final PageReference callerPageRef, final ModalWindow window, final WorkflowFormTO formTO) {
+    public ApprovalModalPage(final PageReference pageRef, final ModalWindow window, final WorkflowFormTO formTO) {
         super();
 
         IModel<List<WorkflowFormPropertyTO>> formProps = new LoadableDetachableModel<List<WorkflowFormPropertyTO>>() {
@@ -227,7 +227,7 @@ public class ApprovalModalPage extends B
                 try {
                     restClient.submitForm(formTO);
 
-                    ((Todo) callerPageRef.getPage()).setModalResult(true);
+                    ((Todo) pageRef.getPage()).setModalResult(true);
                     window.close(target);
                 } catch (SyncopeClientCompositeErrorException e) {
                     error(getString("error") + ":" + e.getMessage());

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/BaseModalPage.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/BaseModalPage.java?rev=1447162&r1=1447161&r2=1447162&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/BaseModalPage.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/BaseModalPage.java Mon Feb 18 09:19:25 2013
@@ -29,7 +29,7 @@ public abstract class BaseModalPage exte
 
     public BaseModalPage() {
         super();
-        
+
         add(new CloseOnESCBehavior("keyup"));
     }
 }

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/Configuration.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/Configuration.java?rev=1447162&r1=1447161&r2=1447162&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/Configuration.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/Configuration.java Mon Feb 18 09:19:25 2013
@@ -42,14 +42,15 @@ import org.apache.syncope.console.rest.C
 import org.apache.syncope.console.rest.LoggerRestClient;
 import org.apache.syncope.console.rest.NotificationRestClient;
 import org.apache.syncope.console.rest.WorkflowRestClient;
+import org.apache.syncope.console.wicket.ajax.markup.html.ClearIndicatingAjaxButton;
 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.ajax.AjaxRequestTarget;
 import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
 import org.apache.wicket.ajax.markup.html.AjaxLink;
+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.extensions.ajax.markup.html.repeater.data.table.AjaxFallbackDefaultDataTable;
 import org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator;
@@ -135,9 +136,9 @@ public class Configuration extends BaseP
         add(editConfigWin = new ModalWindow("editConfigurationWin"));
         setupSyncopeConf();
 
-        add(new PoliciesPanel("passwordPoliciesPanel", PolicyType.PASSWORD));
-        add(new PoliciesPanel("accountPoliciesPanel", PolicyType.ACCOUNT));
-        add(new PoliciesPanel("syncPoliciesPanel", PolicyType.SYNC));
+        add(new PoliciesPanel("passwordPoliciesPanel", getPageReference(), PolicyType.PASSWORD));
+        add(new PoliciesPanel("accountPoliciesPanel", getPageReference(), PolicyType.ACCOUNT));
+        add(new PoliciesPanel("syncPoliciesPanel", getPageReference(), PolicyType.SYNC));
 
         add(createNotificationWin = new ModalWindow("createNotificationWin"));
         add(editNotificationWin = new ModalWindow("editNotificationWin"));
@@ -154,28 +155,27 @@ public class Configuration extends BaseP
                 new PropertyModel<WorkflowDefinitionTO>(workflowDef, "xmlDefinition"));
         wfForm.add(workflowDefArea);
 
-        IndicatingAjaxButton submit = new IndicatingAjaxButton("apply", new Model<String>(getString("submit"))) {
+        AjaxButton submit =
+                new ClearIndicatingAjaxButton("apply", new Model<String>(getString("submit")), getPageReference()) {
 
-            private static final long serialVersionUID = -958724007591692537L;
+                    private static final long serialVersionUID = -958724007591692537L;
 
-            @Override
-            protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
-
-                try {
-                    wfRestClient.updateDefinition(workflowDef);
-                    info(getString("operation_succeeded"));
-                } catch (SyncopeClientCompositeErrorException scee) {
-                    error(getString("error") + ":" + scee.getMessage());
-                }
-                target.add(feedbackPanel);
-            }
-
-            @Override
-            protected void onError(final AjaxRequestTarget target, final Form<?> form) {
+                    @Override
+                    protected void onSubmitInternal(final AjaxRequestTarget target, final Form<?> form) {
+                        try {
+                            wfRestClient.updateDefinition(workflowDef);
+                            info(getString("operation_succeeded"));
+                        } catch (SyncopeClientCompositeErrorException scee) {
+                            error(getString("error") + ":" + scee.getMessage());
+                        }
+                        target.add(feedbackPanel);
+                    }
 
-                target.add(feedbackPanel);
-            }
-        };
+                    @Override
+                    protected void onError(final AjaxRequestTarget target, final Form<?> form) {
+                        target.add(feedbackPanel);
+                    }
+                };
 
         MetaDataRoleAuthorizationStrategy.authorize(submit, ENABLE, xmlRolesReader.getAllAllowedRoles("Configuration",
                 "workflowDefUpdate"));
@@ -233,7 +233,7 @@ public class Configuration extends BaseP
 
                 final ConfigurationTO configurationTO = model.getObject();
 
-                final ActionLinksPanel panel = new ActionLinksPanel(componentId, model);
+                final ActionLinksPanel panel = new ActionLinksPanel(componentId, model, getPageReference());
 
                 panel.add(new ActionLink() {
 
@@ -402,7 +402,7 @@ public class Configuration extends BaseP
 
                 final NotificationTO notificationTO = model.getObject();
 
-                final ActionLinksPanel panel = new ActionLinksPanel(componentId, model);
+                final ActionLinksPanel panel = new ActionLinksPanel(componentId, model, getPageReference());
 
                 panel.add(new ActionLink() {
 

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ConfigurationModalPage.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ConfigurationModalPage.java?rev=1447162&r1=1447161&r2=1447162&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ConfigurationModalPage.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ConfigurationModalPage.java Mon Feb 18 09:19:25 2013
@@ -50,12 +50,12 @@ public class ConfigurationModalPage exte
     /**
      * ConfigurationModalPage constructor.
      *
-     * @param callPageRef base
+     * @param pageRef base
      * @param window
      * @param configurationTO
      * @param createFlag true for CREATE and false for UPDATE operation
      */
-    public ConfigurationModalPage(final PageReference callPageRef, final ModalWindow window,
+    public ConfigurationModalPage(final PageReference pageRef, final ModalWindow window,
             final ConfigurationTO configurationTO, final boolean createFlag) {
 
         Form form = new Form("form", new CompoundPropertyModel(configurationTO));
@@ -70,6 +70,7 @@ public class ConfigurationModalPage exte
         form.add(value);
 
         submit = new IndicatingAjaxButton("apply", new Model<String>(getString("submit"))) {
+
             private static final long serialVersionUID = -958724007591692537L;
 
             @Override
@@ -81,7 +82,7 @@ public class ConfigurationModalPage exte
                         configurationsRestClient.updateConfiguration(configurationTO);
                     }
 
-                    Configuration callerPage = (Configuration) callPageRef.getPage();
+                    Configuration callerPage = (Configuration) pageRef.getPage();
                     callerPage.setModalResult(true);
 
                     window.close(target);
@@ -103,6 +104,7 @@ public class ConfigurationModalPage exte
         };
 
         final IndicatingAjaxButton cancel = new IndicatingAjaxButton("cancel", new ResourceModel("cancel")) {
+
             private static final long serialVersionUID = -958724007591692537L;
 
             @Override

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ConnectorModalPage.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ConnectorModalPage.java?rev=1447162&r1=1447161&r2=1447162&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ConnectorModalPage.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ConnectorModalPage.java Mon Feb 18 09:19:25 2013
@@ -96,9 +96,7 @@ public class ConnectorModalPage extends 
 
     private List<ConnConfProperty> properties;
 
-    public ConnectorModalPage(final PageReference callerPageRef, final ModalWindow window,
-            final ConnInstanceTO connectorTO) {
-
+    public ConnectorModalPage(final PageReference pageRef, final ModalWindow window, final ConnInstanceTO connectorTO) {
         super();
 
         selectedCapabilities = new ArrayList<ConnectorCapability>(connectorTO.getId() == 0
@@ -355,12 +353,12 @@ public class ConnectorModalPage extends 
                         restClient.update(conn);
                     }
 
-                    ((Resources) callerPageRef.getPage()).setModalResult(true);
+                    ((Resources) pageRef.getPage()).setModalResult(true);
                     window.close(target);
                 } catch (SyncopeClientCompositeErrorException e) {
                     error(getString("error") + ":" + e.getMessage());
                     target.add(feedbackPanel);
-                    ((Resources) callerPageRef.getPage()).setModalResult(false);
+                    ((Resources) pageRef.getPage()).setModalResult(false);
                     LOG.error("While creating or updating connector {}", conn, e);
                 }
             }

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/DerivedSchemaModalPage.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/DerivedSchemaModalPage.java?rev=1447162&r1=1447161&r2=1447162&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/DerivedSchemaModalPage.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/DerivedSchemaModalPage.java Mon Feb 18 09:19:25 2013
@@ -23,12 +23,13 @@ import org.apache.syncope.common.to.Deri
 import org.apache.syncope.common.types.AttributableType;
 import org.apache.syncope.common.validation.SyncopeClientCompositeErrorException;
 import org.apache.syncope.console.commons.JexlHelpUtil;
+import org.apache.syncope.console.wicket.ajax.markup.html.ClearIndicatingAjaxButton;
 import org.apache.syncope.console.wicket.markup.html.form.AjaxTextFieldPanel;
 import org.apache.wicket.PageReference;
 import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.ajax.markup.html.AjaxLink;
+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.WebMarkupContainer;
 import org.apache.wicket.markup.html.form.Form;
@@ -48,7 +49,7 @@ public class DerivedSchemaModalPage 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) {
@@ -77,13 +78,12 @@ public class DerivedSchemaModalPage 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) {
                 DerivedSchemaTO schemaTO = (DerivedSchemaTO) form.getDefaultModelObject();
 
                 try {
@@ -92,8 +92,8 @@ public class DerivedSchemaModalPage exte
                     } else {
                         restClient.updateDerivedSchema(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);
@@ -105,23 +105,18 @@ public class DerivedSchemaModalPage exte
 
             @Override
             protected void onError(final AjaxRequestTarget target, final Form<?> form) {
-
                 target.add(feedbackPanel);
             }
         };
 
-        final IndicatingAjaxButton cancel = new IndicatingAjaxButton("cancel", new ResourceModel("cancel")) {
+        final AjaxButton cancel = new ClearIndicatingAjaxButton("cancel", new ResourceModel("cancel"), 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) {
                 window.close(target);
             }
-
-            @Override
-            protected void onError(final AjaxRequestTarget target, final Form<?> form) {
-            }
         };
 
         cancel.setDefaultFormProcessing(

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/DisplayAttributesModalPage.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/DisplayAttributesModalPage.java?rev=1447162&r1=1447161&r2=1447162&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/DisplayAttributesModalPage.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/DisplayAttributesModalPage.java Mon Feb 18 09:19:25 2013
@@ -30,9 +30,10 @@ import org.apache.syncope.common.types.A
 import org.apache.syncope.console.commons.Constants;
 import org.apache.syncope.console.commons.PreferenceManager;
 import org.apache.syncope.console.rest.SchemaRestClient;
+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.extensions.ajax.markup.html.IndicatingAjaxButton;
+import org.apache.wicket.ajax.markup.html.form.AjaxButton;
 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.Check;
@@ -160,7 +161,7 @@ public class DisplayAttributesModalPage 
 
     private final List<String> selectedDerSchemas;
 
-    public DisplayAttributesModalPage(final PageReference callerPageRef, final ModalWindow window) {
+    public DisplayAttributesModalPage(final PageReference pageRef, final ModalWindow window) {
 
         super();
 
@@ -265,18 +266,16 @@ public class DisplayAttributesModalPage 
             selectedDerSchemas.clear();
         }
 
-        final IndicatingAjaxButton submit = new IndicatingAjaxButton("submit", new ResourceModel("submit")) {
+        final AjaxButton submit = new ClearIndicatingAjaxButton("submit", new ResourceModel("submit"), 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) {
+                if (selectedDetails.size() + selectedSchemas.size() + selectedVirSchemas.size()
+                        + selectedDerSchemas.size() > MAX_SELECTIONS) {
 
-                if (selectedDetails.size() + selectedSchemas.size() + selectedVirSchemas.size() + selectedDerSchemas.
-                        size()
-                        > MAX_SELECTIONS) {
-
-                    error(getString("tooMuchSelections"));
+                    error(getString("tooManySelections"));
                     onError(target, form);
                 } else {
                     final Map<String, List<String>> prefs = new HashMap<String, List<String>>();
@@ -291,7 +290,7 @@ public class DisplayAttributesModalPage 
 
                     prefMan.setList(getRequest(), getResponse(), prefs);
 
-                    ((BasePage) callerPageRef.getPage()).setModalResult(true);
+                    ((BasePage) pageRef.getPage()).setModalResult(true);
 
                     window.close(target);
                 }
@@ -305,18 +304,14 @@ public class DisplayAttributesModalPage 
 
         form.add(submit);
 
-        final IndicatingAjaxButton cancel = new IndicatingAjaxButton("cancel", new ResourceModel("cancel")) {
+        final AjaxButton cancel = new ClearIndicatingAjaxButton("cancel", new ResourceModel("cancel"), 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) {
                 window.close(target);
             }
-
-            @Override
-            protected void onError(final AjaxRequestTarget target, final Form<?> form) {
-            }
         };
 
         cancel.setDefaultFormProcessing(false);

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/EditUserModalPage.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/EditUserModalPage.java?rev=1447162&r1=1447161&r2=1447162&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/EditUserModalPage.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/EditUserModalPage.java Mon Feb 18 09:19:25 2013
@@ -52,8 +52,8 @@ public class EditUserModalPage extends U
 
     private StatusPanel statusPanel;
 
-    public EditUserModalPage(final PageReference callerPageRef, final ModalWindow window, final UserTO userTO) {
-        super(callerPageRef, window, userTO, Mode.ADMIN, true);
+    public EditUserModalPage(final PageReference pageRef, final ModalWindow window, final UserTO userTO) {
+        super(pageRef, window, userTO, Mode.ADMIN, true);
 
         this.initialUserTO = AttributableOperations.clone(userTO);
 
@@ -71,7 +71,7 @@ public class EditUserModalPage extends U
 
             form.addOrReplace(new ResourcesPanel("resources", userTO, statusPanel));
 
-            form.addOrReplace(new MembershipsPanel("memberships", userTO, false, statusPanel));
+            form.addOrReplace(new MembershipsPanel("memberships", userTO, false, statusPanel, pageRef));
         }
     }
 

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/Login.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/Login.java?rev=1447162&r1=1447161&r2=1447162&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/Login.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/Login.java Mon Feb 18 09:19:25 2013
@@ -35,10 +35,12 @@ import org.apache.syncope.common.to.User
 import org.apache.syncope.common.util.CollectionWrapper;
 import org.apache.syncope.console.SyncopeSession;
 import org.apache.syncope.console.wicket.markup.html.form.LinkPanel;
+import org.apache.syncope.console.SyncopeSession;
+import org.apache.syncope.console.wicket.ajax.markup.html.ClearIndicatingAjaxLink;
+import org.apache.syncope.console.wicket.markup.html.form.LinkPanel;
 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.WebPage;
 import org.apache.wicket.markup.html.basic.Label;
@@ -123,8 +125,8 @@ public class Login extends WebPage {
                     error(getString("login-error"));
 
                     PreemptiveAuthHttpRequestFactory requestFactory =
-                            ((PreemptiveAuthHttpRequestFactory) SyncopeSession.get().getRestTemplate().
-                            getRequestFactory());
+                            ((PreemptiveAuthHttpRequestFactory) SyncopeSession.
+                            get().getRestTemplate().getRequestFactory());
 
                     ((DefaultHttpClient) requestFactory.getHttpClient()).getCredentialsProvider().clear();
                 }
@@ -149,12 +151,12 @@ public class Login extends WebPage {
         if (isSelfRegistrationAllowed()) {
             selfRegFrag = new Fragment("selfRegistration", "selfRegAllowed", this);
 
-            final AjaxLink selfRegLink = new IndicatingAjaxLink("link") {
+            final AjaxLink selfRegLink = new ClearIndicatingAjaxLink("link", getPageReference()) {
 
                 private static final long serialVersionUID = -7978723352517770644L;
 
                 @Override
-                public void onClick(final AjaxRequestTarget target) {
+                protected void onClickInternal(final AjaxRequestTarget target) {
                     editProfileModalWin.setPageCreator(new ModalWindow.PageCreator() {
 
                         private static final long serialVersionUID = -7834632442532690940L;

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/MembershipModalPage.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/MembershipModalPage.java?rev=1447162&r1=1447161&r2=1447162&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/MembershipModalPage.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/MembershipModalPage.java Mon Feb 18 09:19:25 2013
@@ -95,13 +95,13 @@ public class MembershipModalPage extends
         //--------------------------------
         // Derived attributes container
         //--------------------------------
-        form.add(new DerivedAttributesPanel("derivedAttributes", membershipTO));
+        form.add(new DerivedAttributesPanel("derivedAttributes", membershipTO, pageRef));
         //--------------------------------
 
         //--------------------------------
         // Virtual attributes container
         //--------------------------------
-        form.add(new VirtualAttributesPanel("virtualAttributes", membershipTO, templateMode));
+        form.add(new VirtualAttributesPanel("virtualAttributes", membershipTO, templateMode, pageRef));
         //--------------------------------
 
         add(form);

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/NotificationModalPage.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/NotificationModalPage.java?rev=1447162&r1=1447161&r2=1447162&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/NotificationModalPage.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/NotificationModalPage.java Mon Feb 18 09:19:25 2013
@@ -32,6 +32,7 @@ import org.apache.syncope.common.validat
 import org.apache.syncope.console.pages.panels.UserSearchPanel;
 import org.apache.syncope.console.rest.NotificationRestClient;
 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.AjaxDropDownChoicePanel;
 import org.apache.syncope.console.wicket.markup.html.form.AjaxPalettePanel;
@@ -41,7 +42,6 @@ import org.apache.wicket.ajax.AjaxReques
 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.modal.ModalWindow;
 import org.apache.wicket.markup.html.WebMarkupContainer;
 import org.apache.wicket.markup.html.form.Form;
@@ -68,7 +68,7 @@ class NotificationModalPage extends Base
     @SpringBean
     private SchemaRestClient schemaRestClient;
 
-    public NotificationModalPage(final PageReference callPageRef, final ModalWindow window,
+    public NotificationModalPage(final PageReference pageRef, final ModalWindow window,
             final NotificationTO notificationTO, final boolean createFlag) {
 
         Form form = new Form("form", new CompoundPropertyModel(notificationTO));
@@ -195,12 +195,12 @@ class NotificationModalPage extends Base
             }
         });
 
-        AjaxButton submit = new IndicatingAjaxButton("apply", new Model<String>(getString("submit"))) {
+        AjaxButton submit = new ClearIndicatingAjaxButton("apply", new Model<String>(getString("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) {
                 notificationTO.setAbout(about.buildSearchCond());
                 notificationTO.setRecipients(checkRecipients.getModelObject() ? recipients.buildSearchCond() : null);
 
@@ -212,7 +212,7 @@ class NotificationModalPage extends Base
                     }
                     info(getString("operation_succeeded"));
 
-                    Configuration callerPage = (Configuration) callPageRef.getPage();
+                    Configuration callerPage = (Configuration) pageRef.getPage();
                     callerPage.setModalResult(true);
 
                     window.close(target);
@@ -229,18 +229,14 @@ class NotificationModalPage extends Base
             }
         };
 
-        final IndicatingAjaxButton cancel = new IndicatingAjaxButton("cancel", new ResourceModel("cancel")) {
+        final AjaxButton cancel = new ClearIndicatingAjaxButton("cancel", new ResourceModel("cancel"), 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) {
                 window.close(target);
             }
-
-            @Override
-            protected void onError(final AjaxRequestTarget target, final Form<?> form) {
-            }
         };
 
         cancel.setDefaultFormProcessing(false);

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/NotificationTaskModalPage.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/NotificationTaskModalPage.java?rev=1447162&r1=1447161&r2=1447162&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/NotificationTaskModalPage.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/NotificationTaskModalPage.java Mon Feb 18 09:19:25 2013
@@ -22,6 +22,7 @@ import java.util.ArrayList;
 import org.apache.syncope.common.to.NotificationTaskTO;
 import org.apache.syncope.common.to.TaskTO;
 import org.apache.syncope.console.wicket.markup.html.form.AjaxTextFieldPanel;
+import org.apache.wicket.PageReference;
 import org.apache.wicket.markup.html.form.ListMultipleChoice;
 import org.apache.wicket.markup.html.form.TextArea;
 import org.apache.wicket.model.PropertyModel;
@@ -30,8 +31,8 @@ public class NotificationTaskModalPage e
 
     private static final long serialVersionUID = -4399606755452034216L;
 
-    public NotificationTaskModalPage(final TaskTO taskTO) {
-        super(taskTO);
+    public NotificationTaskModalPage(final TaskTO taskTO, final PageReference pageRef) {
+        super(taskTO, pageRef);
 
         final AjaxTextFieldPanel sender = new AjaxTextFieldPanel("sender", getString("sender"),
                 new PropertyModel<String>(taskTO, "sender"));

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/PolicyModalPage.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/PolicyModalPage.java?rev=1447162&r1=1447161&r2=1447162&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/PolicyModalPage.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/PolicyModalPage.java Mon Feb 18 09:19:25 2013
@@ -30,9 +30,12 @@ import org.apache.syncope.common.types.P
 import org.apache.syncope.common.types.SyncPolicySpec;
 import org.apache.syncope.console.pages.panels.PolicyBeanPanel;
 import org.apache.syncope.console.rest.PolicyRestClient;
+import org.apache.syncope.console.wicket.ajax.markup.html.ClearIndicatingAjaxButton;
 import org.apache.syncope.console.wicket.markup.html.form.AjaxDropDownChoicePanel;
 import org.apache.syncope.console.wicket.markup.html.form.AjaxTextFieldPanel;
+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.ChoiceRenderer;
@@ -51,8 +54,7 @@ public class PolicyModalPage<T extends P
     @SpringBean
     private PolicyRestClient policyRestClient;
 
-    public PolicyModalPage(final ModalWindow window, final T policyTO) {
-
+    public PolicyModalPage(final ModalWindow window, final T policyTO, final PageReference pageRef) {
         super();
 
         final Form form = new Form("form");
@@ -101,13 +103,12 @@ public class PolicyModalPage<T extends P
 
         form.add(new PolicyBeanPanel("panel", policy));
 
-        final IndicatingAjaxButton submit = new IndicatingAjaxButton("apply", new ResourceModel("apply")) {
+        final AjaxButton submit = new ClearIndicatingAjaxButton("apply", new ResourceModel("apply"), 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) {
                 setPolicySpecification(policyTO, policy);
 
                 try {

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/PropagationTaskModalPage.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/PropagationTaskModalPage.java?rev=1447162&r1=1447161&r2=1447162&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/PropagationTaskModalPage.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/PropagationTaskModalPage.java Mon Feb 18 09:19:25 2013
@@ -20,6 +20,7 @@ package org.apache.syncope.console.pages
 
 import org.apache.syncope.common.to.TaskTO;
 import org.apache.syncope.console.wicket.markup.html.form.AjaxTextFieldPanel;
+import org.apache.wicket.PageReference;
 import org.apache.wicket.model.PropertyModel;
 
 /**
@@ -29,8 +30,8 @@ public class PropagationTaskModalPage ex
 
     private static final long serialVersionUID = 523379887023786151L;
 
-    public PropagationTaskModalPage(final TaskTO taskTO) {
-        super(taskTO);
+    public PropagationTaskModalPage(final TaskTO taskTO, final PageReference pageRef) {
+        super(taskTO, pageRef);
 
         final AjaxTextFieldPanel accountId = new AjaxTextFieldPanel("accountId", getString("accountId"),
                 new PropertyModel<String>(taskTO, "accountId"));

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ReportModalPage.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ReportModalPage.java?rev=1447162&r1=1447161&r2=1447162&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ReportModalPage.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ReportModalPage.java Mon Feb 18 09:19:25 2013
@@ -35,6 +35,8 @@ import org.apache.syncope.console.common
 import org.apache.syncope.console.markup.html.CrontabContainer;
 import org.apache.syncope.console.rest.ReportRestClient;
 import org.apache.syncope.console.wicket.ajax.form.AbstractAjaxDownloadBehavior;
+import org.apache.syncope.console.wicket.ajax.markup.html.ClearIndicatingAjaxButton;
+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;
@@ -47,9 +49,8 @@ import org.apache.wicket.ajax.attributes
 import org.apache.wicket.ajax.attributes.AjaxRequestAttributes;
 import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
 import org.apache.wicket.ajax.markup.html.AjaxLink;
+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.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;
@@ -130,39 +131,40 @@ public class ReportModalPage extends Bas
                 "cronExpression"), reportTO.getCronExpression());
         form.add(crontab);
 
-        final IndicatingAjaxButton submit = new IndicatingAjaxButton("apply", new ResourceModel("apply")) {
+        final AjaxButton submit =
+                new ClearIndicatingAjaxButton("apply", new ResourceModel("apply"), getPageReference()) {
 
-            private static final long serialVersionUID = -958724007591692537L;
+                    private static final long serialVersionUID = -958724007591692537L;
 
-            @Override
-            protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
-                ReportTO reportTO = (ReportTO) form.getModelObject();
-                reportTO.setCronExpression(StringUtils.hasText(reportTO.getCronExpression())
-                        ? crontab.getCronExpression()
-                        : null);
+                    @Override
+                    protected void onSubmitInternal(final AjaxRequestTarget target, final Form<?> form) {
+                        ReportTO reportTO = (ReportTO) form.getModelObject();
+                        reportTO.setCronExpression(StringUtils.hasText(reportTO.getCronExpression())
+                                ? crontab.getCronExpression()
+                                : null);
 
-                try {
-                    if (reportTO.getId() > 0) {
-                        restClient.update(reportTO);
-                    } else {
-                        restClient.create(reportTO);
-                    }
+                        try {
+                            if (reportTO.getId() > 0) {
+                                restClient.update(reportTO);
+                            } else {
+                                restClient.create(reportTO);
+                            }
 
-                    ((BasePage) callerPageRef.getPage()).setModalResult(true);
+                            ((BasePage) callerPageRef.getPage()).setModalResult(true);
 
-                    window.close(target);
-                } catch (SyncopeClientCompositeErrorException e) {
-                    LOG.error("While creating or updating report", e);
-                    error(getString("error") + ":" + e.getMessage());
-                    target.add(feedbackPanel);
-                }
-            }
+                            window.close(target);
+                        } catch (SyncopeClientCompositeErrorException e) {
+                            LOG.error("While creating or updating report", e);
+                            error(getString("error") + ":" + e.getMessage());
+                            target.add(feedbackPanel);
+                        }
+                    }
 
-            @Override
-            protected void onError(final AjaxRequestTarget target, final Form<?> form) {
-                target.add(feedbackPanel);
-            }
-        };
+                    @Override
+                    protected void onError(final AjaxRequestTarget target, final Form<?> form) {
+                        target.add(feedbackPanel);
+                    }
+                };
 
         if (reportTO.getId() > 0) {
             MetaDataRoleAuthorizationStrategy.authorize(submit, RENDER, xmlRolesReader.getAllAllowedRoles("Reports",
@@ -174,19 +176,16 @@ public class ReportModalPage extends Bas
 
         form.add(submit);
 
-        final IndicatingAjaxButton cancel = new IndicatingAjaxButton("cancel", new ResourceModel("cancel")) {
-
-            private static final long serialVersionUID = -958724007591692537L;
+        final AjaxButton cancel =
+                new ClearIndicatingAjaxButton("cancel", new ResourceModel("cancel"), getPageReference()) {
 
-            @Override
-            protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
-                window.close(target);
-            }
+                    private static final long serialVersionUID = -958724007591692537L;
 
-            @Override
-            protected void onError(final AjaxRequestTarget target, final Form<?> form) {
-            }
-        };
+                    @Override
+                    protected void onSubmitInternal(final AjaxRequestTarget target, final Form<?> form) {
+                        window.close(target);
+                    }
+                };
 
         cancel.setDefaultFormProcessing(false);
         form.add(cancel);
@@ -465,7 +464,7 @@ public class ReportModalPage extends Bas
 
                 final ReportExecTO taskExecutionTO = model.getObject();
 
-                final ActionLinksPanel panel = new ActionLinksPanel(componentId, model);
+                final ActionLinksPanel panel = new ActionLinksPanel(componentId, model, getPageReference());
 
                 panel.add(new ActionLink() {
 
@@ -537,12 +536,12 @@ public class ReportModalPage extends Bas
                 new ReportExecutionsProvider(reportTO), 10);
         executions.add(table);
 
-        final AjaxLink reload = new IndicatingAjaxLink("reload") {
+        final AjaxLink reload = new ClearIndicatingAjaxLink("reload", getPageReference()) {
 
             private static final long serialVersionUID = -7978723352517770644L;
 
             @Override
-            public void onClick(AjaxRequestTarget target) {
+            protected void onClickInternal(final AjaxRequestTarget target) {
                 if (target != null) {
                     final ReportTO currentReportTO = reportTO.getId() == 0
                             ? reportTO

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ReportletConfModalPage.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ReportletConfModalPage.java?rev=1447162&r1=1447161&r2=1447162&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ReportletConfModalPage.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ReportletConfModalPage.java Mon Feb 18 09:19:25 2013
@@ -26,17 +26,16 @@ import java.util.Collections;
 import java.util.Date;
 import java.util.Iterator;
 import java.util.List;
-
 import org.apache.commons.lang.ArrayUtils;
 import org.apache.syncope.common.SyncopeConstants;
 import org.apache.syncope.common.annotation.FormAttributeField;
 import org.apache.syncope.common.report.AbstractReportletConf;
-import org.apache.syncope.common.report.ReportletConf;
 import org.apache.syncope.common.search.NodeCond;
 import org.apache.syncope.common.types.AttributableType;
 import org.apache.syncope.console.pages.panels.UserSearchPanel;
 import org.apache.syncope.console.rest.ReportRestClient;
 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.AjaxDropDownChoicePanel;
 import org.apache.syncope.console.wicket.markup.html.form.AjaxNumberFieldPanel;
@@ -51,7 +50,6 @@ 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.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;
@@ -86,16 +84,19 @@ public class ReportletConfModalPage exte
 
     private AbstractReportletConf reportletConf;
 
-    final AjaxTextFieldPanel name;
+    private final PageReference pageRef;
+
+    private final AjaxTextFieldPanel name;
 
     private WebMarkupContainer propertiesContainer;
 
     private ListView<String> propView;
 
     public ReportletConfModalPage(final AbstractReportletConf reportletConf, final ModalWindow window,
-            final PageReference callerPageRef) {
+            final PageReference pageRef) {
 
         this.reportletConf = reportletConf;
+        this.pageRef = pageRef;
 
         Form form = new Form("form");
         add(form);
@@ -179,7 +180,7 @@ public class ReportletConfModalPage exte
                     }
                 }
 
-                ((ReportModalPage) callerPageRef.getPage())
+                ((ReportModalPage) pageRef.getPage())
                         .setModalReportletConf(ReportletConfModalPage.this.reportletConf);
                 window.close(target);
             }
@@ -191,18 +192,14 @@ public class ReportletConfModalPage exte
         };
         form.add(submit);
 
-        final IndicatingAjaxButton cancel = new IndicatingAjaxButton("cancel", new ResourceModel("cancel")) {
+        final AjaxButton cancel = new ClearIndicatingAjaxButton("cancel", new ResourceModel("cancel"), 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) {
                 window.close(target);
             }
-
-            @Override
-            protected void onError(final AjaxRequestTarget target, final Form<?> form) {
-            }
         };
 
         cancel.setDefaultFormProcessing(false);
@@ -268,8 +265,8 @@ public class ReportletConfModalPage exte
                 try {
                     field = ReportletConfModalPage.this.reportletConf.getClass().getDeclaredField(fieldName);
                 } catch (Exception e) {
-                    LOG.error("Could not find field {} in class {}", fieldName,
-                            ReportletConfModalPage.this.reportletConf.getClass(), e);
+                    LOG.error("Could not find field {} in class {}", new Object[]{fieldName,
+                                ReportletConfModalPage.this.reportletConf.getClass(), e});
                 }
                 if (field == null) {
                     return;

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/Reports.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/Reports.java?rev=1447162&r1=1447161&r2=1447162&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/Reports.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/Reports.java Mon Feb 18 09:19:25 2013
@@ -36,6 +36,7 @@ import org.apache.syncope.console.markup
 import org.apache.syncope.console.pages.panels.JQueryTabbedPanel;
 import org.apache.syncope.console.rest.LoggerRestClient;
 import org.apache.syncope.console.rest.ReportRestClient;
+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;
@@ -47,7 +48,6 @@ import org.apache.wicket.ajax.form.AjaxF
 import org.apache.wicket.ajax.markup.html.AjaxLink;
 import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy;
 import org.apache.wicket.behavior.Behavior;
-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;
@@ -153,7 +153,7 @@ public class Reports extends BasePage {
 
                 final ReportTO reportTO = model.getObject();
 
-                final ActionLinksPanel panel = new ActionLinksPanel(componentId, model);
+                final ActionLinksPanel panel = new ActionLinksPanel(componentId, model, getPageReference());
 
                 panel.add(new ActionLink() {
 
@@ -189,7 +189,7 @@ public class Reports extends BasePage {
                             error(scce.getMessage());
                         }
 
-                        target.add(getPage().get("feedback"));
+                        target.add(feedbackPanel);
                         target.add(reportContainer);
                     }
                 }, ActionLink.ActionType.EXECUTE, "Reports", "execute");
@@ -207,7 +207,7 @@ public class Reports extends BasePage {
                             error(scce.getMessage());
                         }
                         target.add(reportContainer);
-                        target.add(getPage().get("feedback"));
+                        target.add(feedbackPanel);
                     }
                 }, ActionLink.ActionType.DELETE, "Reports", "delete");
 
@@ -221,12 +221,12 @@ public class Reports extends BasePage {
         reportContainer.add(reportTable);
         reportContainer.setOutputMarkupId(true);
 
-        final AjaxLink reload = new IndicatingAjaxLink("reload") {
+        final AjaxLink reload = new ClearIndicatingAjaxLink("reload", getPageReference()) {
 
             private static final long serialVersionUID = -7978723352517770644L;
 
             @Override
-            public void onClick(AjaxRequestTarget target) {
+            protected void onClickInternal(final AjaxRequestTarget target) {
                 if (target != null) {
                     target.add(reportTable);
                 }
@@ -279,12 +279,12 @@ public class Reports extends BasePage {
         paginatorForm.add(rowsChooser);
         add(paginatorForm);
 
-        AjaxLink createLink = new IndicatingAjaxLink("createLink") {
+        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) {
                 window.setPageCreator(new ModalWindow.PageCreator() {
 
                     private static final long serialVersionUID = -7834632442532690940L;

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ResourceModalPage.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ResourceModalPage.java?rev=1447162&r1=1447161&r2=1447162&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ResourceModalPage.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ResourceModalPage.java Mon Feb 18 09:19:25 2013
@@ -50,7 +50,7 @@ public class ResourceModalPage extends B
     @SpringBean
     private ResourceRestClient restClient;
 
-    public ResourceModalPage(final PageReference pageref, final ModalWindow window, final ResourceTO resourceTO,
+    public ResourceModalPage(final PageReference pageRef, final ModalWindow window, final ResourceTO resourceTO,
             final boolean createFlag) {
 
         super();
@@ -76,14 +76,14 @@ public class ResourceModalPage extends B
         //--------------------------------
         // Resource mapping panels
         //--------------------------------
-        form.add(new ResourceMappingPanel("umapping", resourceTO, AttributableType.USER));
-        form.add(new ResourceMappingPanel("rmapping", resourceTO, AttributableType.ROLE));
+        form.add(new ResourceMappingPanel("umapping", resourceTO, AttributableType.USER, pageRef));
+        form.add(new ResourceMappingPanel("rmapping", resourceTO, AttributableType.ROLE, pageRef));
         //--------------------------------
 
         //--------------------------------
         // Resource mapping panel
         //--------------------------------
-        form.add(new ResourceConnConfPanel("connconf", resourceTO, createFlag));
+        form.add(new ResourceConnConfPanel("connconf", resourceTO, createFlag, pageRef));
         //--------------------------------
 
         //--------------------------------
@@ -137,7 +137,7 @@ public class ResourceModalPage extends B
                             restClient.update(resourceTO);
                         }
 
-                        ((Resources) pageref.getPage()).setModalResult(true);
+                        ((Resources) pageRef.getPage()).setModalResult(true);
                         window.close(target);
                     } catch (Exception e) {
                         LOG.error("Failure managing resource {}", resourceTO, e);

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/Resources.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/Resources.java?rev=1447162&r1=1447161&r2=1447162&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/Resources.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/Resources.java Mon Feb 18 09:19:25 2013
@@ -30,6 +30,7 @@ import org.apache.syncope.console.common
 import org.apache.syncope.console.commons.SortableDataProviderComparator;
 import org.apache.syncope.console.rest.ConnectorRestClient;
 import org.apache.syncope.console.rest.ResourceRestClient;
+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.console.wicket.markup.html.form.LinkPanel;
@@ -38,7 +39,6 @@ import org.apache.wicket.ajax.AjaxReques
 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;
@@ -125,12 +125,12 @@ public class Resources extends BasePage 
             public void populateItem(final Item<ICellPopulator<ResourceTO>> cellItem, final String componentId,
                     final IModel<ResourceTO> rowModel) {
 
-                final IndicatingAjaxLink<String> editLink = new IndicatingAjaxLink<String>("link") {
+                final AjaxLink<String> editLink = new ClearIndicatingAjaxLink<String>("link", getPageReference()) {
 
                     private static final long serialVersionUID = -7978723352517770644L;
 
                     @Override
-                    public void onClick(final AjaxRequestTarget target) {
+                    protected void onClickInternal(final AjaxRequestTarget target) {
 
                         editConnectorWin.setPageCreator(new ModalWindow.PageCreator() {
 
@@ -177,7 +177,7 @@ public class Resources extends BasePage 
                     final IModel<ResourceTO> model) {
                 final ResourceTO resourceTO = model.getObject();
 
-                final ActionLinksPanel panel = new ActionLinksPanel(componentId, model);
+                final ActionLinksPanel panel = new ActionLinksPanel(componentId, model, getPageReference());
 
                 panel.add(new ActionLink() {
 
@@ -250,13 +250,12 @@ public class Resources extends BasePage 
         editResourceWin.setInitialWidth(WIN_WIDTH);
         editResourceWin.setCookieName("edit-res-modal");
 
-        AjaxLink createResourceLink = new IndicatingAjaxLink("createResourceLink") {
+        AjaxLink createResourceLink = new ClearIndicatingAjaxLink("createResourceLink", getPageReference()) {
 
             private static final long serialVersionUID = -7978723352517770644L;
 
             @Override
-            public void onClick(final AjaxRequestTarget target) {
-
+            protected void onClickInternal(final AjaxRequestTarget target) {
                 createResourceWin.setPageCreator(new ModalWindow.PageCreator() {
 
                     private static final long serialVersionUID = -7834632442532690940L;
@@ -329,7 +328,7 @@ public class Resources extends BasePage 
 
                 final ConnInstanceTO connectorTO = model.getObject();
 
-                final ActionLinksPanel panel = new ActionLinksPanel(componentId, model);
+                final ActionLinksPanel panel = new ActionLinksPanel(componentId, model, getPageReference());
 
                 panel.add(new ActionLink() {
 
@@ -401,13 +400,12 @@ public class Resources extends BasePage 
         editConnectorWin.setInitialWidth(WIN_WIDTH);
         editConnectorWin.setCookieName("edit-conn-modal");
 
-        AjaxLink createConnectorLink = new IndicatingAjaxLink("createConnectorLink") {
+        AjaxLink createConnectorLink = new ClearIndicatingAjaxLink("createConnectorLink", getPageReference()) {
 
             private static final long serialVersionUID = -7978723352517770644L;
 
             @Override
-            public void onClick(final AjaxRequestTarget target) {
-
+            protected void onClickInternal(final AjaxRequestTarget target) {
                 createConnectorWin.setPageCreator(new ModalWindow.PageCreator() {
 
                     private static final long serialVersionUID = -7834632442532690940L;

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/RoleModalPage.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/RoleModalPage.java?rev=1447162&r1=1447161&r2=1447162&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/RoleModalPage.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/RoleModalPage.java Mon Feb 18 09:19:25 2013
@@ -25,11 +25,11 @@ import org.apache.syncope.common.to.Role
 import org.apache.syncope.common.util.AttributableOperations;
 import org.apache.syncope.console.pages.panels.RolePanel;
 import org.apache.syncope.console.rest.RoleRestClient;
+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 class RoleModalPage extends BaseM
     @SpringBean
     private RoleRestClient roleRestClient;
 
-    protected final PageReference callerPageRef;
+    protected final PageReference pageRef;
 
     protected final ModalWindow window;
 
@@ -70,16 +70,14 @@ public class RoleModalPage extends BaseM
         this(null, window, roleTO, Mode.ADMIN);
     }
 
-    public RoleModalPage(final PageReference callerPageRef, final ModalWindow window, final RoleTO roleTO) {
-        this(callerPageRef, window, roleTO, Mode.ADMIN);
+    public RoleModalPage(final PageReference pageRef, final ModalWindow window, final RoleTO roleTO) {
+        this(pageRef, window, roleTO, Mode.ADMIN);
     }
 
-    public RoleModalPage(final PageReference callerPageRef, final ModalWindow window, final RoleTO roleTO,
-            final Mode mode) {
-
+    public RoleModalPage(final PageReference pageRef, final ModalWindow window, final RoleTO roleTO, final Mode mode) {
         super();
 
-        this.callerPageRef = callerPageRef;
+        this.pageRef = pageRef;
         this.window = window;
         this.mode = mode;
 
@@ -94,20 +92,20 @@ public class RoleModalPage extends BaseM
 
         form.setModel(new CompoundPropertyModel(roleTO));
 
-        this.rolePanel = new RolePanel("rolePanel", form, roleTO, mode);
+        this.rolePanel = new RolePanel("rolePanel", form, roleTO, mode, pageRef);
         form.add(rolePanel);
 
-        final AjaxButton submit = new IndicatingAjaxButton("submit", new ResourceModel("submit")) {
+        final AjaxButton submit = new ClearIndicatingAjaxButton("submit", 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);
@@ -123,18 +121,14 @@ public class RoleModalPage extends BaseM
             }
         };
 
-        final IndicatingAjaxButton cancel = new IndicatingAjaxButton("cancel", new ResourceModel("cancel")) {
+        final AjaxButton cancel = new ClearIndicatingAjaxButton("cancel", new ResourceModel("cancel"), 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) {
                 closeAction(target, form);
             }
-
-            @Override
-            protected void onError(final AjaxRequestTarget target, final Form<?> form) {
-            }
         };
 
         cancel.setDefaultFormProcessing(false);

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/Roles.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/Roles.java?rev=1447162&r1=1447161&r2=1447162&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/Roles.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/Roles.java Mon Feb 18 09:19:25 2013
@@ -24,12 +24,12 @@ import org.apache.syncope.console.pages.
 import org.apache.syncope.console.pages.panels.RoleSearchResultPanel;
 import org.apache.syncope.console.pages.panels.RoleSummaryPanel;
 import org.apache.syncope.console.rest.RoleRestClient;
+import org.apache.syncope.console.wicket.ajax.markup.html.ClearIndicatingAjaxButton;
 import org.apache.syncope.console.wicket.markup.html.tree.TreeRolePanel;
 import org.apache.wicket.Session;
 import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.event.Broadcast;
 import org.apache.wicket.event.IEvent;
-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.form.Form;
@@ -112,12 +112,12 @@ public class Roles extends BasePage {
         final RoleSearchPanel searchPanel = new RoleSearchPanel("searchPanel");
         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/trunk/console/src/main/java/org/apache/syncope/console/pages/Schema.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/Schema.java?rev=1447162&r1=1447161&r2=1447162&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/Schema.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/Schema.java Mon Feb 18 09:19:25 2013
@@ -33,6 +33,7 @@ import org.apache.syncope.console.common
 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;
@@ -41,7 +42,6 @@ import org.apache.wicket.ajax.AjaxReques
 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;
@@ -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/trunk/console/src/main/java/org/apache/syncope/console/pages/SchemaModalPage.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/SchemaModalPage.java?rev=1447162&r1=1447161&r2=1447162&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/SchemaModalPage.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/SchemaModalPage.java Mon Feb 18 09:19:25 2013
@@ -30,6 +30,7 @@ import org.apache.syncope.common.to.Sche
 import org.apache.syncope.common.types.AttributableType;
 import org.apache.syncope.common.types.AttributeSchemaType;
 import org.apache.syncope.common.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;
@@ -39,7 +40,6 @@ import org.apache.wicket.ajax.AjaxReques
 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;
@@ -64,8 +64,9 @@ 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) {
             schema = (SchemaTO) schemaTO;
@@ -88,6 +89,7 @@ public class SchemaModalPage extends Abs
                 getString("conversionPattern"), new PropertyModel<String>(schema, "conversionPattern"));
 
         final IModel<List<String>> validatorsList = new LoadableDetachableModel<List<String>>() {
+
             private static final long serialVersionUID = 5275935387613157437L;
 
             @Override
@@ -102,13 +104,14 @@ public class SchemaModalPage extends Abs
         ((DropDownChoice) validatorClass.getField()).setNullValid(true);
         validatorClass.setChoices(validatorsList.getObject());
 
-        final AjaxDropDownChoicePanel<AttributeSchemaType> type = new AjaxDropDownChoicePanel<AttributeSchemaType>("type",
+        final AjaxDropDownChoicePanel<AttributeSchemaType> type = new AjaxDropDownChoicePanel<AttributeSchemaType>(
+                "type",
                 getString("type"), new PropertyModel(schema, "type"));
         type.setChoices(Arrays.asList(AttributeSchemaType.values()));
         type.addRequiredLabel();
 
-        final AjaxTextFieldPanel enumerationValuesPanel = 
-            new AjaxTextFieldPanel("panel", "enumerationValues", new Model<String>(null));
+        final AjaxTextFieldPanel enumerationValuesPanel =
+                new AjaxTextFieldPanel("panel", "enumerationValues", new Model<String>(null));
         final MultiValueSelectorPanel<String> enumerationValues =
                 new MultiValueSelectorPanel<String>("enumerationValues",
                 new Model(),
@@ -135,6 +138,7 @@ public class SchemaModalPage extends Abs
         }
 
         type.getField().add(new AjaxFormComponentUpdatingBehavior("onchange") {
+
             private static final long serialVersionUID = -1107858522700306810L;
 
             @Override
@@ -170,6 +174,7 @@ public class SchemaModalPage extends Abs
         });
 
         final AutoCompleteTextField mandatoryCondition = new AutoCompleteTextField("mandatoryCondition") {
+
             private static final long serialVersionUID = -2428903969518079100L;
 
             @Override
@@ -192,6 +197,7 @@ public class SchemaModalPage extends Abs
         };
 
         mandatoryCondition.add(new AjaxFormComponentUpdatingBehavior("onchange") {
+
             private static final long serialVersionUID = -1107858522700306810L;
 
             @Override
@@ -208,12 +214,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()));
@@ -231,8 +237,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);
@@ -244,24 +250,20 @@ public class SchemaModalPage extends Abs
 
             @Override
             protected void onError(final AjaxRequestTarget target, final Form<?> form) {
-
                 target.add(feedbackPanel);
             }
         };
 
-        final IndicatingAjaxButton cancel = new IndicatingAjaxButton("cancel", new ResourceModel("cancel")) {
+        final AjaxButton cancel = new ClearIndicatingAjaxButton("cancel", new ResourceModel("cancel"), 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) {
                 window.close(target);
             }
-
-            @Override
-            protected void onError(final AjaxRequestTarget target, final Form<?> form) {
-            }
         };
-        
+
         cancel.setDefaultFormProcessing(false);
 
         String allowedRoles;



Mime
View raw message