syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ilgro...@apache.org
Subject svn commit: r1424538 [1/6] - in /syncope/trunk: console/src/main/java/org/apache/syncope/console/ console/src/main/java/org/apache/syncope/console/commons/ console/src/main/java/org/apache/syncope/console/pages/ console/src/main/java/org/apache/syncope...
Date Thu, 20 Dec 2012 15:45:31 GMT
Author: ilgrosso
Date: Thu Dec 20 15:45:28 2012
New Revision: 1424538

URL: http://svn.apache.org/viewvc?rev=1424538&view=rev
Log:
[SYNCOPE-44] Role search working from admin console; some minor gotchas to fix on the core, though...

Added:
    syncope/trunk/console/src/main/java/org/apache/syncope/console/commons/AttributableDataProvider.java
      - copied, changed from r1422934, syncope/trunk/console/src/main/java/org/apache/syncope/console/commons/UserDataProvider.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/commons/SortableAttributableProviderComparator.java
      - copied, changed from r1422934, syncope/trunk/console/src/main/java/org/apache/syncope/console/commons/SortableUserProviderComparator.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ResultStatusModalPage.java
      - copied, changed from r1424355, syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/UserManagementResultPanel.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/AbstractSearchPanel.java   (with props)
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/AbstractSearchResultPanel.java
      - copied, changed from r1423830, syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/ResultSetPanel.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/RoleSearchPanel.java
      - copied, changed from r1422934, 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/RoleSearchResultPanel.java   (with props)
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/SearchView.java   (with props)
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/SelectOnlyUserSearchResultPanel.java
      - copied, changed from r1423830, syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/SelectOnlyResultSetPanel.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/UserSearchResultPanel.java   (with props)
    syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/AbstractAttributableRestClient.java   (with props)
    syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/BaseRestClient.java
      - copied, changed from r1424355, syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/AbstractBaseRestClient.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/wicket/extensions/markup/html/repeater/data/table/AttrColumn.java
      - copied, changed from r1422934, syncope/trunk/console/src/main/java/org/apache/syncope/console/wicket/extensions/markup/html/repeater/data/table/UserAttrColumn.java
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ResultStatusModalPage.html
      - copied, changed from r1424355, syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/UserManagementResultPanel.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ResultStatusModalPage.properties
      - copied unchanged from r1424355, syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/UserManagementResultPanel.properties
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ResultStatusModalPage_it.properties
      - copied unchanged from r1424355, syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/UserManagementResultPanel_it.properties
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/Roles.properties   (with props)
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/Roles_it.properties   (with props)
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/AbstractSearchPanel.html
      - copied, changed from r1423909, syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/UserSearchPanel.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/AbstractSearchPanel.properties
      - copied unchanged from r1423909, syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/UserSearchPanel.properties
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/AbstractSearchPanel_it.properties
      - copied unchanged from r1423909, syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/UserSearchPanel_it.properties
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/AbstractSearchResultPanel.html
      - copied, changed from r1423830, syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/ResultSetPanel.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/AbstractSearchResultPanel.properties
      - copied unchanged from r1423830, syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/ResultSetPanel.properties
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/AbstractSearchResultPanel_it.properties
      - copied unchanged from r1423830, syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/ResultSetPanel_it.properties
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/statuses/
      - copied from r1424355, syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/statuses/
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/statuses/objectnotfound.png
      - copied unchanged from r1424355, syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/statuses/usernotfound.png
Removed:
    syncope/trunk/console/src/main/java/org/apache/syncope/console/commons/SortableUserProviderComparator.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/commons/UserDataProvider.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/ResultSetPanel.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/SelectOnlyResultSetPanel.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/UserManagementResultPanel.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/AbstractBaseRestClient.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/wicket/extensions/markup/html/repeater/data/table/UserAttrColumn.java
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/ResultSetPanel.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/ResultSetPanel.properties
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/ResultSetPanel_it.properties
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/UserManagementResultPanel.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/UserManagementResultPanel.properties
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/UserManagementResultPanel_it.properties
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/UserSearchPanel.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/UserSearchPanel.properties
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/UserSearchPanel_it.properties
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/statuses/
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/statuses/usernotfound.png
Modified:
    syncope/trunk/console/src/main/java/org/apache/syncope/console/SyncopeApplication.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/commons/RoleTreeBuilder.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/commons/StatusBean.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/commons/StatusUtils.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/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/StatusModalPage.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/UserOwnerSelectModalPage.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/UserRequestModalPage.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/panels/RoleSummaryPanel.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/StatusPanel.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/rest/ApprovalRestClient.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/ConfigurationRestClient.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/ConnectorRestClient.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/EntitlementRestClient.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/LoggerRestClient.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/NotificationRestClient.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/PolicyRestClient.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/ReportRestClient.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/ResourceRestClient.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/RoleRestClient.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/SchemaRestClient.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/TaskRestClient.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/UserRequestRestClient.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/UserRestClient.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/WorkflowRestClient.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/wicket/extensions/markup/html/repeater/data/table/TokenColumn.java
    syncope/trunk/console/src/main/resources/applicationContext.xml
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/   (props changed)
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ApprovalModalPage.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/BaseModalPage.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/BasePage.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/Configuration.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ConfigurationModalPage.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ConnectorModalPage.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/DerivedSchemaModalPage.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/DisplayAttributesModalPage.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ErrorPage.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ExecMessageModalPage.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/HomePage.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/Login.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/MembershipModalPage.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/NotificationModalPage.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/NotificationTaskModalPage.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/PolicyModalPage.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/PropagationTaskModalPage.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/RecursivePanel.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ReportExecResultDownloadModalPage.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ReportModalPage.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ReportletConfModalPage.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/Reports$AuditCategoryPanel.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/Reports.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ResourceModalPage.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/Resources.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/RoleModalPage.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/RoleOwnerSelectModalPage.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/Roles.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/SchedTaskModalPage.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/Schema.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/SchemaModalPage.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/StatusModalPage.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/StatusModalPage.properties
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/StatusModalPage_it.properties
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/SyncTaskModalPage.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/Tasks.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/Todo.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/UserModalPage.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/UserOwnerSelectModalPage.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/Users.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/Users.properties
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/Users_it.properties
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/VirtualSchemaModalPage.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/WelcomePage.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/AccountInformationPanel.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/AttributesPanel.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/DerivedAttributesPanel.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/JQueryTabbedPanel.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/MembershipsPanel.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/MembershipsPanel.properties
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/NotificationTasks.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/PoliciesPanel.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/PolicyBeanPanel.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/PropagationTasks.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/ResourceConnConfPanel.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/ResourceDetailsPanel.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/ResourceMappingPanel.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/ResourceSecurityPanel.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/ResourcesPanel.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/RoleDetailsPanel.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/RolePanel.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/RoleSecurityPanel.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/RoleSummaryPanel.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/RoleTabPanel.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/SchedTasks.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/StatusPanel.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/SyncTasks.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/UserDetailsPanel.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/VirtualAttributesPanel.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/wicket/markup/html/form/ActionLinksPanel.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/wicket/markup/html/form/AjaxCheckBoxPanel.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/wicket/markup/html/form/AjaxDropDownChoicePanel.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/wicket/markup/html/form/AjaxNumberFieldPanel.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/wicket/markup/html/form/AjaxPalettePanel.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/wicket/markup/html/form/AjaxPasswordFieldPanel.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/wicket/markup/html/form/AjaxTextFieldPanel.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/wicket/markup/html/form/CheckBoxMultipleChoiceFieldPanel.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/wicket/markup/html/form/DateTextFieldPanel.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/wicket/markup/html/form/DateTimeFieldPanel.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/wicket/markup/html/form/FieldPanel.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/wicket/markup/html/form/LinkPanel.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/wicket/markup/html/form/MultiValueSelectorPanel.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/wicket/markup/html/tree/TreeActionLinkPanel.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/wicket/markup/html/tree/TreeRolePanel.html
    syncope/trunk/console/src/main/webapp/css/style.css
    syncope/trunk/console/src/test/java/org/apache/syncope/console/RoleTestITCase.java
    syncope/trunk/console/src/test/java/org/apache/syncope/console/UserTestITCase.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/RoleController.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/UserController.java

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/SyncopeApplication.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/SyncopeApplication.java?rev=1424538&r1=1424537&r2=1424538&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/SyncopeApplication.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/SyncopeApplication.java Thu Dec 20 15:45:28 2012
@@ -63,6 +63,8 @@ public class SyncopeApplication extends 
 
     @Override
     protected void init() {
+        super.init();
+
         getComponentInstantiationListeners().add(new SpringComponentInjector(this));
 
         getResourceSettings().setThrowExceptionOnMissingResource(true);

Copied: syncope/trunk/console/src/main/java/org/apache/syncope/console/commons/AttributableDataProvider.java (from r1422934, syncope/trunk/console/src/main/java/org/apache/syncope/console/commons/UserDataProvider.java)
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/commons/AttributableDataProvider.java?p2=syncope/trunk/console/src/main/java/org/apache/syncope/console/commons/AttributableDataProvider.java&p1=syncope/trunk/console/src/main/java/org/apache/syncope/console/commons/UserDataProvider.java&r1=1422934&r2=1424538&rev=1424538&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/commons/UserDataProvider.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/commons/AttributableDataProvider.java Thu Dec 20 15:45:28 2012
@@ -22,28 +22,29 @@ import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
 import org.apache.syncope.client.search.NodeCond;
-import org.apache.syncope.client.to.UserTO;
-import org.apache.syncope.console.rest.UserRestClient;
+import org.apache.syncope.client.to.AbstractAttributableTO;
+import org.apache.syncope.console.rest.AbstractAttributableRestClient;
 import org.apache.wicket.extensions.markup.html.repeater.data.sort.SortOrder;
 import org.apache.wicket.extensions.markup.html.repeater.util.SortableDataProvider;
 import org.apache.wicket.model.CompoundPropertyModel;
 import org.apache.wicket.model.IModel;
 
-public class UserDataProvider extends SortableDataProvider<UserTO, String> {
+public class AttributableDataProvider extends SortableDataProvider<AbstractAttributableTO, String> {
 
     private static final long serialVersionUID = 6267494272884913376L;
 
-    private SortableUserProviderComparator comparator;
+    private final SortableAttributableProviderComparator comparator;
 
     private NodeCond filter = null;
 
     private final int paginatorRows;
 
-    private boolean filtered = false;
+    private final boolean filtered ;
 
-    private UserRestClient restClient;
+    private final AbstractAttributableRestClient restClient;
 
-    public UserDataProvider(final UserRestClient restClient, final int paginatorRows, final boolean filtered) {
+    public AttributableDataProvider(final AbstractAttributableRestClient restClient,
+            final int paginatorRows, final boolean filtered) {
 
         super();
 
@@ -54,7 +55,7 @@ public class UserDataProvider extends So
         //Default sorting
         setSort("id", SortOrder.ASCENDING);
 
-        comparator = new SortableUserProviderComparator(this);
+        comparator = new SortableAttributableProviderComparator(this);
     }
 
     public void setSearchCond(final NodeCond searchCond) {
@@ -62,19 +63,19 @@ public class UserDataProvider extends So
     }
 
     @Override
-    public Iterator<UserTO> iterator(final long first, final long count) {
-        final List<UserTO> users;
+    public Iterator<? extends AbstractAttributableTO> iterator(final long first, final long count) {
+        final List<? extends AbstractAttributableTO> result;
 
         if (filtered) {
-            users = filter == null
-                    ? Collections.EMPTY_LIST
-                    : restClient.search(filter, ((int)first / paginatorRows) + 1, paginatorRows);
+            result = filter == null
+                    ? Collections.<AbstractAttributableTO>emptyList()
+                    : restClient.search(filter, ((int) first / paginatorRows) + 1, paginatorRows);
         } else {
-            users = restClient.list(((int)first / paginatorRows) + 1, paginatorRows);
+            result = restClient.list(((int) first / paginatorRows) + 1, paginatorRows);
         }
 
-        Collections.sort(users, comparator);
-        return users.iterator();
+        Collections.sort(result, comparator);
+        return result.iterator();
     }
 
     @Override
@@ -89,7 +90,7 @@ public class UserDataProvider extends So
     }
 
     @Override
-    public IModel<UserTO> model(final UserTO object) {
-        return new CompoundPropertyModel<UserTO>(object);
+    public IModel<AbstractAttributableTO> model(final AbstractAttributableTO object) {
+        return new CompoundPropertyModel<AbstractAttributableTO>(object);
     }
 }

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/commons/RoleTreeBuilder.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/commons/RoleTreeBuilder.java?rev=1424538&r1=1424537&r2=1424538&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/commons/RoleTreeBuilder.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/commons/RoleTreeBuilder.java Thu Dec 20 15:45:28 2012
@@ -61,7 +61,7 @@ public class RoleTreeBuilder {
     }
 
     public TreeModel build() {
-        return build(restClient.getAllRoles());
+        return build(restClient.list());
     }
 
     public TreeModel build(final List<RoleTO> roles) {

Copied: syncope/trunk/console/src/main/java/org/apache/syncope/console/commons/SortableAttributableProviderComparator.java (from r1422934, syncope/trunk/console/src/main/java/org/apache/syncope/console/commons/SortableUserProviderComparator.java)
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/commons/SortableAttributableProviderComparator.java?p2=syncope/trunk/console/src/main/java/org/apache/syncope/console/commons/SortableAttributableProviderComparator.java&p1=syncope/trunk/console/src/main/java/org/apache/syncope/console/commons/SortableUserProviderComparator.java&r1=1422934&r2=1424538&rev=1424538&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/commons/SortableUserProviderComparator.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/commons/SortableAttributableProviderComparator.java Thu Dec 20 15:45:28 2012
@@ -22,12 +22,12 @@ import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
+import org.apache.syncope.client.to.AbstractAttributableTO;
 import org.apache.syncope.client.to.AttributeTO;
-import org.apache.syncope.client.to.UserTO;
 import org.apache.wicket.extensions.markup.html.repeater.util.SortableDataProvider;
 import org.apache.wicket.model.AbstractReadOnlyModel;
 
-public class SortableUserProviderComparator extends SortableDataProviderComparator<UserTO> {
+public class SortableAttributableProviderComparator extends SortableDataProviderComparator<AbstractAttributableTO> {
 
     private static final long serialVersionUID = 1775967163571699258L;
 
@@ -40,13 +40,12 @@ public class SortableUserProviderCompara
         inlineProps.add("token");
     }
 
-    public SortableUserProviderComparator(final SortableDataProvider<UserTO, String> provider) {
-
+    public SortableAttributableProviderComparator(final SortableDataProvider<AbstractAttributableTO, String> provider) {
         super(provider);
     }
 
     @Override
-    public int compare(final UserTO o1, final UserTO o2) {
+    public int compare(final AbstractAttributableTO o1, final AbstractAttributableTO o2) {
         if (inlineProps.contains(provider.getSort().getProperty())) {
             return super.compare(o1, o2);
         }

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/commons/StatusBean.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/commons/StatusBean.java?rev=1424538&r1=1424537&r2=1424538&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/commons/StatusBean.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/commons/StatusBean.java Thu Dec 20 15:45:28 2012
@@ -28,7 +28,7 @@ public class StatusBean implements Seria
 
     private String accountLink = null;
 
-    private StatusUtils.Status status = StatusUtils.Status.USER_NOT_FOUND;
+    private StatusUtils.Status status = StatusUtils.Status.OBJECT_NOT_FOUND;
 
     public StatusBean() {
     }

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/commons/StatusUtils.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/commons/StatusUtils.java?rev=1424538&r1=1424537&r2=1424538&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/commons/StatusUtils.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/commons/StatusUtils.java Thu Dec 20 15:45:28 2012
@@ -18,103 +18,125 @@
  */
 package org.apache.syncope.console.commons;
 
+import java.io.Serializable;
 import java.util.AbstractMap;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 import java.util.Map;
+import org.apache.syncope.client.to.AbstractAttributableTO;
 import org.apache.syncope.client.to.AttributeTO;
 import org.apache.syncope.client.to.ConnObjectTO;
 import org.apache.syncope.client.to.MappingItemTO;
+import org.apache.syncope.client.to.MappingTO;
 import org.apache.syncope.client.to.ResourceTO;
+import org.apache.syncope.client.to.RoleTO;
 import org.apache.syncope.client.to.UserTO;
+import org.apache.syncope.console.rest.AbstractAttributableRestClient;
 import org.apache.syncope.console.rest.ResourceRestClient;
-import org.apache.syncope.console.rest.UserRestClient;
 import org.apache.syncope.types.IntMappingType;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
 
-public class StatusUtils {
+public class StatusUtils implements Serializable {
 
-    /**
-     * Logger.
-     */
-    private static final Logger LOG = LoggerFactory.getLogger(StatusUtils.class);
-
-    @Autowired
-    private UserRestClient userRestClient;
-
-    @Autowired
-    private ResourceRestClient resourceRestClient;
+    private static final long serialVersionUID = 7238009174387184309L;
 
     public enum Status {
-	CREATED,
+
+        CREATED,
         ACTIVE,
         SUSPENDED,
         UNDEFINED,
-        USER_NOT_FOUND;
+        OBJECT_NOT_FOUND;
 
         public boolean isActive() {
             return this == ACTIVE;
         }
     }
 
-    public List<StatusBean> getRemoteStatuses(final UserTO userTO) {
-        final List<StatusBean> statuses = new ArrayList<StatusBean>();
+    /**
+     * Logger.
+     */
+    private static final Logger LOG = LoggerFactory.getLogger(StatusUtils.class);
+
+    private final ResourceRestClient resourceRestClient;
 
-        for (String res : userTO.getResources()) {
+    private final AbstractAttributableRestClient restClient;
 
-            final ResourceTO resourceTO = resourceRestClient.read(res);
+    public StatusUtils(final ResourceRestClient resourceRestClient, final AbstractAttributableRestClient restClient) {
+        this.resourceRestClient = resourceRestClient;
+        this.restClient = restClient;
+    }
+
+    public List<StatusBean> getRemoteStatuses(final AbstractAttributableTO attributable) {
+        final List<StatusBean> statuses = new ArrayList<StatusBean>();
 
-            final Map.Entry<IntMappingType, String> accountId = getAccountId(resourceTO);
+        for (String resouceName : attributable.getResources()) {
+            final ResourceTO resource = resourceRestClient.read(resouceName);
 
             String objectId = null;
 
-            switch (accountId != null
-                    ? accountId.getKey()
-                    : IntMappingType.UserId) {
+            final Map.Entry<IntMappingType, String> accountId = getAccountId(resource, attributable);
+            switch (accountId.getKey()) {
 
                 case UserId:
-                    objectId = String.valueOf(userTO.getId());
+                case RoleId:
+                    objectId = String.valueOf(attributable.getId());
                     break;
+
                 case Username:
-                    objectId = userTO.getUsername();
+                    if (attributable instanceof UserTO) {
+                        objectId = ((UserTO) attributable).getUsername();
+                    }
                     break;
+
+                case RoleName:
+                    if (attributable instanceof RoleTO) {
+                        objectId = ((RoleTO) attributable).getName();
+                    }
+                    break;
+
                 case UserSchema:
-                    AttributeTO attributeTO = userTO.getAttributeMap().get(accountId.getValue());
+                case RoleSchema:
+                    AttributeTO attributeTO = attributable.getAttributeMap().get(accountId.getValue());
                     objectId = attributeTO != null && attributeTO.getValues() != null
                             && !attributeTO.getValues().isEmpty()
                             ? attributeTO.getValues().get(0)
                             : null;
                     break;
+
                 case UserDerivedSchema:
-                    attributeTO = userTO.getDerivedAttributeMap().get(accountId.getValue());
+                case RoleDerivedSchema:
+                    attributeTO = attributable.getDerivedAttributeMap().get(accountId.getValue());
                     objectId = attributeTO != null && attributeTO.getValues() != null
                             && !attributeTO.getValues().isEmpty()
                             ? attributeTO.getValues().get(0)
                             : null;
                     break;
+
                 case UserVirtualSchema:
-                    attributeTO = userTO.getVirtualAttributeMap().get(accountId.getValue());
+                case RoleVirtualSchema:
+                    attributeTO = attributable.getVirtualAttributeMap().get(accountId.getValue());
                     objectId = attributeTO != null && attributeTO.getValues() != null
                             && !attributeTO.getValues().isEmpty()
                             ? attributeTO.getValues().get(0)
                             : null;
                     break;
+
                 default:
             }
 
             ConnObjectTO objectTO = null;
 
             try {
-                objectTO = userRestClient.getRemoteObject(res, objectId);
+                objectTO = restClient.getRemoteObject(resouceName, objectId);
             } catch (Exception e) {
-                LOG.warn("User '{}' not found on resource '{}'", objectId, res);
+                LOG.warn("ConnObject '{}' not found on resource '{}'", objectId, resouceName);
             }
 
             final StatusBean statusBean = getRemoteStatus(objectTO);
-            statusBean.setResourceName(res);
+            statusBean.setResourceName(resouceName);
             statuses.add(statusBean);
         }
 
@@ -143,7 +165,7 @@ public class StatusUtils {
         return statusBean;
     }
 
-    public Boolean isEnabled(final ConnObjectTO objectTO) {
+    private Boolean isEnabled(final ConnObjectTO objectTO) {
         final String STATUSATTR = "__ENABLE__";
 
         final Map<String, AttributeTO> attributeTOs = objectTO.getAttributeMap();
@@ -155,7 +177,7 @@ public class StatusUtils {
                 : null;
     }
 
-    public String getAccountLink(final ConnObjectTO objectTO) {
+    private String getAccountLink(final ConnObjectTO objectTO) {
         final String NAME = "__NAME__";
 
         final Map<String, AttributeTO> attributeTOs = objectTO != null
@@ -169,17 +191,25 @@ public class StatusUtils {
                 : null;
     }
 
-    public Map.Entry<IntMappingType, String> getAccountId(final ResourceTO resourceTO) {
+    private Map.Entry<IntMappingType, String> getAccountId(final ResourceTO resource,
+            final AbstractAttributableTO attributable) {
+
         Map.Entry<IntMappingType, String> accountId = null;
 
-        if (resourceTO.getUmapping() != null) {
-            for (MappingItemTO item : resourceTO.getUmapping().getItems()) {
+        MappingTO mapping = attributable instanceof UserTO ? resource.getUmapping() : resource.getRmapping();
+        IntMappingType idType = attributable instanceof UserTO ? IntMappingType.UserId : IntMappingType.RoleId;
+
+        if (mapping != null) {
+            for (MappingItemTO item : mapping.getItems()) {
                 if (item.isAccountid()) {
                     accountId = new AbstractMap.SimpleEntry<IntMappingType, String>(
                             item.getIntMappingType(), item.getIntAttrName());
                 }
             }
         }
+        if (accountId == null) {
+            accountId = new AbstractMap.SimpleEntry<IntMappingType, String>(idType, null);
+        }
 
         return accountId;
     }

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=1424538&r1=1424537&r2=1424538&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 Thu Dec 20 15:45:28 2012
@@ -20,7 +20,6 @@ package org.apache.syncope.console.pages
 
 import java.lang.reflect.Field;
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.List;
@@ -62,11 +61,11 @@ public class DisplayAttributesModalPage 
      */
     private static final int MAX_SELECTIONS = 9;
 
-    private static final String[] ATTRIBUTES_TO_HIDE = new String[]{
+    private static final String[] ATTRIBUTES_TO_HIDE = {
         "attributes", "derivedAttributes", "virtualAttributes", "memberships", "resources",
         "serialVersionUID", "password", "propagationTOs"};
 
-    public static final List<String> DEFAULT_SELECTION = Arrays.asList(new String[]{"id", "username", "status"});
+    public static final String[] DEFAULT_SELECTION = {"id", "username", "status"};
 
     @SpringBean
     private PreferenceManager prefMan;
@@ -78,6 +77,7 @@ public class DisplayAttributesModalPage 
     private SchemaRestClient schemaRestClient;
 
     final private IModel<List<String>> dnames = new LoadableDetachableModel<List<String>>() {
+
         private static final long serialVersionUID = 5275935387613157437L;
 
         @Override
@@ -103,6 +103,7 @@ public class DisplayAttributesModalPage 
     };
 
     final private IModel<List<String>> names = new LoadableDetachableModel<List<String>>() {
+
         private static final long serialVersionUID = 5275935387613157437L;
 
         @Override
@@ -119,6 +120,7 @@ public class DisplayAttributesModalPage 
     };
 
     final private IModel<List<String>> dsnames = new LoadableDetachableModel<List<String>>() {
+
         private static final long serialVersionUID = 5275935387613157437L;
 
         @Override
@@ -135,6 +137,7 @@ public class DisplayAttributesModalPage 
     };
 
     final private IModel<List<String>> vsnames = new LoadableDetachableModel<List<String>>() {
+
         private static final long serialVersionUID = 5275935387613157437L;
 
         @Override
@@ -177,6 +180,7 @@ public class DisplayAttributesModalPage 
         form.add(dgroup);
 
         final ListView<String> details = new ListView<String>("details", dnames) {
+
             private static final long serialVersionUID = 9101744072914090143L;
 
             @Override
@@ -195,6 +199,7 @@ public class DisplayAttributesModalPage 
             fragment.add(sgroup);
 
             final ListView<String> schemas = new ListView<String>("schemas", names) {
+
                 private static final long serialVersionUID = 9101744072914090143L;
 
                 @Override
@@ -219,6 +224,7 @@ public class DisplayAttributesModalPage 
             fragment.add(vsgroup);
 
             final ListView<String> virSchemas = new ListView<String>("virSchemas", vsnames) {
+
                 private static final long serialVersionUID = 9101744072914090143L;
 
                 @Override
@@ -243,6 +249,7 @@ public class DisplayAttributesModalPage 
             fragment.add(dsgroup);
 
             final ListView<String> derSchemas = new ListView<String>("derSchemas", dsnames) {
+
                 private static final long serialVersionUID = 9101744072914090143L;
 
                 @Override
@@ -260,6 +267,7 @@ public class DisplayAttributesModalPage 
         }
 
         final IndicatingAjaxButton submit = new IndicatingAjaxButton("submit", new ResourceModel("submit")) {
+
             private static final long serialVersionUID = -4804368561204623354L;
 
             @Override
@@ -297,8 +305,9 @@ public class DisplayAttributesModalPage 
         };
 
         form.add(submit);
-        
+
         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/EditUserModalPage.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/EditUserModalPage.java?rev=1424538&r1=1424537&r2=1424538&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 Thu Dec 20 15:45:28 2012
@@ -46,7 +46,6 @@ public class EditUserModalPage extends U
     private UserTO initialUserTO = null;
 
     public EditUserModalPage(final PageReference callerPageRef, final ModalWindow window, final UserTO userTO) {
-
         super(callerPageRef, window, userTO, Mode.ADMIN, true);
 
         this.initialUserTO = AttributableOperations.clone(userTO);
@@ -63,13 +62,8 @@ public class EditUserModalPage extends U
         }
     }
 
-    public EditUserModalPage(final ModalWindow window, final UserTO userTO) {
-        super(window, userTO, Mode.ADMIN);
-    }
-
     @Override
     protected void submitAction(final AjaxRequestTarget target, final Form form) {
-
         final UserTO updatedUserTO = (UserTO) form.getModelObject();
 
         if (updatedUserTO.getId() == 0) {
@@ -87,6 +81,6 @@ public class EditUserModalPage extends U
 
     @Override
     protected void closeAction(final AjaxRequestTarget target, final Form form) {
-        setResponsePage(new EditUserModalPage(window, userTO));
-    }   
+        setResponsePage(new ResultStatusModalPage(window, mode, userTO));
+    }
 }

Copied: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ResultStatusModalPage.java (from r1424355, syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/UserManagementResultPanel.java)
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ResultStatusModalPage.java?p2=syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ResultStatusModalPage.java&p1=syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/UserManagementResultPanel.java&r1=1424355&r2=1424538&rev=1424538&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/UserManagementResultPanel.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ResultStatusModalPage.java Thu Dec 20 15:45:28 2012
@@ -16,22 +16,24 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.syncope.console.pages.panels;
+package org.apache.syncope.console.pages;
 
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.Collections;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
-
+import org.apache.syncope.client.to.AbstractAttributableTO;
 import org.apache.syncope.client.to.AttributeTO;
 import org.apache.syncope.client.to.ConnObjectTO;
 import org.apache.syncope.client.to.PropagationTO;
+import org.apache.syncope.client.to.RoleTO;
 import org.apache.syncope.client.to.UserTO;
+import org.apache.syncope.console.commons.CloseOnESCBehavior;
 import org.apache.syncope.console.commons.StatusUtils;
-import org.apache.syncope.console.pages.UserModalPage;
+import org.apache.syncope.console.rest.ResourceRestClient;
+import org.apache.syncope.console.rest.UserRestClient;
 import org.apache.syncope.types.PropagationTaskExecStatus;
 import org.apache.wicket.Component;
 import org.apache.wicket.ajax.AjaxRequestTarget;
@@ -46,55 +48,61 @@ import org.apache.wicket.markup.html.ima
 import org.apache.wicket.markup.html.list.ListItem;
 import org.apache.wicket.markup.html.list.ListView;
 import org.apache.wicket.markup.html.panel.Fragment;
-import org.apache.wicket.markup.html.panel.Panel;
 import org.apache.wicket.model.ResourceModel;
 import org.apache.wicket.spring.injection.annot.SpringBean;
 
 /**
- * User management result panel.
+ * Show user or role status after performing a successful operation.
  */
-public class UserManagementResultPanel extends Panel {
+public class ResultStatusModalPage extends BaseModalPage {
 
     /**
      * Serial version id.
      */
     private static final long serialVersionUID = 2646115294319713723L;
 
+    @SpringBean
+    private ResourceRestClient resourceRestClient;
+
+    @SpringBean
+    private UserRestClient userRestClient;
+
+    private final AbstractAttributableTO attributable;
+
     /**
      * Status management utilities.
      */
-    @SpringBean
-    private StatusUtils statusUtils;
+    private final StatusUtils statusUtils;
+
+    public ResultStatusModalPage(final ModalWindow window, final AbstractAttributableTO attributable) {
+        this(window, UserModalPage.Mode.ADMIN, attributable);
+    }
 
     /**
-     * Panel constructor.
-     *
-     * @param id panel id.
      * @param window guest modal window.
      * @param mode operation mode.
-     * @param userTO User TO.
+     * @param attributable User TO.
      */
-    public UserManagementResultPanel(final String id, final ModalWindow window, final UserModalPage.Mode mode,
-            final UserTO userTO) {
+    public ResultStatusModalPage(final ModalWindow window, final UserModalPage.Mode mode,
+            final AbstractAttributableTO attributable) {
 
-        super(id);
+        super();
+        this.attributable = attributable;
+        statusUtils = new StatusUtils(resourceRestClient, userRestClient);
 
-        // shortcut to retrieve fragments inside inner classes
-        final Panel panel = this;
+        final BaseModalPage page = this;
 
         final WebMarkupContainer container = new WebMarkupContainer("container");
         container.setOutputMarkupId(true);
         add(container);
 
-        final Fragment fragment = new Fragment("userModalResultFrag", mode == UserModalPage.Mode.SELF
-                ? "userModalSelfResultFrag"
-                : "userModalPropagationResultFrag", this);
-
+        final Fragment fragment = new Fragment("resultFrag", mode == UserModalPage.Mode.SELF
+                ? "userRequestResultFrag"
+                : "propagationResultFrag", this);
         fragment.setOutputMarkupId(true);
         container.add(fragment);
 
         if (mode == UserModalPage.Mode.ADMIN) {
-
             // add Syncope propagation status
             PropagationTO syncope = new PropagationTO();
             syncope.setResourceName("Syncope");
@@ -102,11 +110,14 @@ public class UserManagementResultPanel e
 
             List<PropagationTO> propagations = new ArrayList<PropagationTO>();
             propagations.add(syncope);
-            propagations.addAll(userTO.getPropagationTOs());
+            propagations.addAll(attributable.getPropagationTOs());
 
-            fragment.add(new Label("userInfo", userTO.getUsername() != null
-                    ? userTO.getUsername()
-                    : String.valueOf(userTO.getId())));
+            fragment.add(new Label("info",
+                    ((attributable instanceof UserTO) && ((UserTO) attributable).getUsername() != null)
+                    ? ((UserTO) attributable).getUsername()
+                    : ((attributable instanceof RoleTO) && ((RoleTO) attributable).getName() != null)
+                    ? ((RoleTO) attributable).getName()
+                    : String.valueOf(attributable.getId())));
 
             final ListView<PropagationTO> propRes = new ListView<PropagationTO>("resources", propagations) {
 
@@ -119,11 +130,10 @@ public class UserManagementResultPanel e
                     final ListView attributes = getConnObjectView(propTO);
 
                     final Fragment attrhead;
-
-                    if (attributes.getModelObject() != null && !attributes.getModelObject().isEmpty()) {
-                        attrhead = new Fragment("attrhead", "attrHeadFrag", panel);
+                    if (attributes.getModelObject() == null || attributes.getModelObject().isEmpty()) {
+                        attrhead = new Fragment("attrhead", "emptyAttrHeadFrag", page);
                     } else {
-                        attrhead = new Fragment("attrhead", "emptyAttrHeadFrag", panel);
+                        attrhead = new Fragment("attrhead", "attrHeadFrag", page);
                     }
 
                     item.add(attrhead);
@@ -131,14 +141,13 @@ public class UserManagementResultPanel e
 
                     attrhead.add(new Label("resource", propTO.getResourceName()));
 
-                    attrhead.add(new Label("propagation", propTO.getStatus() != null
-                            ? propTO.getStatus().toString()
-                            : "UNDEFINED"));
+                    attrhead.add(new Label("propagation", propTO.getStatus() == null
+                            ? "UNDEFINED" : propTO.getStatus().toString()));
 
                     final Image image;
                     final String alt, title;
-
                     switch (propTO.getStatus()) {
+
                         case SUCCESS:
                         case SUBMITTED:
                         case CREATED:
@@ -146,6 +155,7 @@ public class UserManagementResultPanel e
                             alt = "success icon";
                             title = "success";
                             break;
+
                         default:
                             image = new Image("icon", "statuses/inactive.png");
                             alt = "failure icon";
@@ -179,6 +189,9 @@ public class UserManagementResultPanel e
             }
         };
         container.add(close);
+
+        setOutputMarkupId(true);
+        add(new CloseOnESCBehavior(window));
     }
 
     /**
@@ -192,28 +205,32 @@ public class UserManagementResultPanel e
         final ConnObjectTO after = propTO.getAfterObj();
 
         // sorted in reversed presentation order
-        final List<String> head = Arrays.asList(new String[] { "__PASSWORD__", "__ENABLE__", "__UID__", "__NAME__" });
+        final List<String> head = new ArrayList<String>();
+        if (attributable instanceof UserTO) {
+            head.add("__PASSWORD__");
+            head.add("__ENABLE__");
+        }
+        head.add("__UID__");
+        head.add("__NAME__");
 
         final Map<String, AttributeTO> beforeAttrMap;
-
-        final Map<String, AttributeTO> afterAttrMap;
-
-        final Set<String> attributes = new HashSet<String>();
-
-        if (before != null) {
-            beforeAttrMap = before.getAttributeMap();
-            attributes.addAll(beforeAttrMap.keySet());
+        if (before == null) {
+            beforeAttrMap = Collections.<String, AttributeTO>emptyMap();
         } else {
-            beforeAttrMap = Collections.emptyMap();
+            beforeAttrMap = before.getAttributeMap();
         }
 
-        if (after != null) {
-            afterAttrMap = after.getAttributeMap();
-            attributes.addAll(afterAttrMap.keySet());
+        final Map<String, AttributeTO> afterAttrMap;
+        if (after == null) {
+            afterAttrMap = Collections.<String, AttributeTO>emptyMap();
         } else {
-            afterAttrMap = Collections.emptyMap();
+            afterAttrMap = after.getAttributeMap();
         }
 
+        final Set<String> attributes = new HashSet<String>();
+        attributes.addAll(beforeAttrMap.keySet());
+        attributes.addAll(afterAttrMap.keySet());
+
         final List<String> profile = new ArrayList<String>();
         profile.addAll(attributes);
         profile.removeAll(head);
@@ -235,13 +252,11 @@ public class UserManagementResultPanel e
 
                 final Fragment beforeValue;
                 final Fragment afterValue;
-
                 if ("__ENABLE__".equals(name)) {
                     beforeValue = getStatusIcon("beforeValue", before);
                     afterValue = getStatusIcon("afterValue", after);
                 } else {
                     beforeValue = getLabelValue("beforeValue", name, beforeAttrMap);
-
                     afterValue = getLabelValue("afterValue", name, afterAttrMap);
                 }
 
@@ -266,8 +281,9 @@ public class UserManagementResultPanel e
 
         final AttributeTO attr = attrMap.get(attrName);
 
-        if (attr != null && attr.getValues() != null && !attr.getValues().isEmpty()) {
-
+        if (attr == null || attr.getValues() == null || attr.getValues().isEmpty()) {
+            value = "";
+        } else {
             if ("__PASSWORD__".equals(attrName)) {
                 value = "********";
             } else {
@@ -275,9 +291,6 @@ public class UserManagementResultPanel e
                         ? attr.getValues().toString()
                         : attr.getValues().get(0);
             }
-
-        } else {
-            value = "";
         }
 
         Component label = new Label("value", value).add(new Behavior() {
@@ -306,18 +319,20 @@ public class UserManagementResultPanel e
     private Fragment getStatusIcon(final String id, final ConnObjectTO objectTO) {
         final Image image;
         final String alt, title;
-
         switch (statusUtils.getRemoteStatus(objectTO).getStatus()) {
+
             case ACTIVE:
                 image = new Image("status", "statuses/active.png");
                 alt = "active icon";
                 title = "Enabled";
                 break;
+
             case SUSPENDED:
                 image = new Image("status", "statuses/inactive.png");
                 alt = "inactive icon";
                 title = "Disabled";
                 break;
+
             default:
                 image = null;
                 alt = null;
@@ -325,8 +340,9 @@ public class UserManagementResultPanel e
         }
 
         final Fragment frag;
-
-        if (image != null) {
+        if (image == null) {
+            frag = new Fragment(id, "emptyFrag", this);
+        } else {
             image.add(new Behavior() {
 
                 private static final long serialVersionUID = 1469628524240283489L;
@@ -342,8 +358,6 @@ public class UserManagementResultPanel e
 
             frag = new Fragment(id, "remoteStatusFrag", this);
             frag.add(image);
-        } else {
-            frag = new Fragment(id, "emptyFrag", this);
         }
 
         return frag;

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=1424538&r1=1424537&r2=1424538&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 Thu Dec 20 15:45:28 2012
@@ -50,8 +50,11 @@ public class RoleModalPage extends BaseM
 
     private RoleTO originalRoleTO;
 
-    public RoleModalPage(final PageReference callerPageRef, final ModalWindow window, final RoleTO roleTO) {
+    public RoleModalPage(final ModalWindow window, final RoleTO roleTO) {
+        this(null, window, roleTO);
+    }
 
+    public RoleModalPage(final PageReference callerPageRef, final ModalWindow window, final RoleTO roleTO) {
         super();
 
         final boolean createFlag = roleTO.getId() == 0;
@@ -83,19 +86,24 @@ public class RoleModalPage extends BaseM
                             rolePanel.getEntitlementsPalette().getModelCollection());
                     roleTO.setEntitlements(entitlementList);
 
+                    final RoleTO result;
                     if (createFlag) {
-                        roleRestClient.create(roleTO);
+                        result = roleRestClient.create(roleTO);
                     } else {
                         RoleMod roleMod = AttributableOperations.diff(roleTO, originalRoleTO);
 
                         // update role just if it is changed
-                        if (!roleMod.isEmpty()) {
-                            roleRestClient.update(roleMod);
+                        if (roleMod.isEmpty()) {
+                            result = roleTO;
+                        } else {
+                            result = roleRestClient.update(roleMod);
                         }
                     }
-                    ((Roles) callerPageRef.getPage()).setModalResult(true);
+                    if (callerPageRef != null) {
+                        ((Roles) callerPageRef.getPage()).setModalResult(true);
+                    }
 
-                    window.close(target);
+                    setResponsePage(new ResultStatusModalPage(window, result));
                 } catch (Exception e) {
                     error(getString("error") + ":" + e.getMessage());
                     target.add(feedbackPanel);
@@ -104,7 +112,6 @@ public class RoleModalPage extends BaseM
 
             @Override
             protected void onError(final AjaxRequestTarget target, final Form<?> form) {
-
                 target.add(feedbackPanel);
             }
         };
@@ -136,4 +143,7 @@ public class RoleModalPage extends BaseM
         add(form);
         add(new CloseOnESCBehavior(window));
     }
+
+    protected void closeAction(final AjaxRequestTarget target, final Form form) {
+    }
 }

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=1424538&r1=1424537&r2=1424538&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 Thu Dec 20 15:45:28 2012
@@ -18,14 +18,24 @@
  */
 package org.apache.syncope.console.pages;
 
+import org.apache.syncope.client.search.NodeCond;
+import org.apache.syncope.console.pages.panels.AbstractSearchResultPanel;
+import org.apache.syncope.console.pages.panels.RoleSearchPanel;
+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.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;
+import org.apache.wicket.model.ResourceModel;
 import org.apache.wicket.request.mapper.parameter.PageParameters;
+import org.apache.wicket.spring.injection.annot.SpringBean;
 
 /**
  * Roles WebPage.
@@ -38,19 +48,22 @@ public class Roles extends BasePage {
 
     private static final int WIN_WIDTH = 750;
 
-    private final ModalWindow createRoleWin;
+    @SpringBean
+    private RoleRestClient restClient;
+
+    private final ModalWindow editRoleWin;
 
     private final WebMarkupContainer container;
 
     public Roles(final PageParameters parameters) {
         super(parameters);
 
-        createRoleWin = new ModalWindow("createRoleWin");
-        createRoleWin.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
-        createRoleWin.setInitialHeight(WIN_HEIGHT);
-        createRoleWin.setInitialWidth(WIN_WIDTH);
-        createRoleWin.setCookieName("create-role-modal");
-        add(createRoleWin);
+        editRoleWin = new ModalWindow("editRoleWin");
+        editRoleWin.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
+        editRoleWin.setInitialHeight(WIN_HEIGHT);
+        editRoleWin.setInitialWidth(WIN_WIDTH);
+        editRoleWin.setCookieName("edit-role-modal");
+        add(editRoleWin);
 
         container = new WebMarkupContainer("container");
         container.setOutputMarkupId(true);
@@ -60,22 +73,22 @@ public class Roles extends BasePage {
         treePanel.setOutputMarkupId(true);
         container.add(treePanel);
 
-        final RoleSummaryPanel nodePanel = new RoleSummaryPanel("summaryPanel", createRoleWin,
+        final RoleSummaryPanel summaryPanel = new RoleSummaryPanel("summaryPanel", editRoleWin,
                 Roles.this.getPageReference());
+        container.add(summaryPanel);
 
-        nodePanel.setOutputMarkupId(true);
-        container.add(nodePanel);
-
-        createRoleWin.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() {
+        editRoleWin.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() {
 
             private static final long serialVersionUID = 8804221891699487139L;
 
             @Override
             public void onClose(final AjaxRequestTarget target) {
+                final RoleSummaryPanel summaryPanel = (RoleSummaryPanel) container.get("summaryPanel");
 
-                final TreeNodeClickUpdate data = new TreeNodeClickUpdate(target, nodePanel.getSelectedNode() == null
+                final TreeNodeClickUpdate data = new TreeNodeClickUpdate(target,
+                        summaryPanel == null || summaryPanel.getSelectedNode() == null
                         ? 0
-                        : nodePanel.getSelectedNode().getId());
+                        : summaryPanel.getSelectedNode().getId());
 
                 send(getPage(), Broadcast.BREADTH, data);
                 target.add(container);
@@ -87,7 +100,49 @@ public class Roles extends BasePage {
             }
         });
 
-        container.add(createRoleWin);
+        container.add(editRoleWin);
+
+        final AbstractSearchResultPanel searchResult =
+                new RoleSearchResultPanel("searchResult", true, null, getPageReference(), restClient);
+        add(searchResult);
+
+        final Form searchForm = new Form("searchForm");
+        add(searchForm);
+
+        final RoleSearchPanel searchPanel = new RoleSearchPanel("searchPanel");
+        searchForm.add(searchPanel);
+
+        searchForm.add(new IndicatingAjaxButton("search", new ResourceModel("search")) {
+
+            private static final long serialVersionUID = -958724007591692537L;
+
+            @Override
+            protected void onSubmit(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,
+            final AbstractSearchResultPanel resultsetPanel) {
+
+        if (searchCond == null || !searchCond.checkValidity()) {
+            error(getString("search_error"));
+            return;
+        }
+
+        resultsetPanel.search(searchCond, target);
     }
 
     @Override
@@ -95,13 +150,12 @@ public class Roles extends BasePage {
         super.onEvent(event);
 
         if (event.getPayload() instanceof TreeNodeClickUpdate) {
-
             final TreeNodeClickUpdate update = (TreeNodeClickUpdate) event.getPayload();
 
-            final RoleSummaryPanel nodePanel = new RoleSummaryPanel("summaryPanel", createRoleWin,
+            final RoleSummaryPanel summaryPanel = new RoleSummaryPanel("summaryPanel", editRoleWin,
                     Roles.this.getPageReference(), update.getSelectedNodeId());
 
-            container.addOrReplace(nodePanel);
+            container.addOrReplace(summaryPanel);
             update.getTarget().add(this);
         }
     }

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/StatusModalPage.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/StatusModalPage.java?rev=1424538&r1=1424537&r2=1424538&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/StatusModalPage.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/StatusModalPage.java Thu Dec 20 15:45:28 2012
@@ -20,6 +20,7 @@ package org.apache.syncope.console.pages
 
 import java.util.ArrayList;
 import java.util.List;
+import org.apache.syncope.client.to.AbstractAttributableTO;
 import org.apache.syncope.client.to.UserTO;
 import org.apache.syncope.console.commons.CloseOnESCBehavior;
 import org.apache.syncope.console.commons.StatusBean;
@@ -41,7 +42,8 @@ public class StatusModalPage extends Bas
     @SpringBean
     private UserRestClient userRestClient;
 
-    public StatusModalPage(final PageReference callerPageRef, final ModalWindow window, final UserTO userTO) {
+    public StatusModalPage(final PageReference callerPageRef, final ModalWindow window,
+            final AbstractAttributableTO attributable) {
 
         super();
 
@@ -51,64 +53,88 @@ public class StatusModalPage extends Bas
 
         final List<StatusBean> statuses = new ArrayList<StatusBean>();
 
-        final StatusPanel statusPanel = new StatusPanel("statuspanel", userTO, statuses);
+        final StatusPanel statusPanel = new StatusPanel("statuspanel", attributable, statuses);
         form.add(statusPanel);
 
-        final AjaxButton disable = new IndicatingAjaxButton("disable", new ResourceModel("disable", "Disable")) {
-            private static final long serialVersionUID = -958724007591692537L;
-
-            @Override
-            protected void onSubmit(final AjaxRequestTarget target, final Form form) {
-
-                try {
-                    userRestClient.suspend(userTO.getId(), statuses);
-
-                    if (callerPageRef.getPage() instanceof BasePage) {
-                        ((BasePage) callerPageRef.getPage()).setModalResult(true);
+        final AjaxButton disable;
+        if (attributable instanceof UserTO) {
+            disable = new IndicatingAjaxButton("disable", new ResourceModel("disable", "Disable")) {
+
+                private static final long serialVersionUID = -958724007591692537L;
+
+                @Override
+                protected void onSubmit(final AjaxRequestTarget target, final Form form) {
+
+                    try {
+                        userRestClient.suspend(attributable.getId(), statuses);
+
+                        if (callerPageRef.getPage() instanceof BasePage) {
+                            ((BasePage) callerPageRef.getPage()).setModalResult(true);
+                        }
+
+                        window.close(target);
+                    } catch (Exception e) {
+                        LOG.error("Error disabling resources", e);
+                        error(getString("error") + ":" + e.getMessage());
+                        target.add(feedbackPanel);
                     }
+                }
 
-                    window.close(target);
-                } catch (Exception e) {
-                    LOG.error("Error disabling resources", e);
-                    error(getString("error") + ":" + e.getMessage());
+                @Override
+                protected void onError(final AjaxRequestTarget target, final Form<?> form) {
                     target.add(feedbackPanel);
                 }
-            }
+            };
+        } else {
+            disable = new AjaxButton("disable") {
+
+                private static final long serialVersionUID = 5538299138211283825L;
+
+            };
+            disable.setVisible(false);
+        }
+        form.add(disable);
 
-            @Override
-            protected void onError(final AjaxRequestTarget target, final Form<?> form) {
+        final AjaxButton enable;
+        if (attributable instanceof UserTO) {
+            enable = new IndicatingAjaxButton("enable", new ResourceModel("enable", "Enable")) {
 
-                target.add(feedbackPanel);
-            }
-        };
-
-        final AjaxButton enable = new IndicatingAjaxButton("enable", new ResourceModel("enable", "Enable")) {
-            private static final long serialVersionUID = -958724007591692537L;
+                private static final long serialVersionUID = -958724007591692537L;
 
-            @Override
-            protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
+                @Override
+                protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
 
-                try {
-                    userRestClient.reactivate(userTO.getId(), statuses);
+                    try {
+                        userRestClient.reactivate(attributable.getId(), statuses);
 
-                    ((BasePage) callerPageRef.getPage()).setModalResult(true);
+                        ((BasePage) callerPageRef.getPage()).setModalResult(true);
 
-                    window.close(target);
-                } catch (Exception e) {
-                    LOG.error("Error enabling resources", e);
-                    error(getString("error") + ":" + e.getMessage());
-                    target.add(feedbackPanel);
+                        window.close(target);
+                    } catch (Exception e) {
+                        LOG.error("Error enabling resources", e);
+                        error(getString("error") + ":" + e.getMessage());
+                        target.add(feedbackPanel);
+                    }
                 }
-            }
 
-            @Override
-            protected void onError(final AjaxRequestTarget target, final Form<?> form) {
+                @Override
+                protected void onError(final AjaxRequestTarget target, final Form<?> form) {
 
-                target.add(feedbackPanel);
-            }
-        };
+                    target.add(feedbackPanel);
+                }
+            };
+        } else {
+            enable = new AjaxButton("enable") {
+
+                private static final long serialVersionUID = 5538299138211283825L;
+
+            };
+            enable.setVisible(false);
+        }
+        form.add(enable);
 
         final IndicatingAjaxButton cancel = new IndicatingAjaxButton("cancel", new ResourceModel("cancel")) {
+
             private static final long serialVersionUID = -958724007591692537L;
 
             @Override
@@ -120,11 +146,7 @@ public class StatusModalPage extends Bas
             protected void onError(final AjaxRequestTarget target, final Form form) {
             }
         };
-
         cancel.setDefaultFormProcessing(false);
-        
-        form.add(disable);
-        form.add(enable);
         form.add(cancel);
     }
 }

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/UserModalPage.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/UserModalPage.java?rev=1424538&r1=1424537&r2=1424538&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/UserModalPage.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/UserModalPage.java Thu Dec 20 15:45:28 2012
@@ -22,10 +22,9 @@ import org.apache.syncope.client.to.User
 import org.apache.syncope.console.commons.CloseOnESCBehavior;
 import org.apache.syncope.console.pages.panels.AttributesPanel;
 import org.apache.syncope.console.pages.panels.DerivedAttributesPanel;
-import org.apache.syncope.console.pages.panels.ResourcesPanel;
 import org.apache.syncope.console.pages.panels.MembershipsPanel;
+import org.apache.syncope.console.pages.panels.ResourcesPanel;
 import org.apache.syncope.console.pages.panels.UserDetailsPanel;
-import org.apache.syncope.console.pages.panels.UserManagementResultPanel;
 import org.apache.syncope.console.pages.panels.VirtualAttributesPanel;
 import org.apache.wicket.PageReference;
 import org.apache.wicket.ajax.AjaxRequestTarget;
@@ -50,6 +49,7 @@ public abstract class UserModalPage exte
         ADMIN,
         SELF,
         TEMPLATE;
+
     }
 
     private static final long serialVersionUID = 5002005009737457667L;
@@ -82,28 +82,6 @@ public abstract class UserModalPage exte
         add(fragment);
         add(new CloseOnESCBehavior(window));
     }
-  
-    public UserModalPage(final ModalWindow window, final UserTO userTO, final Mode mode) {
-
-        super();
-        
-        this.callerPageRef = null;
-        this.window = window;
-        this.mode = mode;
-        this.userTO = userTO;
-        this.resetPassword = false;
-
-        fragment = new Fragment("userModalFrag", "userModalResultFrag", this);
-        fragment.setOutputMarkupId(true);
-        add(fragment);
-
-        final UserManagementResultPanel result = new UserManagementResultPanel("userModalPageResult", window, mode,
-                userTO);
-        result.setOutputMarkupId(true);
-
-        fragment.add(result);
-        add(new CloseOnESCBehavior(window));
-    }
 
     public UserTO getUserTO() {
         return userTO;
@@ -114,7 +92,6 @@ public abstract class UserModalPage exte
     }
 
     protected Form setupEditPanel() {
-
         fragment.add(new Label("id", userTO.getId() == 0
                 ? ""
                 : userTO.getUsername()));
@@ -179,6 +156,7 @@ public abstract class UserModalPage exte
         form.add(submit);
 
         final AjaxButton cancel = new AjaxButton("cancel", new ResourceModel("cancel")) {
+
             private static final long serialVersionUID = 530608535790823587L;
 
             @Override
@@ -190,7 +168,7 @@ public abstract class UserModalPage exte
             protected void onError(final AjaxRequestTarget target, final Form<?> form) {
             }
         };
-        
+
         cancel.setDefaultFormProcessing(false);
         form.add(cancel);
 
@@ -199,6 +177,7 @@ public abstract class UserModalPage exte
 
     protected AjaxButton getOnSubmit() {
         return new IndicatingAjaxButton("apply", new ResourceModel("submit")) {
+
             private static final long serialVersionUID = -958724007591692537L;
 
             @Override

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/UserOwnerSelectModalPage.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/UserOwnerSelectModalPage.java?rev=1424538&r1=1424537&r2=1424538&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/UserOwnerSelectModalPage.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/UserOwnerSelectModalPage.java Thu Dec 20 15:45:28 2012
@@ -20,9 +20,10 @@ package org.apache.syncope.console.pages
 
 import org.apache.syncope.client.search.NodeCond;
 import org.apache.syncope.console.commons.CloseOnESCBehavior;
-import org.apache.syncope.console.pages.panels.ResultSetPanel;
-import org.apache.syncope.console.pages.panels.SelectOnlyResultSetPanel;
+import org.apache.syncope.console.pages.panels.AbstractSearchResultPanel;
+import org.apache.syncope.console.pages.panels.SelectOnlyUserSearchResultPanel;
 import org.apache.syncope.console.pages.panels.UserSearchPanel;
+import org.apache.syncope.console.rest.UserRestClient;
 import org.apache.wicket.PageReference;
 import org.apache.wicket.Session;
 import org.apache.wicket.ajax.AjaxRequestTarget;
@@ -30,17 +31,20 @@ import org.apache.wicket.extensions.ajax
 import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
 import org.apache.wicket.markup.html.form.Form;
 import org.apache.wicket.model.ResourceModel;
+import org.apache.wicket.spring.injection.annot.SpringBean;
 
 public class UserOwnerSelectModalPage extends BaseModalPage {
 
     private static final long serialVersionUID = 2106489458494696439L;
 
-    public UserOwnerSelectModalPage(final PageReference pageRef, final ModalWindow window) {
+    @SpringBean
+    private UserRestClient restClient;
 
+    public UserOwnerSelectModalPage(final PageReference pageRef, final ModalWindow window) {
         super();
 
-        final SelectOnlyResultSetPanel searchResult =
-                new SelectOnlyResultSetPanel("searchResult", true, null, pageRef, window);
+        final SelectOnlyUserSearchResultPanel searchResult =
+                new SelectOnlyUserSearchResultPanel("searchResult", true, null, pageRef, window, restClient);
         add(searchResult);
 
         final Form searchForm = new Form("searchForm");
@@ -72,7 +76,7 @@ public class UserOwnerSelectModalPage ex
     }
 
     private void doSearch(final AjaxRequestTarget target, final NodeCond searchCond,
-            final ResultSetPanel resultsetPanel) {
+            final AbstractSearchResultPanel resultsetPanel) {
 
         if (searchCond == null || !searchCond.checkValidity()) {
             error(getString("search_error"));

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/UserRequestModalPage.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/UserRequestModalPage.java?rev=1424538&r1=1424537&r2=1424538&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/UserRequestModalPage.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/UserRequestModalPage.java Thu Dec 20 15:45:28 2012
@@ -81,10 +81,6 @@ public class UserRequestModalPage extend
         setupEditPanel();
     }
 
-    public UserRequestModalPage(final ModalWindow window, final UserTO userTO, final Mode mode) {
-        super(window, userTO, mode);
-    }
-
     @Override
     protected void submitAction(final AjaxRequestTarget target, final Form form) {
         final UserTO updatedUserTO = (UserTO) form.getModelObject();
@@ -134,6 +130,6 @@ public class UserRequestModalPage extend
 
     @Override
     protected void closeAction(final AjaxRequestTarget target, final Form form) {
-        setResponsePage(new UserRequestModalPage(window, userTO, mode));
+        setResponsePage(new ResultStatusModalPage(window, mode, userTO));
     }
 }

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/Users.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/Users.java?rev=1424538&r1=1424537&r2=1424538&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/Users.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/Users.java Thu Dec 20 15:45:28 2012
@@ -32,9 +32,12 @@ import org.apache.wicket.model.ResourceM
 import org.apache.wicket.request.mapper.parameter.PageParameters;
 import org.apache.syncope.client.search.NodeCond;
 import org.apache.syncope.client.to.UserTO;
-import org.apache.syncope.console.pages.panels.ResultSetPanel;
-import org.apache.syncope.console.pages.panels.ResultSetPanel.EventDataWrapper;
+import org.apache.syncope.console.pages.panels.AbstractSearchResultPanel;
+import org.apache.syncope.console.pages.panels.AbstractSearchResultPanel.EventDataWrapper;
 import org.apache.syncope.console.pages.panels.UserSearchPanel;
+import org.apache.syncope.console.pages.panels.UserSearchResultPanel;
+import org.apache.syncope.console.rest.UserRestClient;
+import org.apache.wicket.spring.injection.annot.SpringBean;
 
 public class Users extends BasePage {
 
@@ -44,6 +47,9 @@ public class Users extends BasePage {
 
     private final static int EDIT_MODAL_WIN_WIDTH = 800;
 
+    @SpringBean
+    private UserRestClient restClient;
+
     public Users(final PageParameters parameters) {
         super(parameters);
 
@@ -55,10 +61,12 @@ public class Users extends BasePage {
         editModalWin.setCookieName("edit-modal");
         add(editModalWin);
 
-        final ResultSetPanel searchResult = new ResultSetPanel("searchResult", true, null, getPageReference());
+        final AbstractSearchResultPanel searchResult =
+                new UserSearchResultPanel("searchResult", true, null, getPageReference(), restClient);
         add(searchResult);
 
-        final ResultSetPanel listResult = new ResultSetPanel("listResult", false, null, getPageReference());
+        final AbstractSearchResultPanel listResult =
+                new UserSearchResultPanel("listResult", false, null, getPageReference(), restClient);
         add(listResult);
 
         // create new user
@@ -71,7 +79,7 @@ public class Users extends BasePage {
                 editModalWin.setPageCreator(new ModalWindow.PageCreator() {
 
                     private static final long serialVersionUID = -7834632442532690940L;
-                  
+
                     @Override
                     public Page createPage() {
                         return new EditUserModalPage(Users.this.getPageReference(), editModalWin, new UserTO());
@@ -79,7 +87,7 @@ public class Users extends BasePage {
                 });
 
                 editModalWin.show(target);
-            }    
+            }
         };
         MetaDataRoleAuthorizationStrategy.authorize(
                 createLink, ENABLE, xmlRolesReader.getAllAllowedRoles("Users", "create"));
@@ -118,7 +126,7 @@ public class Users extends BasePage {
     }
 
     private void doSearch(final AjaxRequestTarget target, final NodeCond searchCond,
-            final ResultSetPanel resultsetPanel) {
+            final AbstractSearchResultPanel resultsetPanel) {
 
         if (searchCond == null || !searchCond.checkValidity()) {
             error(getString("search_error"));



Mime
View raw message