You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by il...@apache.org on 2014/01/15 09:33:01 UTC

svn commit: r1558319 [1/2] - in /syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console: commons/ pages/ pages/panels/

Author: ilgrosso
Date: Wed Jan 15 08:33:00 2014
New Revision: 1558319

URL: http://svn.apache.org/r1558319
Log:
[SYNCOPE-476] Applying provided patch

Added:
    syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/commons/PageUtils.java   (with props)
Modified:
    syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/ApprovalModalPage.java
    syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/BasePage.java
    syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/BulkActionModalPage.java
    syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/Configuration.java
    syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/EditUserModalPage.java
    syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/Login.java
    syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/NotificationModalPage.java
    syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/PolicyModalPage.java
    syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/ReportModalPage.java
    syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/Reports.java
    syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/Resources.java
    syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/RoleModalPage.java
    syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/Roles.java
    syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/Schema.java
    syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/TaskModalPage.java
    syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/Tasks.java
    syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/Todo.java
    syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/UserModalPage.java
    syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/Users.java
    syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/panels/AbstractSearchResultPanel.java
    syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/panels/MembershipsPanel.java
    syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/panels/RoleDetailsPanel.java
    syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/panels/RoleSearchResultPanel.java
    syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/panels/UserSearchResultPanel.java

Added: syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/commons/PageUtils.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/commons/PageUtils.java?rev=1558319&view=auto
==============================================================================
--- syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/commons/PageUtils.java (added)
+++ syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/commons/PageUtils.java Wed Jan 15 08:33:00 2014
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.console.commons;
+
+import org.apache.wicket.Page;
+import org.apache.wicket.PageReference;
+
+public final class PageUtils {
+
+    private PageUtils() {
+        // private constructor for static utility class
+    }
+
+    public static PageReference getPageReference(final Page page) {
+        page.internalInitialize();
+        return page.getPageReference();
+    }
+}

Propchange: syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/commons/PageUtils.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/commons/PageUtils.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/commons/PageUtils.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/ApprovalModalPage.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/ApprovalModalPage.java?rev=1558319&r1=1558318&r2=1558319&view=diff
==============================================================================
--- syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/ApprovalModalPage.java (original)
+++ syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/ApprovalModalPage.java Wed Jan 15 08:33:00 2014
@@ -32,6 +32,7 @@ import org.apache.syncope.common.to.Work
 import org.apache.syncope.common.validation.SyncopeClientCompositeErrorException;
 import org.apache.syncope.console.commons.Constants;
 import org.apache.syncope.console.commons.MapChoiceRenderer;
+import org.apache.syncope.console.commons.PageUtils;
 import org.apache.syncope.console.markup.html.list.AltListView;
 import org.apache.syncope.console.rest.ApprovalRestClient;
 import org.apache.syncope.console.wicket.markup.html.form.AjaxDropDownChoicePanel;
@@ -171,8 +172,8 @@ public class ApprovalModalPage extends B
 
                             @Override
                             public Page createPage() {
-                                return new ViewUserModalPage(ApprovalModalPage.this.getPageReference(), editUserWin,
-                                        userRestClient.read(formTO.getUserId())) {
+                                return new ViewUserModalPage(PageUtils.getPageReference(ApprovalModalPage.this),
+                                        editUserWin, userRestClient.read(formTO.getUserId())) {
 
                                     private static final long serialVersionUID = -2819994749866481607L;
 

Modified: syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/BasePage.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/BasePage.java?rev=1558319&r1=1558318&r2=1558319&view=diff
==============================================================================
--- syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/BasePage.java (original)
+++ syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/BasePage.java Wed Jan 15 08:33:00 2014
@@ -22,6 +22,7 @@ import org.apache.syncope.common.to.User
 import org.apache.syncope.console.SyncopeApplication;
 import org.apache.syncope.console.SyncopeSession;
 import org.apache.syncope.console.commons.Constants;
+import org.apache.syncope.console.commons.PageUtils;
 import org.apache.wicket.Component;
 import org.apache.wicket.Page;
 import org.apache.wicket.ajax.AjaxRequestTarget;
@@ -116,7 +117,7 @@ public class BasePage extends AbstractBa
 
                     @Override
                     public Page createPage() {
-                        return new UserRequestModalPage(BasePage.this.getPageReference(), editProfileModalWin,
+                        return new UserRequestModalPage(PageUtils.getPageReference(BasePage.this), editProfileModalWin,
                                 userTO, UserModalPage.Mode.SELF);
                     }
                 });

Modified: syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/BulkActionModalPage.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/BulkActionModalPage.java?rev=1558319&r1=1558318&r2=1558319&view=diff
==============================================================================
--- syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/BulkActionModalPage.java (original)
+++ syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/BulkActionModalPage.java Wed Jan 15 08:33:00 2014
@@ -24,6 +24,7 @@ import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Iterator;
 import java.util.List;
+import org.apache.syncope.console.commons.PageUtils;
 import org.apache.syncope.common.to.BulkAction;
 import org.apache.syncope.common.to.BulkActionRes;
 import org.apache.syncope.console.rest.BaseRestClient;
@@ -84,7 +85,8 @@ public class BulkActionModalPage<T, S> e
                 dataProvider,
                 Integer.MAX_VALUE).setVisible(items != null && !items.isEmpty()));
 
-        final ActionLinksPanel actionPanel = new ActionLinksPanel("actions", new Model(), getPageReference());
+        final ActionLinksPanel actionPanel = new ActionLinksPanel("actions", new Model(),
+                PageUtils.getPageReference(getPage()));
         add(actionPanel);
 
         for (ActionLink.ActionType action : actions) {
@@ -139,16 +141,16 @@ public class BulkActionModalPage<T, S> e
         final Form form = new Form(FORM);
         add(form);
 
-        final AjaxButton cancel =
-                new ClearIndicatingAjaxButton(CANCEL, new ResourceModel(CANCEL), getPageReference()) {
+        final AjaxButton cancel = new ClearIndicatingAjaxButton(CANCEL, new ResourceModel(CANCEL),
+                PageUtils.getPageReference(getPage())) {
 
-            private static final long serialVersionUID = -958724007591692537L;
+                    private static final long serialVersionUID = -958724007591692537L;
 
-            @Override
-            protected void onSubmitInternal(final AjaxRequestTarget target, final Form<?> form) {
-                window.close(target);
-            }
-        };
+                    @Override
+                    protected void onSubmitInternal(final AjaxRequestTarget target, final Form<?> form) {
+                        window.close(target);
+                    }
+                };
 
         cancel.setDefaultFormProcessing(false);
         form.add(cancel);

Modified: syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/Configuration.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/Configuration.java?rev=1558319&r1=1558318&r2=1558319&view=diff
==============================================================================
--- syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/Configuration.java (original)
+++ syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/Configuration.java Wed Jan 15 08:33:00 2014
@@ -26,6 +26,7 @@ import java.util.Arrays;
 import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
+import org.apache.syncope.console.commons.PageUtils;
 import org.apache.syncope.common.to.ConfigurationTO;
 import org.apache.syncope.common.to.LoggerTO;
 import org.apache.syncope.common.to.NotificationTO;
@@ -137,9 +138,9 @@ public class Configuration extends BaseP
         add(editConfigWin = new ModalWindow("editConfigurationWin"));
         setupSyncopeConf();
 
-        add(new PoliciesPanel("passwordPoliciesPanel", getPageReference(), PolicyType.PASSWORD));
-        add(new PoliciesPanel("accountPoliciesPanel", getPageReference(), PolicyType.ACCOUNT));
-        add(new PoliciesPanel("syncPoliciesPanel", getPageReference(), PolicyType.SYNC));
+        add(new PoliciesPanel("passwordPoliciesPanel", PageUtils.getPageReference(getPage()), PolicyType.PASSWORD));
+        add(new PoliciesPanel("accountPoliciesPanel", PageUtils.getPageReference(getPage()), PolicyType.ACCOUNT));
+        add(new PoliciesPanel("syncPoliciesPanel", PageUtils.getPageReference(getPage()), PolicyType.SYNC));
 
         add(createNotificationWin = new ModalWindow("createNotificationWin"));
         add(editNotificationWin = new ModalWindow("editNotificationWin"));
@@ -156,27 +157,27 @@ public class Configuration extends BaseP
                 new PropertyModel<WorkflowDefinitionTO>(workflowDef, "xmlDefinition"));
         wfForm.add(workflowDefArea);
 
-        AjaxButton submit =
-                new ClearIndicatingAjaxButton(APPLY, new Model<String>(getString(SUBMIT)), getPageReference()) {
+        AjaxButton submit = new ClearIndicatingAjaxButton(APPLY, new Model<String>(getString(SUBMIT)),
+                PageUtils.getPageReference(getPage())) {
 
-            private static final long serialVersionUID = -958724007591692537L;
+                    private static final long serialVersionUID = -958724007591692537L;
 
-            @Override
-            protected void onSubmitInternal(final AjaxRequestTarget target, final Form<?> form) {
-                try {
-                    wfRestClient.updateDefinition(workflowDef);
-                    info(getString(Constants.OPERATION_SUCCEEDED));
-                } catch (SyncopeClientCompositeErrorException scee) {
-                    error(getString(Constants.ERROR) + ":" + scee.getMessage());
-                }
-                target.add(feedbackPanel);
-            }
+                    @Override
+                    protected void onSubmitInternal(final AjaxRequestTarget target, final Form<?> form) {
+                        try {
+                            wfRestClient.updateDefinition(workflowDef);
+                            info(getString(Constants.OPERATION_SUCCEEDED));
+                        } catch (SyncopeClientCompositeErrorException scee) {
+                            error(getString(Constants.ERROR) + ":" + scee.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);
+                    }
+                };
 
         MetaDataRoleAuthorizationStrategy.authorize(submit, ENABLE, xmlRolesReader.getAllAllowedRoles("Configuration",
                 "workflowDefUpdate"));
@@ -233,7 +234,8 @@ public class Configuration extends BaseP
 
                 final ConfigurationTO configurationTO = model.getObject();
 
-                final ActionLinksPanel panel = new ActionLinksPanel(componentId, model, getPageReference());
+                final ActionLinksPanel panel = new ActionLinksPanel(componentId, model,
+                        PageUtils.getPageReference(getPage()));
 
                 panel.add(new ActionLink() {
 
@@ -248,8 +250,8 @@ public class Configuration extends BaseP
 
                             @Override
                             public Page createPage() {
-                                return new ConfigurationModalPage(Configuration.this.getPageReference(), editConfigWin,
-                                        configurationTO, false);
+                                return new ConfigurationModalPage(PageUtils.getPageReference(Configuration.this),
+                                        editConfigWin, configurationTO, false);
                             }
                         });
 
@@ -284,7 +286,7 @@ public class Configuration extends BaseP
 
         final AjaxFallbackDefaultDataTable<ConfigurationTO, String> confTable =
                 new AjaxFallbackDefaultDataTable<ConfigurationTO, String>(
-                "syncopeconf", confColumns, new SyncopeConfProvider(), confPaginatorRows);
+                        "syncopeconf", confColumns, new SyncopeConfProvider(), confPaginatorRows);
 
         confContainer = new WebMarkupContainer("confContainer");
         confContainer.add(confTable);
@@ -318,8 +320,8 @@ public class Configuration extends BaseP
 
                     @Override
                     public Page createPage() {
-                        return new ConfigurationModalPage(Configuration.this.getPageReference(), createConfigWin,
-                                new ConfigurationTO(), true);
+                        return new ConfigurationModalPage(PageUtils.getPageReference(Configuration.this),
+                                createConfigWin, new ConfigurationTO(), true);
                     }
                 });
 
@@ -408,7 +410,8 @@ public class Configuration extends BaseP
 
                 final NotificationTO notificationTO = model.getObject();
 
-                final ActionLinksPanel panel = new ActionLinksPanel(componentId, model, getPageReference());
+                final ActionLinksPanel panel = new ActionLinksPanel(componentId, model,
+                        PageUtils.getPageReference(getPage()));
 
                 panel.add(new ActionLink() {
 
@@ -423,7 +426,7 @@ public class Configuration extends BaseP
 
                             @Override
                             public Page createPage() {
-                                return new NotificationModalPage(Configuration.this.getPageReference(),
+                                return new NotificationModalPage(PageUtils.getPageReference(Configuration.this),
                                         editNotificationWin, notificationTO, false);
                             }
                         });
@@ -459,7 +462,7 @@ public class Configuration extends BaseP
 
         final AjaxFallbackDefaultDataTable<NotificationTO, String> notificationTable =
                 new AjaxFallbackDefaultDataTable<NotificationTO, String>(
-                "notificationTable", notificationCols, new NotificationProvider(), notificationPaginatorRows);
+                        "notificationTable", notificationCols, new NotificationProvider(), notificationPaginatorRows);
 
         notificationContainer = new WebMarkupContainer("notificationContainer");
         notificationContainer.add(notificationTable);
@@ -493,8 +496,8 @@ public class Configuration extends BaseP
 
                     @Override
                     public Page createPage() {
-                        return new NotificationModalPage(Configuration.this.getPageReference(), createNotificationWin,
-                                new NotificationTO(), true);
+                        return new NotificationModalPage(PageUtils.getPageReference(Configuration.this),
+                                createNotificationWin, new NotificationTO(), true);
                     }
                 });
 

Modified: syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/EditUserModalPage.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/EditUserModalPage.java?rev=1558319&r1=1558318&r2=1558319&view=diff
==============================================================================
--- syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/EditUserModalPage.java (original)
+++ syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/EditUserModalPage.java Wed Jan 15 08:33:00 2014
@@ -21,6 +21,7 @@ package org.apache.syncope.console.pages
 import java.util.ArrayList;
 import org.apache.commons.lang3.SerializationUtils;
 import org.apache.syncope.common.mod.UserMod;
+import org.apache.syncope.console.commons.PageUtils;
 import org.apache.syncope.common.to.UserTO;
 import org.apache.syncope.common.util.AttributableOperations;
 import org.apache.syncope.console.commons.StatusBean;
@@ -60,7 +61,8 @@ public class EditUserModalPage extends U
         if (userTO.getId() != 0) {
             form.addOrReplace(new Label("pwdChangeInfo", new ResourceModel("pwdChangeInfo")));
 
-            statusPanel = new StatusPanel("statuspanel", userTO, new ArrayList<StatusBean>(), getPageReference());
+            statusPanel = new StatusPanel("statuspanel", userTO, new ArrayList<StatusBean>(),
+                    PageUtils.getPageReference(getPage()));
             statusPanel.setOutputMarkupId(true);
             MetaDataRoleAuthorizationStrategy.authorize(
                     statusPanel, RENDER, xmlRolesReader.getAllAllowedRoles("Resources", "getConnectorObject"));
@@ -71,7 +73,8 @@ public class EditUserModalPage extends U
             form.addOrReplace(new ResourcesPanel.Builder("resources").attributableTO(userTO).statusPanel(
                     statusPanel).build());
 
-            form.addOrReplace(new MembershipsPanel("memberships", userTO, false, statusPanel, getPageReference()));
+            form.addOrReplace(new MembershipsPanel("memberships", userTO, false, statusPanel,
+                    PageUtils.getPageReference(getPage())));
         }
     }
 

Modified: syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/Login.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/Login.java?rev=1558319&r1=1558318&r2=1558319&view=diff
==============================================================================
--- syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/Login.java (original)
+++ syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/Login.java Wed Jan 15 08:33:00 2014
@@ -27,6 +27,7 @@ import org.apache.http.client.methods.Ht
 import org.apache.http.impl.client.DefaultHttpClient;
 import org.apache.http.util.EntityUtils;
 import org.apache.syncope.client.http.PreemptiveAuthHttpRequestFactory;
+import org.apache.syncope.console.commons.PageUtils;
 import org.apache.syncope.common.services.EntitlementService;
 import org.apache.syncope.common.services.UserRequestService;
 import org.apache.syncope.common.to.EntitlementTO;
@@ -149,26 +150,27 @@ public class Login extends WebPage {
         if (isSelfRegistrationAllowed()) {
             selfRegFrag = new Fragment("selfRegistration", "selfRegAllowed", this);
 
-            final AjaxLink<Void> selfRegLink = new ClearIndicatingAjaxLink<Void>("link", getPageReference()) {
+            final AjaxLink<Void> selfRegLink = new ClearIndicatingAjaxLink<Void>("link",
+                    PageUtils.getPageReference(getPage())) {
 
-                private static final long serialVersionUID = -7978723352517770644L;
+                        private static final long serialVersionUID = -7978723352517770644L;
 
-                @Override
-                protected void onClickInternal(final AjaxRequestTarget target) {
-                    editProfileModalWin.setPageCreator(new ModalWindow.PageCreator() {
+                        @Override
+                        protected void onClickInternal(final AjaxRequestTarget target) {
+                            editProfileModalWin.setPageCreator(new ModalWindow.PageCreator() {
 
-                        private static final long serialVersionUID = -7834632442532690940L;
+                                private static final long serialVersionUID = -7834632442532690940L;
 
-                        @Override
-                        public Page createPage() {
-                            return new UserRequestModalPage(Login.this.getPageReference(), editProfileModalWin,
-                                    new UserTO(), UserModalPage.Mode.SELF);
-                        }
-                    });
+                                @Override
+                                public Page createPage() {
+                                    return new UserRequestModalPage(PageUtils.getPageReference(Login.this),
+                                            editProfileModalWin, new UserTO(), UserModalPage.Mode.SELF);
+                                }
+                            });
 
-                    editProfileModalWin.show(target);
-                }
-            };
+                            editProfileModalWin.show(target);
+                        }
+                    };
             selfRegLink.add(new Label("linkTitle", getString("selfRegistration")));
 
             Panel panel = new LinkPanel("selfRegistration", new ResourceModel("selfRegistration"));

Modified: syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/NotificationModalPage.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/NotificationModalPage.java?rev=1558319&r1=1558318&r2=1558319&view=diff
==============================================================================
--- syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/NotificationModalPage.java (original)
+++ syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/NotificationModalPage.java Wed Jan 15 08:33:00 2014
@@ -23,6 +23,7 @@ import java.util.Arrays;
 import java.util.Collections;
 import java.util.EnumSet;
 import java.util.List;
+import org.apache.syncope.console.commons.PageUtils;
 import org.apache.syncope.common.to.EventCategoryTO;
 import org.apache.syncope.common.to.NotificationTO;
 import org.apache.syncope.common.types.AttributableType;
@@ -151,7 +152,7 @@ class NotificationModalPage extends Base
                 "eventSelection",
                 loggerRestClient.listEvents(),
                 new PropertyModel<List<String>>(notificationTO, "events"),
-                getPageReference(),
+                PageUtils.getPageReference(getPage()),
                 "Notification") {
 
             private static final long serialVersionUID = 6429053774964787735L;

Modified: syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/PolicyModalPage.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/PolicyModalPage.java?rev=1558319&r1=1558318&r2=1558319&view=diff
==============================================================================
--- syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/PolicyModalPage.java (original)
+++ syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/PolicyModalPage.java Wed Jan 15 08:33:00 2014
@@ -23,6 +23,7 @@ import java.util.Arrays;
 import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
+import org.apache.syncope.console.commons.PageUtils;
 import org.apache.syncope.common.to.AccountPolicyTO;
 import org.apache.syncope.common.to.PasswordPolicyTO;
 import org.apache.syncope.common.to.PolicyTO;
@@ -36,7 +37,6 @@ import org.apache.syncope.common.types.S
 import org.apache.syncope.console.commons.Constants;
 import org.apache.syncope.console.pages.panels.PolicyBeanPanel;
 import org.apache.syncope.console.rest.PolicyRestClient;
-import org.apache.syncope.console.rest.ResourceRestClient;
 import org.apache.syncope.console.rest.RoleRestClient;
 import org.apache.syncope.console.wicket.markup.html.form.ActionLink;
 import org.apache.syncope.console.wicket.markup.html.form.ActionLinksPanel;
@@ -80,9 +80,6 @@ public class PolicyModalPage<T extends P
     private PolicyRestClient policyRestClient;
 
     @SpringBean
-    private ResourceRestClient resourceRestClient;
-
-    @SpringBean
     private RoleRestClient roleRestClient;
 
     public PolicyModalPage(final ModalWindow window, final T policyTO) {
@@ -168,7 +165,8 @@ public class PolicyModalPage<T extends P
 
                 final String resource = model.getObject();
 
-                final ActionLinksPanel panel = new ActionLinksPanel(componentId, model, getPageReference());
+                final ActionLinksPanel panel = new ActionLinksPanel(componentId, model,
+                        PageUtils.getPageReference(getPage()));
                 panel.add(new ActionLink() {
 
                     private static final long serialVersionUID = -3722207913631435501L;
@@ -181,7 +179,7 @@ public class PolicyModalPage<T extends P
 
                             @Override
                             public Page createPage() {
-                                return new ResourceModalPage(PolicyModalPage.this.getPageReference(),
+                                return new ResourceModalPage(PageUtils.getPageReference(PolicyModalPage.this),
                                         mwindow, resourceRestClient.read(resource), false);
                             }
                         });
@@ -240,7 +238,8 @@ public class PolicyModalPage<T extends P
 
                 final RoleTO role = model.getObject();
 
-                final ActionLinksPanel panel = new ActionLinksPanel(componentId, model, getPageReference());
+                final ActionLinksPanel panel = new ActionLinksPanel(componentId, model,
+                        PageUtils.getPageReference(getPage()));
                 panel.add(new ActionLink() {
 
                     private static final long serialVersionUID = -3722207913631435501L;

Modified: syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/ReportModalPage.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/ReportModalPage.java?rev=1558319&r1=1558318&r2=1558319&view=diff
==============================================================================
--- syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/ReportModalPage.java (original)
+++ syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/ReportModalPage.java Wed Jan 15 08:33:00 2014
@@ -22,6 +22,7 @@ import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
+import org.apache.syncope.console.commons.PageUtils;
 import org.apache.syncope.common.report.AbstractReportletConf;
 import org.apache.syncope.common.report.ReportletConf;
 import org.apache.syncope.common.to.ReportExecTO;
@@ -115,7 +116,7 @@ public class ReportModalPage extends Bas
         this.reportTO = reportTO;
 
         form = new Form<ReportTO>(FORM);
-        form.setModel(new CompoundPropertyModel(reportTO));
+        form.setModel(new CompoundPropertyModel<ReportTO>(reportTO));
         add(form);
 
         setupProfile();
@@ -126,7 +127,7 @@ public class ReportModalPage extends Bas
         form.add(crontab);
 
         final AjaxButton submit =
-                new ClearIndicatingAjaxButton(APPLY, new ResourceModel(APPLY), getPageReference()) {
+                new ClearIndicatingAjaxButton(APPLY, new ResourceModel(APPLY), PageUtils.getPageReference(getPage())) {
 
                     private static final long serialVersionUID = -958724007591692537L;
 
@@ -170,8 +171,8 @@ public class ReportModalPage extends Bas
 
         form.add(submit);
 
-        final AjaxButton cancel =
-                new ClearIndicatingAjaxButton(CANCEL, new ResourceModel(CANCEL), getPageReference()) {
+        final AjaxButton cancel = new ClearIndicatingAjaxButton(CANCEL, new ResourceModel(CANCEL),
+                PageUtils.getPageReference(getPage())) {
 
                     private static final long serialVersionUID = -958724007591692537L;
 
@@ -263,13 +264,13 @@ public class ReportModalPage extends Bas
                     }
                 }) {
 
-            private static final long serialVersionUID = 4022366881854379834L;
+                    private static final long serialVersionUID = 4022366881854379834L;
 
-            @Override
-            protected CharSequence getDefaultChoice(String selectedValue) {
-                return null;
-            }
-        };
+                    @Override
+                    protected CharSequence getDefaultChoice(final String selectedValue) {
+                        return null;
+                    }
+                };
 
         reportlets.setNullValid(true);
         profile.add(reportlets);
@@ -283,7 +284,7 @@ public class ReportModalPage extends Bas
             }
         });
 
-        profile.add(new AjaxLink(ADD_BUTTON_ID) {
+        profile.add(new AjaxLink<Void>(ADD_BUTTON_ID) {
 
             private static final long serialVersionUID = -7978723352517770644L;
 
@@ -298,14 +299,14 @@ public class ReportModalPage extends Bas
                         modalReportletConfOldName = null;
                         modalReportletConf = null;
                         return new ReportletConfModalPage(null, reportletConfWin,
-                                ReportModalPage.this.getPageReference());
+                                PageUtils.getPageReference(ReportModalPage.this));
                     }
                 });
                 reportletConfWin.show(target);
             }
         });
 
-        profile.add(new AjaxLink(EDIT_BUTTON_ID) {
+        profile.add(new AjaxLink<Void>(EDIT_BUTTON_ID) {
 
             private static final long serialVersionUID = -7978723352517770644L;
 
@@ -322,7 +323,7 @@ public class ReportModalPage extends Bas
                             modalReportletConfOldName = reportlets.getModelObject().getName();
                             modalReportletConf = null;
                             return new ReportletConfModalPage(reportlets.getModelObject(), reportletConfWin,
-                                    ReportModalPage.this.getPageReference());
+                                    PageUtils.getPageReference(ReportModalPage.this));
                         }
                     });
                     reportletConfWin.show(target);
@@ -332,7 +333,7 @@ public class ReportModalPage extends Bas
             }
         });
 
-        profile.add(new AjaxLink(REMOVE_BUTTON_ID) {
+        profile.add(new AjaxLink<Void>(REMOVE_BUTTON_ID) {
 
             private static final long serialVersionUID = -7978723352517770644L;
 
@@ -345,7 +346,6 @@ public class ReportModalPage extends Bas
 
             @Override
             protected void updateAjaxAttributes(final AjaxRequestAttributes attributes) {
-
                 if (reportlets.getModelObject() != null) {
 
                     super.updateAjaxAttributes(attributes);
@@ -364,7 +364,7 @@ public class ReportModalPage extends Bas
             }
         });
 
-        profile.add(new AjaxLink(UP_BUTTON_ID) {
+        profile.add(new AjaxLink<Void>(UP_BUTTON_ID) {
 
             private static final long serialVersionUID = -7978723352517770644L;
 
@@ -377,7 +377,7 @@ public class ReportModalPage extends Bas
             }
         });
 
-        profile.add(new AjaxLink(DOWN_BUTTON_ID) {
+        profile.add(new AjaxLink<Void>(DOWN_BUTTON_ID) {
 
             private static final long serialVersionUID = -7978723352517770644L;
 
@@ -452,7 +452,8 @@ public class ReportModalPage extends Bas
 
                 final ReportExecTO taskExecutionTO = model.getObject();
 
-                final ActionLinksPanel panel = new ActionLinksPanel(componentId, model, getPageReference());
+                final ActionLinksPanel panel = new ActionLinksPanel(componentId, model,
+                        PageUtils.getPageReference(getPage()));
 
                 panel.add(new ActionLink() {
 
@@ -487,7 +488,7 @@ public class ReportModalPage extends Bas
                             public Page createPage() {
                                 ReportModalPage.this.exportExecId = model.getObject().getId();
                                 return new ReportExecResultDownloadModalPage(reportExecExportWin,
-                                        ReportModalPage.this.getPageReference());
+                                        PageUtils.getPageReference(ReportModalPage.this));
                             }
                         });
                         reportExecExportWin.show(target);
@@ -521,7 +522,8 @@ public class ReportModalPage extends Bas
 
             @Override
             public Component getHeader(final String componentId) {
-                final ActionLinksPanel panel = new ActionLinksPanel(componentId, new Model(), getPageReference());
+                final ActionLinksPanel panel = new ActionLinksPanel(componentId, new Model(),
+                        PageUtils.getPageReference(getPage()));
 
                 panel.add(new ActionLink() {
 
@@ -536,7 +538,7 @@ public class ReportModalPage extends Bas
                             reportTO.setExecutions(currentReportTO.getExecutions());
                             final AjaxFallbackDefaultDataTable currentTable =
                                     new AjaxFallbackDefaultDataTable("executionsTable", columns,
-                                    new ReportExecutionsProvider(reportTO), 10);
+                                            new ReportExecutionsProvider(reportTO), 10);
                             currentTable.setOutputMarkupId(true);
                             target.add(currentTable);
                             executions.addOrReplace(currentTable);

Modified: syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/Reports.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/Reports.java?rev=1558319&r1=1558318&r2=1558319&view=diff
==============================================================================
--- syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/Reports.java (original)
+++ syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/Reports.java Wed Jan 15 08:33:00 2014
@@ -23,6 +23,7 @@ import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
+import org.apache.syncope.console.commons.PageUtils;
 import org.apache.syncope.common.to.EventCategoryTO;
 import org.apache.syncope.common.to.ReportTO;
 import org.apache.syncope.common.types.AuditElements.Result;
@@ -132,7 +133,8 @@ public class Reports extends BasePage {
 
                 final ReportTO reportTO = model.getObject();
 
-                final ActionLinksPanel panel = new ActionLinksPanel(componentId, model, getPageReference());
+                final ActionLinksPanel panel = new ActionLinksPanel(componentId, model, PageUtils.getPageReference(
+                        getPage()));
 
                 panel.add(new ActionLink() {
 
@@ -147,7 +149,7 @@ public class Reports extends BasePage {
 
                             @Override
                             public Page createPage() {
-                                return new ReportModalPage(window, reportTO, Reports.this.getPageReference());
+                                return new ReportModalPage(window, reportTO, PageUtils.getPageReference(Reports.this));
                             }
                         });
 
@@ -195,7 +197,8 @@ public class Reports extends BasePage {
 
             @Override
             public Component getHeader(final String componentId) {
-                final ActionLinksPanel panel = new ActionLinksPanel(componentId, new Model(), getPageReference());
+                final ActionLinksPanel panel = new ActionLinksPanel(componentId, new Model(),
+                        PageUtils.getPageReference(getPage()));
 
                 panel.add(new ActionLink() {
 
@@ -246,7 +249,7 @@ public class Reports extends BasePage {
         paginatorForm.add(rowsChooser);
         add(paginatorForm);
 
-        AjaxLink createLink = new ClearIndicatingAjaxLink("createLink", getPageReference()) {
+        AjaxLink createLink = new ClearIndicatingAjaxLink("createLink", PageUtils.getPageReference(getPage())) {
 
             private static final long serialVersionUID = -7978723352517770644L;
 
@@ -258,7 +261,7 @@ public class Reports extends BasePage {
 
                     @Override
                     public Page createPage() {
-                        return new ReportModalPage(window, new ReportTO(), Reports.this.getPageReference());
+                        return new ReportModalPage(window, new ReportTO(), PageUtils.getPageReference(Reports.this));
                     }
                 });
 
@@ -299,7 +302,7 @@ public class Reports extends BasePage {
         final ListModel<String> model = new ListModel<String>(new ArrayList<String>(events));
 
         form.add(new LoggerCategoryPanel(
-                "events", loggerRestClient.listEvents(), model, getPageReference(), "Reports") {
+                "events", loggerRestClient.listEvents(), model, PageUtils.getPageReference(getPage()), "Reports") {
 
                     private static final long serialVersionUID = 6113164334533550277L;
 

Modified: syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/Resources.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/Resources.java?rev=1558319&r1=1558318&r2=1558319&view=diff
==============================================================================
--- syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/Resources.java (original)
+++ syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/Resources.java Wed Jan 15 08:33:00 2014
@@ -23,6 +23,7 @@ import java.util.Arrays;
 import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
+import org.apache.syncope.console.commons.PageUtils;
 import org.apache.syncope.common.to.ConnInstanceTO;
 import org.apache.syncope.common.to.ResourceTO;
 import org.apache.syncope.common.validation.SyncopeClientCompositeErrorException;
@@ -106,7 +107,8 @@ public class Resources extends BasePage 
         add(createConnectorWin = new ModalWindow("createConnectorWin"));
         add(editConnectorWin = new ModalWindow("editConnectorWin"));
 
-        AjaxLink<Void> reloadLink = new ClearIndicatingAjaxLink<Void>("reloadLink", getPageReference()) {
+        AjaxLink<Void> reloadLink = new ClearIndicatingAjaxLink<Void>("reloadLink", PageUtils.
+                getPageReference(getPage())) {
 
             private static final long serialVersionUID = 3109256773218160485L;
 
@@ -159,47 +161,47 @@ public class Resources extends BasePage 
         columns.add(new AbstractColumn<ResourceTO, String>(
                 new StringResourceModel("connector", this, null, "connector")) {
 
-                    private static final long serialVersionUID = 8263694778917279290L;
+            private static final long serialVersionUID = 8263694778917279290L;
 
-                    @Override
-                    public void populateItem(final Item<ICellPopulator<ResourceTO>> cellItem, final String componentId,
-                            final IModel<ResourceTO> rowModel) {
-
-                        final AjaxLink<String> editLink =
-                        new ClearIndicatingAjaxLink<String>("link", getPageReference()) {
+            @Override
+            public void populateItem(final Item<ICellPopulator<ResourceTO>> cellItem, final String componentId,
+                    final IModel<ResourceTO> rowModel) {
 
-                            private static final long serialVersionUID = -7978723352517770644L;
+                final AjaxLink<String> editLink =
+                        new ClearIndicatingAjaxLink<String>("link", PageUtils.getPageReference(getPage())) {
 
-                            @Override
-                            protected void onClickInternal(final AjaxRequestTarget target) {
+                    private static final long serialVersionUID = -7978723352517770644L;
 
-                                editConnectorWin.setPageCreator(new ModalWindow.PageCreator() {
+                    @Override
+                    protected void onClickInternal(final AjaxRequestTarget target) {
 
-                                    private static final long serialVersionUID = -7834632442532690940L;
+                        editConnectorWin.setPageCreator(new ModalWindow.PageCreator() {
 
-                                    @Override
-                                    public Page createPage() {
-                                        return new ConnectorModalPage(Resources.this.getPageReference(),
-                                                editConnectorWin,
-                                                connectorRestClient.read(rowModel.getObject().getConnectorId()));
-                                    }
-                                });
+                            private static final long serialVersionUID = -7834632442532690940L;
 
-                                editConnectorWin.show(target);
+                            @Override
+                            public Page createPage() {
+                                return new ConnectorModalPage(PageUtils.getPageReference(Resources.this),
+                                        editConnectorWin,
+                                        connectorRestClient.read(rowModel.getObject().getConnectorId()));
                             }
-                        };
-                        editLink.add(new Label("linkTitle", rowModel.getObject().getConnectorDisplayName()));
+                        });
+
+                        editConnectorWin.show(target);
+                    }
+                };
+                editLink.add(new Label("linkTitle", rowModel.getObject().getConnectorDisplayName()));
 
-                        LinkPanel editConnPanel = new LinkPanel(componentId);
-                        editConnPanel.add(editLink);
+                LinkPanel editConnPanel = new LinkPanel(componentId);
+                editConnPanel.add(editLink);
 
-                        cellItem.add(editConnPanel);
+                cellItem.add(editConnPanel);
 
-                        MetaDataRoleAuthorizationStrategy.authorize(editConnPanel, ENABLE, xmlRolesReader.
-                                getAllAllowedRoles(
-                                        "Connectors", "read"));
-                    }
-                });
+                MetaDataRoleAuthorizationStrategy.authorize(editConnPanel, ENABLE, xmlRolesReader.
+                        getAllAllowedRoles(
+                        "Connectors", "read"));
+            }
+        });
 
         columns.add(new PropertyColumn<ResourceTO, String>(new StringResourceModel(
                 "propagationPrimary", this, null), "propagationPrimary", "propagationPrimary"));
@@ -221,7 +223,8 @@ public class Resources extends BasePage 
 
                 final ResourceTO resourceTO = model.getObject();
 
-                final ActionLinksPanel panel = new ActionLinksPanel(componentId, model, getPageReference());
+                final ActionLinksPanel panel = new ActionLinksPanel(componentId, model, PageUtils.getPageReference(
+                        getPage()));
                 panel.add(new ActionLink() {
 
                     private static final long serialVersionUID = -3722207913631435501L;
@@ -234,7 +237,7 @@ public class Resources extends BasePage 
 
                             @Override
                             public Page createPage() {
-                                return new ResourceModalPage(Resources.this.getPageReference(),
+                                return new ResourceModalPage(PageUtils.getPageReference(Resources.this),
                                         editResourceWin, resourceTO, false);
                             }
                         });
@@ -272,11 +275,11 @@ public class Resources extends BasePage 
                 columns,
                 (ISortableDataProvider<ResourceTO, String>) new ResourcesProvider(),
                 resourcePaginatorRows,
-                Arrays.asList(new ActionLink.ActionType[] { ActionLink.ActionType.DELETE }),
+                Arrays.asList(new ActionLink.ActionType[] {ActionLink.ActionType.DELETE}),
                 resourceRestClient,
                 "name",
                 "Resources",
-                getPageReference());
+                PageUtils.getPageReference(getPage()));
 
         resourceContainer = new WebMarkupContainer("resourceContainer");
         resourceContainer.add(table);
@@ -298,26 +301,26 @@ public class Resources extends BasePage 
         editResourceWin.setCookieName("edit-res-modal");
 
         AjaxLink<Void> createResourceLink =
-                new ClearIndicatingAjaxLink<Void>("createResourceLink", getPageReference()) {
+                new ClearIndicatingAjaxLink<Void>("createResourceLink", PageUtils.getPageReference(getPage())) {
 
-                    private static final long serialVersionUID = -7978723352517770644L;
-
-                    @Override
-                    protected void onClickInternal(final AjaxRequestTarget target) {
-                        createResourceWin.setPageCreator(new ModalWindow.PageCreator() {
+            private static final long serialVersionUID = -7978723352517770644L;
 
-                            private static final long serialVersionUID = -7834632442532690940L;
+            @Override
+            protected void onClickInternal(final AjaxRequestTarget target) {
+                createResourceWin.setPageCreator(new ModalWindow.PageCreator() {
 
-                            @Override
-                            public Page createPage() {
-                                return new ResourceModalPage(Resources.this.getPageReference(),
-                                        editResourceWin, new ResourceTO(), true);
-                            }
-                        });
+                    private static final long serialVersionUID = -7834632442532690940L;
 
-                        createResourceWin.show(target);
+                    @Override
+                    public Page createPage() {
+                        return new ResourceModalPage(PageUtils.getPageReference(Resources.this),
+                                editResourceWin, new ResourceTO(), true);
                     }
-                };
+                });
+
+                createResourceWin.show(target);
+            }
+        };
 
         MetaDataRoleAuthorizationStrategy.authorize(createResourceLink, ENABLE, xmlRolesReader.getAllAllowedRoles(
                 "Resources", "create"));
@@ -375,7 +378,8 @@ public class Resources extends BasePage 
 
                 final ConnInstanceTO connectorTO = model.getObject();
 
-                final ActionLinksPanel panel = new ActionLinksPanel(componentId, model, getPageReference());
+                final ActionLinksPanel panel = new ActionLinksPanel(componentId, model, PageUtils.getPageReference(
+                        getPage()));
 
                 panel.add(new ActionLink() {
 
@@ -389,7 +393,8 @@ public class Resources extends BasePage 
 
                             @Override
                             public Page createPage() {
-                                return new ConnectorModalPage(Resources.this.getPageReference(), editConnectorWin,
+                                return new ConnectorModalPage(PageUtils.getPageReference(Resources.this),
+                                        editConnectorWin,
                                         connectorTO);
                             }
                         });
@@ -427,11 +432,11 @@ public class Resources extends BasePage 
                 columns,
                 (ISortableDataProvider<ConnInstanceTO, String>) new ConnectorsProvider(),
                 connectorPaginatorRows,
-                Arrays.asList(new ActionLink.ActionType[] { ActionLink.ActionType.DELETE }),
+                Arrays.asList(new ActionLink.ActionType[] {ActionLink.ActionType.DELETE}),
                 connectorRestClient,
                 "id",
                 "Connectors",
-                getPageReference());
+                PageUtils.getPageReference(getPage()));
 
         connectorContainer = new WebMarkupContainer("connectorContainer");
         connectorContainer.add(table);
@@ -455,7 +460,8 @@ public class Resources extends BasePage 
         editConnectorWin.setInitialWidth(WIN_WIDTH);
         editConnectorWin.setCookieName("edit-conn-modal");
 
-        AjaxLink createConnectorLink = new ClearIndicatingAjaxLink("createConnectorLink", getPageReference()) {
+        AjaxLink createConnectorLink = new ClearIndicatingAjaxLink("createConnectorLink", PageUtils.getPageReference(
+                getPage())) {
 
             private static final long serialVersionUID = -7978723352517770644L;
 
@@ -467,7 +473,7 @@ public class Resources extends BasePage 
 
                     @Override
                     public Page createPage() {
-                        ConnectorModalPage form = new ConnectorModalPage(Resources.this.getPageReference(),
+                        ConnectorModalPage form = new ConnectorModalPage(PageUtils.getPageReference(Resources.this),
                                 editConnectorWin, new ConnInstanceTO());
                         return form;
                     }

Modified: syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/RoleModalPage.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/RoleModalPage.java?rev=1558319&r1=1558318&r2=1558319&view=diff
==============================================================================
--- syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/RoleModalPage.java (original)
+++ syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/RoleModalPage.java Wed Jan 15 08:33:00 2014
@@ -22,6 +22,7 @@ import java.util.ArrayList;
 import java.util.List;
 import org.apache.commons.lang3.SerializationUtils;
 import org.apache.syncope.common.mod.RoleMod;
+import org.apache.syncope.console.commons.PageUtils;
 import org.apache.syncope.common.to.RoleTO;
 import org.apache.syncope.common.util.AttributableOperations;
 import org.apache.syncope.console.commons.Constants;
@@ -95,7 +96,7 @@ public class RoleModalPage extends BaseM
         form.setModel(new CompoundPropertyModel<RoleTO>(roleTO));
 
         this.rolePanel = new RolePanel.Builder("rolePanel").form(form).roleTO(roleTO).roleModalPageMode(mode)
-                .pageRef(getPageReference()).build();
+                .pageRef(PageUtils.getPageReference(getPage())).build();
         form.add(rolePanel);
 
         final AjaxButton submit = new IndicatingAjaxButton(SUBMIT, new ResourceModel(SUBMIT)) {

Modified: syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/Roles.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/Roles.java?rev=1558319&r1=1558318&r2=1558319&view=diff
==============================================================================
--- syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/Roles.java (original)
+++ syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/Roles.java Wed Jan 15 08:33:00 2014
@@ -18,6 +18,7 @@
  */
 package org.apache.syncope.console.pages;
 
+import org.apache.syncope.console.commons.PageUtils;
 import org.apache.syncope.common.search.NodeCond;
 import org.apache.syncope.console.commons.Constants;
 import org.apache.syncope.console.pages.panels.AbstractSearchResultPanel;
@@ -67,8 +68,8 @@ public class Roles extends BasePage {
         treePanel.setOutputMarkupId(true);
         add(treePanel);
 
-        final RoleSummaryPanel summaryPanel = new RoleSummaryPanel.Builder("summaryPanel")
-                .window(editRoleWin).callerPageRef(Roles.this.getPageReference()).build();
+        final RoleSummaryPanel summaryPanel = new RoleSummaryPanel.Builder("summaryPanel").
+                window(editRoleWin).callerPageRef(PageUtils.getPageReference(Roles.this)).build();
         add(summaryPanel);
 
         editRoleWin.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() {
@@ -95,7 +96,7 @@ public class Roles extends BasePage {
         });
 
         final AbstractSearchResultPanel searchResult =
-                new RoleSearchResultPanel("searchResult", true, null, getPageReference(), restClient);
+                new RoleSearchResultPanel("searchResult", true, null, PageUtils.getPageReference(getPage()), restClient);
         add(searchResult);
 
         final Form searchForm = new Form("searchForm");
@@ -104,26 +105,27 @@ public class Roles extends BasePage {
         final RoleSearchPanel searchPanel = new RoleSearchPanel.Builder("searchPanel").build();
         searchForm.add(searchPanel);
 
-        searchForm.add(new ClearIndicatingAjaxButton("search", new ResourceModel("search"), getPageReference()) {
+        searchForm.add(new ClearIndicatingAjaxButton("search", new ResourceModel("search"),
+                PageUtils.getPageReference(getPage())) {
 
-            private static final long serialVersionUID = -958724007591692537L;
+                    private static final long serialVersionUID = -958724007591692537L;
 
-            @Override
-            protected void onSubmitInternal(final AjaxRequestTarget target, final Form<?> form) {
-                final NodeCond searchCond = searchPanel.buildSearchCond();
-                LOG.debug("Node condition {}", searchCond);
-
-                doSearch(target, searchCond, searchResult);
-
-                Session.get().getFeedbackMessages().clear();
-                target.add(searchPanel.getSearchFeedback());
-            }
-
-            @Override
-            protected void onError(final AjaxRequestTarget target, final Form<?> form) {
-                target.add(searchPanel.getSearchFeedback());
-            }
-        });
+                    @Override
+                    protected void onSubmitInternal(final AjaxRequestTarget target, final Form<?> form) {
+                        final NodeCond searchCond = searchPanel.buildSearchCond();
+                        LOG.debug("Node condition {}", searchCond);
+
+                        doSearch(target, searchCond, searchResult);
+
+                        Session.get().getFeedbackMessages().clear();
+                        target.add(searchPanel.getSearchFeedback());
+                    }
+
+                    @Override
+                    protected void onError(final AjaxRequestTarget target, final Form<?> form) {
+                        target.add(searchPanel.getSearchFeedback());
+                    }
+                });
     }
 
     private void doSearch(final AjaxRequestTarget target, final NodeCond searchCond,
@@ -145,7 +147,7 @@ public class Roles extends BasePage {
             final TreeNodeClickUpdate update = (TreeNodeClickUpdate) event.getPayload();
 
             final RoleSummaryPanel summaryPanel = new RoleSummaryPanel.Builder("summaryPanel")
-                    .window(editRoleWin).callerPageRef(Roles.this.getPageReference())
+                    .window(editRoleWin).callerPageRef(PageUtils.getPageReference(Roles.this))
                     .selectedNodeId(update.getSelectedNodeId()).build();
 
             addOrReplace(summaryPanel);

Modified: syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/Schema.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/Schema.java?rev=1558319&r1=1558318&r2=1558319&view=diff
==============================================================================
--- syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/Schema.java (original)
+++ syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/Schema.java Wed Jan 15 08:33:00 2014
@@ -29,6 +29,7 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import org.apache.commons.lang3.StringUtils;
+import org.apache.syncope.console.commons.PageUtils;
 import org.apache.syncope.common.to.AbstractSchemaTO;
 import org.apache.syncope.common.types.AttributableType;
 import org.apache.syncope.common.types.SchemaType;
@@ -78,7 +79,7 @@ import org.springframework.util.Reflecti
 /**
  * Schema WebPage.
  */
-@SuppressWarnings({"unchecked", "rawtypes"})
+@SuppressWarnings({ "unchecked", "rawtypes" })
 public class Schema extends BasePage {
 
     private static final long serialVersionUID = 8091922398776299403L;
@@ -88,41 +89,41 @@ public class Schema extends BasePage {
         private static final long serialVersionUID = 3109256773218160485L;
 
         {
-            put(SchemaType.NORMAL, Arrays.asList(new String[] {"name", "type",
-                "mandatoryCondition", "uniqueConstraint", "multivalue", "readonly"}));
-            put(SchemaType.DERIVED, Arrays.asList(new String[] {"name", "expression"}));
-            put(SchemaType.VIRTUAL, Arrays.asList(new String[] {"name", "readonly"}));
+            put(SchemaType.NORMAL, Arrays.asList(new String[] { "name", "type",
+                "mandatoryCondition", "uniqueConstraint", "multivalue", "readonly" }));
+            put(SchemaType.DERIVED, Arrays.asList(new String[] { "name", "expression" }));
+            put(SchemaType.VIRTUAL, Arrays.asList(new String[] { "name", "readonly" }));
         }
     };
 
     private static final Map<Map.Entry<AttributableType, SchemaType>, String> PAGINATOR_ROWS_KEYS =
             new HashMap<Map.Entry<AttributableType, SchemaType>, String>() {
 
-        private static final long serialVersionUID = 3109256773218160485L;
+                private static final long serialVersionUID = 3109256773218160485L;
 
-        {
-            put(new SimpleEntry<AttributableType, SchemaType>(AttributableType.USER, SchemaType.NORMAL),
-                    Constants.PREF_USER_SCHEMA_PAGINATOR_ROWS);
-            put(new SimpleEntry<AttributableType, SchemaType>(AttributableType.USER, SchemaType.DERIVED),
-                    Constants.PREF_USER_DER_SCHEMA_PAGINATOR_ROWS);
-            put(new SimpleEntry<AttributableType, SchemaType>(AttributableType.USER, SchemaType.VIRTUAL),
-                    Constants.PREF_USER_VIR_SCHEMA_PAGINATOR_ROWS);
-            put(new SimpleEntry<AttributableType, SchemaType>(AttributableType.MEMBERSHIP, SchemaType.NORMAL),
-                    Constants.PREF_MEMBERSHIP_SCHEMA_PAGINATOR_ROWS);
-            put(new SimpleEntry<AttributableType, SchemaType>(AttributableType.MEMBERSHIP,
-                    SchemaType.DERIVED),
-                    Constants.PREF_MEMBERSHIP_DER_SCHEMA_PAGINATOR_ROWS);
-            put(new SimpleEntry<AttributableType, SchemaType>(AttributableType.MEMBERSHIP,
-                    SchemaType.VIRTUAL),
-                    Constants.PREF_MEMBERSHIP_VIR_SCHEMA_PAGINATOR_ROWS);
-            put(new SimpleEntry<AttributableType, SchemaType>(AttributableType.ROLE, SchemaType.NORMAL),
-                    Constants.PREF_ROLE_SCHEMA_PAGINATOR_ROWS);
-            put(new SimpleEntry<AttributableType, SchemaType>(AttributableType.ROLE, SchemaType.DERIVED),
-                    Constants.PREF_ROLE_DER_SCHEMA_PAGINATOR_ROWS);
-            put(new SimpleEntry<AttributableType, SchemaType>(AttributableType.ROLE, SchemaType.VIRTUAL),
-                    Constants.PREF_ROLE_VIR_SCHEMA_PAGINATOR_ROWS);
-        }
-    };
+                {
+                    put(new SimpleEntry<AttributableType, SchemaType>(AttributableType.USER, SchemaType.NORMAL),
+                            Constants.PREF_USER_SCHEMA_PAGINATOR_ROWS);
+                    put(new SimpleEntry<AttributableType, SchemaType>(AttributableType.USER, SchemaType.DERIVED),
+                            Constants.PREF_USER_DER_SCHEMA_PAGINATOR_ROWS);
+                    put(new SimpleEntry<AttributableType, SchemaType>(AttributableType.USER, SchemaType.VIRTUAL),
+                            Constants.PREF_USER_VIR_SCHEMA_PAGINATOR_ROWS);
+                    put(new SimpleEntry<AttributableType, SchemaType>(AttributableType.MEMBERSHIP, SchemaType.NORMAL),
+                            Constants.PREF_MEMBERSHIP_SCHEMA_PAGINATOR_ROWS);
+                    put(new SimpleEntry<AttributableType, SchemaType>(AttributableType.MEMBERSHIP,
+                                    SchemaType.DERIVED),
+                            Constants.PREF_MEMBERSHIP_DER_SCHEMA_PAGINATOR_ROWS);
+                    put(new SimpleEntry<AttributableType, SchemaType>(AttributableType.MEMBERSHIP,
+                                    SchemaType.VIRTUAL),
+                            Constants.PREF_MEMBERSHIP_VIR_SCHEMA_PAGINATOR_ROWS);
+                    put(new SimpleEntry<AttributableType, SchemaType>(AttributableType.ROLE, SchemaType.NORMAL),
+                            Constants.PREF_ROLE_SCHEMA_PAGINATOR_ROWS);
+                    put(new SimpleEntry<AttributableType, SchemaType>(AttributableType.ROLE, SchemaType.DERIVED),
+                            Constants.PREF_ROLE_DER_SCHEMA_PAGINATOR_ROWS);
+                    put(new SimpleEntry<AttributableType, SchemaType>(AttributableType.ROLE, SchemaType.VIRTUAL),
+                            Constants.PREF_ROLE_VIR_SCHEMA_PAGINATOR_ROWS);
+                }
+            };
 
     private static final int WIN_WIDTH = 600;
 
@@ -235,7 +236,8 @@ public class Schema extends BasePage {
 
                 final AbstractSchemaTO schemaTO = model.getObject();
 
-                final ActionLinksPanel panel = new ActionLinksPanel(componentId, model, getPageReference());
+                final ActionLinksPanel panel = new ActionLinksPanel(componentId, model,
+                        PageUtils.getPageReference(getPage()));
 
                 panel.addWithRoles(new ActionLink() {
 
@@ -252,7 +254,8 @@ public class Schema extends BasePage {
                                 AbstractSchemaModalPage page = SchemaModalPageFactory.getSchemaModalPage(
                                         attributableType, schemaType);
 
-                                page.setSchemaModalPage(Schema.this.getPageReference(), modalWindow, schemaTO, false);
+                                page.setSchemaModalPage(PageUtils.getPageReference(Schema.this),
+                                        modalWindow, schemaTO, false);
 
                                 return page;
                             }
@@ -328,7 +331,7 @@ public class Schema extends BasePage {
     private <T extends AbstractSchemaModalPage> AjaxLink<Void> getCreateSchemaLink(final ModalWindow modalWindow,
             final AttributableType attrType, final SchemaType schemaType, final String winLinkName) {
 
-        AjaxLink<Void> link = new ClearIndicatingAjaxLink<Void>(winLinkName, getPageReference()) {
+        AjaxLink<Void> link = new ClearIndicatingAjaxLink<Void>(winLinkName, PageUtils.getPageReference(getPage())) {
 
             private static final long serialVersionUID = -7978723352517770644L;
 
@@ -341,7 +344,7 @@ public class Schema extends BasePage {
                     @Override
                     public Page createPage() {
                         T page = SchemaModalPageFactory.getSchemaModalPage(attrType, schemaType);
-                        page.setSchemaModalPage(Schema.this.getPageReference(), modalWindow, null, true);
+                        page.setSchemaModalPage(PageUtils.getPageReference(Schema.this), modalWindow, null, true);
 
                         return page;
                     }

Modified: syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/TaskModalPage.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/TaskModalPage.java?rev=1558319&r1=1558318&r2=1558319&view=diff
==============================================================================
--- syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/TaskModalPage.java (original)
+++ syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/TaskModalPage.java Wed Jan 15 08:33:00 2014
@@ -22,6 +22,7 @@ import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
+import org.apache.syncope.console.commons.PageUtils;
 import org.apache.syncope.common.to.NotificationTaskTO;
 import org.apache.syncope.common.to.PropagationTaskTO;
 import org.apache.syncope.common.to.SchedTaskTO;
@@ -117,7 +118,8 @@ public abstract class TaskModalPage exte
 
                 final TaskExecTO taskExecutionTO = model.getObject();
 
-                final ActionLinksPanel panel = new ActionLinksPanel(componentId, model, getPageReference());
+                final ActionLinksPanel panel = new ActionLinksPanel(componentId, model,
+                        PageUtils.getPageReference(getPage()));
 
                 panel.add(new ActionLink() {
 
@@ -164,7 +166,8 @@ public abstract class TaskModalPage exte
 
             @Override
             public Component getHeader(final String componentId) {
-                final ActionLinksPanel panel = new ActionLinksPanel(componentId, new Model(), getPageReference());
+                final ActionLinksPanel panel = new ActionLinksPanel(componentId, new Model(),
+                        PageUtils.getPageReference(getPage()));
 
                 panel.add(new ActionLink() {
 
@@ -175,7 +178,7 @@ public abstract class TaskModalPage exte
                         if (target != null) {
                             final AjaxFallbackDefaultDataTable currentTable =
                                     new AjaxFallbackDefaultDataTable("executionsTable", columns,
-                                    new TaskExecutionsProvider(getCurrentTaskExecution(taskTO)), paginatorRows);
+                                            new TaskExecutionsProvider(getCurrentTaskExecution(taskTO)), paginatorRows);
                             currentTable.setOutputMarkupId(true);
                             target.add(currentTable);
                             executions.addOrReplace(currentTable);

Modified: syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/Tasks.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/Tasks.java?rev=1558319&r1=1558318&r2=1558319&view=diff
==============================================================================
--- syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/Tasks.java (original)
+++ syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/Tasks.java Wed Jan 15 08:33:00 2014
@@ -24,6 +24,7 @@ import java.util.Collections;
 import java.util.Comparator;
 import java.util.Iterator;
 import java.util.List;
+import org.apache.syncope.console.commons.PageUtils;
 import org.apache.syncope.common.to.SchedTaskTO;
 import org.apache.syncope.common.to.TaskExecTO;
 import org.apache.syncope.common.to.TaskTO;
@@ -54,12 +55,12 @@ public class Tasks extends BasePage {
     public Tasks() {
         super();
 
-        add(new PropagationTasks("propagation", getPageReference()));
-        add(new NotificationTasks("notification", getPageReference()));
-        add(new SchedTasks("sched", getPageReference()));
-        add(new SyncTasks("sync", getPageReference()));
+        add(new PropagationTasks("propagation", PageUtils.getPageReference(getPage())));
+        add(new NotificationTasks("notification", PageUtils.getPageReference(getPage())));
+        add(new SchedTasks("sched", PageUtils.getPageReference(getPage())));
+        add(new SyncTasks("sync", PageUtils.getPageReference(getPage())));
 
-        getPageReference();
+        PageUtils.getPageReference(getPage());
     }
 
     @Override
@@ -208,8 +209,8 @@ public class Tasks extends BasePage {
                 columns,
                 (ISortableDataProvider<TaskTO, String>) dataProvider,
                 dataProvider.paginatorRows,
-                Arrays.asList(new ActionLink.ActionType[]{
-                    ActionLink.ActionType.DELETE, ActionLink.ActionType.DRYRUN, ActionLink.ActionType.EXECUTE}),
+                Arrays.asList(new ActionLink.ActionType[] {
+                    ActionLink.ActionType.DELETE, ActionLink.ActionType.DRYRUN, ActionLink.ActionType.EXECUTE }),
                 restClient,
                 "id",
                 TASKS,

Modified: syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/Todo.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/Todo.java?rev=1558319&r1=1558318&r2=1558319&view=diff
==============================================================================
--- syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/Todo.java (original)
+++ syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/Todo.java Wed Jan 15 08:33:00 2014
@@ -22,6 +22,7 @@ import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
+import org.apache.syncope.console.commons.PageUtils;
 import org.apache.syncope.common.to.UserRequestTO;
 import org.apache.syncope.common.to.WorkflowFormTO;
 import org.apache.syncope.common.types.UserRequestType;
@@ -132,7 +133,8 @@ public class Todo extends BasePage {
 
                 final WorkflowFormTO formTO = model.getObject();
 
-                final ActionLinksPanel panel = new ActionLinksPanel(componentId, model, getPageReference());
+                final ActionLinksPanel panel = new ActionLinksPanel(componentId, model,
+                        PageUtils.getPageReference(getPage()));
 
                 panel.add(new ActionLink() {
 
@@ -163,7 +165,8 @@ public class Todo extends BasePage {
 
                             @Override
                             public Page createPage() {
-                                return new ApprovalModalPage(Todo.this.getPageReference(), editApprovalWin, formTO);
+                                return new ApprovalModalPage(PageUtils.getPageReference(Todo.this),
+                                        editApprovalWin, formTO);
                             }
                         });
 
@@ -244,7 +247,8 @@ public class Todo extends BasePage {
 
                 final UserRequestTO request = model.getObject();
 
-                final ActionLinksPanel panel = new ActionLinksPanel(componentId, model, getPageReference());
+                final ActionLinksPanel panel = new ActionLinksPanel(componentId, model,
+                        PageUtils.getPageReference(getPage()));
 
                 panel.add(new ActionLink() {
 
@@ -258,8 +262,8 @@ public class Todo extends BasePage {
 
                             @Override
                             public Page createPage() {
-                                return new UserRequestModalPage(Todo.this.getPageReference(), editUserRequestWin,
-                                        model.getObject(), UserModalPage.Mode.ADMIN);
+                                return new UserRequestModalPage(PageUtils.getPageReference(Todo.this),
+                                        editUserRequestWin, model.getObject(), UserModalPage.Mode.ADMIN);
                             }
                         });
 
@@ -376,7 +380,7 @@ public class Todo extends BasePage {
 
             Collections.sort(list, comparator);
 
-            return list.subList((int)first, (int)first + (int)count).iterator();
+            return list.subList((int) first, (int) first + (int) count).iterator();
         }
 
         @Override
@@ -418,7 +422,7 @@ public class Todo extends BasePage {
 
             Collections.sort(list, comparator);
 
-            return list.subList((int)first, (int)first + (int)count).iterator();
+            return list.subList((int) first, (int) first + (int) count).iterator();
         }
 
         @Override

Modified: syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/UserModalPage.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/UserModalPage.java?rev=1558319&r1=1558318&r2=1558319&view=diff
==============================================================================
--- syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/UserModalPage.java (original)
+++ syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/UserModalPage.java Wed Jan 15 08:33:00 2014
@@ -18,6 +18,7 @@
  */
 package org.apache.syncope.console.pages;
 
+import org.apache.syncope.console.commons.PageUtils;
 import org.apache.syncope.common.to.UserTO;
 import org.apache.syncope.console.commons.Constants;
 import org.apache.syncope.console.pages.panels.AttributesPanel;
@@ -142,7 +143,8 @@ public abstract class UserModalPage exte
         //--------------------------------
         // Roles panel
         //--------------------------------
-        form.add(new MembershipsPanel("memberships", userTO, mode == Mode.TEMPLATE, null, getPageReference()));
+        form.add(new MembershipsPanel("memberships", userTO, mode == Mode.TEMPLATE, null,
+                PageUtils.getPageReference(getPage())));
         //--------------------------------
 
         final AjaxButton submit = getOnSubmit();

Modified: syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/Users.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/Users.java?rev=1558319&r1=1558318&r2=1558319&view=diff
==============================================================================
--- syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/Users.java (original)
+++ syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/Users.java Wed Jan 15 08:33:00 2014
@@ -18,6 +18,7 @@
  */
 package org.apache.syncope.console.pages;
 
+import org.apache.syncope.console.commons.PageUtils;
 import org.apache.syncope.common.search.NodeCond;
 import org.apache.syncope.common.to.UserTO;
 import org.apache.syncope.console.commons.Constants;
@@ -62,35 +63,36 @@ public class Users extends BasePage {
         editModalWin.setCookieName("edit-modal");
         add(editModalWin);
 
-        final AbstractSearchResultPanel searchResult =
-                new UserSearchResultPanel("searchResult", true, null, getPageReference(), restClient);
+        final AbstractSearchResultPanel searchResult = new UserSearchResultPanel("searchResult", true, null,
+                PageUtils.getPageReference(getPage()), restClient);
         add(searchResult);
 
         final AbstractSearchResultPanel listResult =
-                new UserSearchResultPanel("listResult", false, null, getPageReference(), restClient);
+                new UserSearchResultPanel("listResult", false, null, PageUtils.getPageReference(getPage()), restClient);
         add(listResult);
 
-
         // create new user
-        final AjaxLink<Void> createLink = new ClearIndicatingAjaxLink<Void>("createLink", getPageReference()) {
+        final AjaxLink<Void> createLink = new ClearIndicatingAjaxLink<Void>("createLink",
+                PageUtils.getPageReference(getPage())) {
 
-            private static final long serialVersionUID = -7978723352517770644L;
+                    private static final long serialVersionUID = -7978723352517770644L;
 
-            @Override
-            protected void onClickInternal(final AjaxRequestTarget target) {
-                editModalWin.setPageCreator(new ModalWindow.PageCreator() {
+                    @Override
+                    protected void onClickInternal(final AjaxRequestTarget target) {
+                        editModalWin.setPageCreator(new ModalWindow.PageCreator() {
 
-                    private static final long serialVersionUID = -7834632442532690940L;
+                            private static final long serialVersionUID = -7834632442532690940L;
 
-                    @Override
-                    public Page createPage() {
-                        return new EditUserModalPage(Users.this.getPageReference(), editModalWin, new UserTO());
-                    }
-                });
+                            @Override
+                            public Page createPage() {
+                                return new EditUserModalPage(PageUtils.getPageReference(Users.this), editModalWin,
+                                        new UserTO());
+                            }
+                        });
 
-                editModalWin.show(target);
-            }
-        };
+                        editModalWin.show(target);
+                    }
+                };
         MetaDataRoleAuthorizationStrategy.authorize(
                 createLink, ENABLE, xmlRolesReader.getAllAllowedRoles("Users", "create"));
         add(createLink);
@@ -104,27 +106,28 @@ public class Users extends BasePage {
         searchForm.add(searchPanel);
 
         final ClearIndicatingAjaxButton searchButton =
-                new ClearIndicatingAjaxButton("search", new ResourceModel("search"), getPageReference()) {
+                new ClearIndicatingAjaxButton("search", new ResourceModel("search"),
+                        PageUtils.getPageReference(getPage())) {
 
-            private static final long serialVersionUID = -958724007591692537L;
+                    private static final long serialVersionUID = -958724007591692537L;
 
-            @Override
-            protected void onSubmitInternal(final AjaxRequestTarget target, final Form<?> form) {
-                final NodeCond searchCond = searchPanel.buildSearchCond();
-                LOG.debug("Node condition " + searchCond);
+                    @Override
+                    protected void onSubmitInternal(final AjaxRequestTarget target, final Form<?> form) {
+                        final NodeCond searchCond = searchPanel.buildSearchCond();
+                        LOG.debug("Node condition " + searchCond);
 
-                doSearch(target, searchCond, searchResult);
+                        doSearch(target, searchCond, searchResult);
 
-                Session.get().getFeedbackMessages().clear();
-                target.add(searchPanel.getSearchFeedback());
-            }
+                        Session.get().getFeedbackMessages().clear();
+                        target.add(searchPanel.getSearchFeedback());
+                    }
 
-            @Override
-            protected void onError(final AjaxRequestTarget target, final Form<?> form) {
+                    @Override
+                    protected void onError(final AjaxRequestTarget target, final Form<?> form) {
 
-                target.add(searchPanel.getSearchFeedback());
-            }
-        };
+                        target.add(searchPanel.getSearchFeedback());
+                    }
+                };
 
         searchForm.add(searchButton);
         searchForm.setDefaultButton(searchButton);

Modified: syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/panels/AbstractSearchResultPanel.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/panels/AbstractSearchResultPanel.java?rev=1558319&r1=1558318&r2=1558319&view=diff
==============================================================================
--- syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/panels/AbstractSearchResultPanel.java (original)
+++ syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/panels/AbstractSearchResultPanel.java Wed Jan 15 08:33:00 2014
@@ -20,6 +20,7 @@ package org.apache.syncope.console.pages
 
 import java.util.Collection;
 import java.util.List;
+import org.apache.syncope.console.commons.PageUtils;
 import org.apache.syncope.common.search.NodeCond;
 import org.apache.syncope.common.to.AbstractAttributableTO;
 import org.apache.syncope.console.commons.AttributableDataProvider;
@@ -265,7 +266,7 @@ public abstract class AbstractSearchResu
                 restClient,
                 "id",
                 getPageId(),
-                page.getPageReference());
+                PageUtils.getPageReference(page));
 
         resultTable.setCurrentPage(currentPage);