syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ilgro...@apache.org
Subject svn commit: r1459775 - in /syncope/trunk: ./ console/src/main/java/org/apache/syncope/console/pages/ console/src/main/java/org/apache/syncope/console/pages/panels/ console/src/main/java/org/apache/syncope/console/rest/ console/src/main/resources/org/ap...
Date Fri, 22 Mar 2013 13:55:05 GMT
Author: ilgrosso
Date: Fri Mar 22 13:55:04 2013
New Revision: 1459775

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

Modified:
    syncope/trunk/   (props changed)
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/DisplayAttributesModalPage.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/AbstractSearchResultPanel.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/RoleSearchResultPanel.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/RoleTabPanel.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/SelectOnlyUserSearchResultPanel.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/UserSearchResultPanel.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/SchemaRestClient.java
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/AbstractSearchResultPanel.html

Propchange: syncope/trunk/
------------------------------------------------------------------------------
  Merged /syncope/branches/1_0_X:r1459693-1459736

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=1459775&r1=1459774&r2=1459775&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
Fri Mar 22 13:55:04 2013
@@ -26,10 +26,8 @@ import java.util.List;
 import java.util.Map;
 import org.apache.commons.lang.ArrayUtils;
 import org.apache.syncope.common.to.UserTO;
-import org.apache.syncope.common.types.AttributableType;
 import org.apache.syncope.console.commons.Constants;
 import org.apache.syncope.console.commons.PreferenceManager;
-import org.apache.syncope.console.rest.SchemaRestClient;
 import org.apache.wicket.PageReference;
 import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.ajax.markup.html.form.AjaxButton;
@@ -52,6 +50,7 @@ import org.apache.wicket.spring.injectio
 /**
  * Modal window with Display attributes form.
  */
+@SuppressWarnings({"unchecked", "rawtypes"})
 public class DisplayAttributesModalPage extends BaseModalPage {
 
     private static final long serialVersionUID = -4274117450918385110L;
@@ -70,100 +69,75 @@ public class DisplayAttributesModalPage 
     @SpringBean
     private PreferenceManager prefMan;
 
-    /**
-     * Schema rest client.
-     */
-    @SpringBean
-    private SchemaRestClient schemaRestClient;
+    private final List<String> selectedDetails;
 
-    final private IModel<List<String>> dnames = new LoadableDetachableModel<List<String>>()
{
+    private final List<String> selectedSchemas;
 
-        private static final long serialVersionUID = 5275935387613157437L;
+    private final List<String> selectedDerSchemas;
 
-        @Override
-        protected List<String> load() {
+    private final List<String> selectedVirSchemas;
 
-            final List<String> details = new ArrayList<String>();
+    public DisplayAttributesModalPage(final PageReference pageRef, final ModalWindow window,
+            final List<String> schemaNames, final List<String> dSchemaNames,
final List<String> vSchemaNames) {
 
-            Class<?> clazz = UserTO.class;
+        super();
 
-            // loop on class and all superclasses searching for field
-            while (clazz != null && clazz != Object.class) {
-                for (Field field : clazz.getDeclaredFields()) {
-                    if (!ArrayUtils.contains(ATTRIBUTES_TO_HIDE, field.getName())) {
-                        details.add(field.getName());
-                    }
-                }
-                clazz = clazz.getSuperclass();
-            }
+        final IModel<List<String>> fnames = new LoadableDetachableModel<List<String>>()
{
 
-            Collections.reverse(details);
-            return details;
-        }
-    };
+            private static final long serialVersionUID = 5275935387613157437L;
 
-    final private IModel<List<String>> names = new LoadableDetachableModel<List<String>>()
{
+            @Override
+            protected List<String> load() {
 
-        private static final long serialVersionUID = 5275935387613157437L;
+                final List<String> details = new ArrayList<String>();
 
-        @Override
-        protected List<String> load() {
+                Class<?> clazz = UserTO.class;
 
-            List<String> schemas = schemaRestClient.getSchemaNames(AttributableType.USER);
+                // loop on class and all superclasses searching for field
+                while (clazz != null && clazz != Object.class) {
+                    for (Field field : clazz.getDeclaredFields()) {
+                        if (!ArrayUtils.contains(ATTRIBUTES_TO_HIDE, field.getName())) {
+                            details.add(field.getName());
+                        }
+                    }
+                    clazz = clazz.getSuperclass();
+                }
 
-            if (schemas == null) {
-                schemas = new ArrayList<String>();
+                Collections.reverse(details);
+                return details;
             }
+        };
 
-            return schemas;
-        }
-    };
-
-    final private IModel<List<String>> dsnames = new LoadableDetachableModel<List<String>>()
{
-
-        private static final long serialVersionUID = 5275935387613157437L;
-
-        @Override
-        protected List<String> load() {
+        final IModel<List<String>> names = new LoadableDetachableModel<List<String>>()
{
 
-            List<String> schemas = schemaRestClient.getDerivedSchemaNames(AttributableType.USER);
+            private static final long serialVersionUID = 5275935387613157437L;
 
-            if (schemas == null) {
-                schemas = new ArrayList<String>();
+            @Override
+            protected List<String> load() {
+                return schemaNames;
             }
+        };
 
-            return schemas;
-        }
-    };
-
-    final private IModel<List<String>> vsnames = new LoadableDetachableModel<List<String>>()
{
-
-        private static final long serialVersionUID = 5275935387613157437L;
-
-        @Override
-        protected List<String> load() {
+        final IModel<List<String>> dsnames = new LoadableDetachableModel<List<String>>()
{
 
-            List<String> schemas = schemaRestClient.getVirtualSchemaNames(AttributableType.USER);
+            private static final long serialVersionUID = 5275935387613157437L;
 
-            if (schemas == null) {
-                schemas = new ArrayList<String>();
+            @Override
+            protected List<String> load() {
+                return dSchemaNames;
             }
+        };
 
-            return schemas;
-        }
-    };
+        final IModel<List<String>> vsnames = new LoadableDetachableModel<List<String>>()
{
 
-    private final List<String> selectedDetails;
+            private static final long serialVersionUID = 5275935387613157437L;
 
-    private final List<String> selectedSchemas;
-
-    private final List<String> selectedVirSchemas;
-
-    private final List<String> selectedDerSchemas;
+            @Override
+            protected List<String> load() {
+                return vSchemaNames;
+            }
+        };
 
-    public DisplayAttributesModalPage(final PageReference pageRef, final ModalWindow window)
{
-
-        super();
 
         final Form form = new Form("form");
         form.setModel(new CompoundPropertyModel(this));
@@ -172,26 +146,31 @@ public class DisplayAttributesModalPage 
 
         selectedSchemas = prefMan.getList(getRequest(), Constants.PREF_USERS_ATTRIBUTES_VIEW);
 
-        selectedVirSchemas = prefMan.getList(getRequest(), Constants.PREF_USERS_VIRTUAL_ATTRIBUTES_VIEW);
-
         selectedDerSchemas = prefMan.getList(getRequest(), Constants.PREF_USERS_DERIVED_ATTRIBUTES_VIEW);
 
+        selectedVirSchemas = prefMan.getList(getRequest(), Constants.PREF_USERS_VIRTUAL_ATTRIBUTES_VIEW);
+
         final CheckGroup dgroup = new CheckGroup("dCheckGroup", new PropertyModel(this, "selectedDetails"));
         form.add(dgroup);
 
-        final ListView<String> details = new ListView<String>("details", dnames)
{
+        final ListView<String> details = new ListView<String>("details", fnames)
{
 
             private static final long serialVersionUID = 9101744072914090143L;
 
             @Override
-            protected void populateItem(ListItem<String> item) {
+            protected void populateItem(final ListItem<String> item) {
                 item.add(new Check("dcheck", item.getModel()));
                 item.add(new Label("dname", new ResourceModel(item.getModelObject(), item.getModelObject())));
             }
         };
         dgroup.add(details);
 
-        if (names.getObject() != null && !names.getObject().isEmpty()) {
+        if (names.getObject() == null || names.getObject().isEmpty()) {
+            final Fragment fragment = new Fragment("schemas", "emptyFragment", form);
+            form.add(fragment);
+
+            selectedSchemas.clear();
+        } else {
             final Fragment fragment = new Fragment("schemas", "sfragment", form);
             form.add(fragment);
 
@@ -209,61 +188,56 @@ public class DisplayAttributesModalPage 
                 }
             };
             sgroup.add(schemas);
-        } else {
-            final Fragment fragment = new Fragment("schemas", "emptyFragment", form);
-            form.add(fragment);
-
-            selectedSchemas.clear();
         }
 
-        if (vsnames.getObject() != null && !vsnames.getObject().isEmpty()) {
-            final Fragment fragment = new Fragment("vschemas", "vsfragment", form);
+        if (dsnames.getObject() == null || dsnames.getObject().isEmpty()) {
+            final Fragment fragment = new Fragment("dschemas", "emptyFragment", form);
             form.add(fragment);
 
-            final CheckGroup vsgroup = new CheckGroup("vsCheckGroup", new PropertyModel(this,
"selectedVirSchemas"));
-            fragment.add(vsgroup);
+            selectedDerSchemas.clear();
+        } else {
+            final Fragment fragment = new Fragment("dschemas", "dsfragment", form);
+            form.add(fragment);
 
-            final ListView<String> virSchemas = new ListView<String>("virSchemas",
vsnames) {
+            final CheckGroup dsgroup = new CheckGroup("dsCheckGroup", new PropertyModel(this,
"selectedDerSchemas"));
+            fragment.add(dsgroup);
+
+            final ListView<String> derSchemas = new ListView<String>("derSchemas",
dsnames) {
 
                 private static final long serialVersionUID = 9101744072914090143L;
 
                 @Override
                 protected void populateItem(ListItem<String> item) {
-                    item.add(new Check("vscheck", item.getModel()));
-                    item.add(new Label("vsname", new ResourceModel(item.getModelObject(),
item.getModelObject())));
+                    item.add(new Check("dscheck", item.getModel()));
+                    item.add(new Label("dsname", new ResourceModel(item.getModelObject(),
item.getModelObject())));
                 }
             };
-            vsgroup.add(virSchemas);
-        } else {
+            dsgroup.add(derSchemas);
+        }
+
+        if (vsnames.getObject() == null || vsnames.getObject().isEmpty()) {
             final Fragment fragment = new Fragment("vschemas", "emptyFragment", form);
             form.add(fragment);
 
             selectedVirSchemas.clear();
-        }
-
-        if (dsnames.getObject() != null && !dsnames.getObject().isEmpty()) {
-            final Fragment fragment = new Fragment("dschemas", "dsfragment", form);
+        } else {
+            final Fragment fragment = new Fragment("vschemas", "vsfragment", form);
             form.add(fragment);
 
-            final CheckGroup dsgroup = new CheckGroup("dsCheckGroup", new PropertyModel(this,
"selectedDerSchemas"));
-            fragment.add(dsgroup);
+            final CheckGroup vsgroup = new CheckGroup("vsCheckGroup", new PropertyModel(this,
"selectedVirSchemas"));
+            fragment.add(vsgroup);
 
-            final ListView<String> derSchemas = new ListView<String>("derSchemas",
dsnames) {
+            final ListView<String> virSchemas = new ListView<String>("virSchemas",
vsnames) {
 
                 private static final long serialVersionUID = 9101744072914090143L;
 
                 @Override
                 protected void populateItem(ListItem<String> item) {
-                    item.add(new Check("dscheck", item.getModel()));
-                    item.add(new Label("dsname", new ResourceModel(item.getModelObject(),
item.getModelObject())));
+                    item.add(new Check("vscheck", item.getModel()));
+                    item.add(new Label("vsname", new ResourceModel(item.getModelObject(),
item.getModelObject())));
                 }
             };
-            dsgroup.add(derSchemas);
-        } else {
-            final Fragment fragment = new Fragment("dschemas", "emptyFragment", form);
-            form.add(fragment);
-
-            selectedDerSchemas.clear();
+            vsgroup.add(virSchemas);
         }
 
         final AjaxButton submit = new IndicatingAjaxButton("submit", new ResourceModel("submit"))
{
@@ -272,8 +246,8 @@ public class DisplayAttributesModalPage 
 
             @Override
             protected void onSubmit(final AjaxRequestTarget target, final Form<?> form)
{
-                if (selectedDetails.size() + selectedSchemas.size() + selectedVirSchemas.size()
-                        + selectedDerSchemas.size() > MAX_SELECTIONS) {
+                if (selectedDetails.size() + selectedSchemas.size() + selectedVirSchemas.size()
+ selectedDerSchemas.size()
+                        > MAX_SELECTIONS) {
 
                     error(getString("tooManySelections"));
                     onError(target, form);
@@ -284,10 +258,10 @@ public class DisplayAttributesModalPage 
 
                     prefs.put(Constants.PREF_USERS_ATTRIBUTES_VIEW, selectedSchemas);
 
-                    prefs.put(Constants.PREF_USERS_VIRTUAL_ATTRIBUTES_VIEW, selectedVirSchemas);
-
                     prefs.put(Constants.PREF_USERS_DERIVED_ATTRIBUTES_VIEW, selectedDerSchemas);
 
+                    prefs.put(Constants.PREF_USERS_VIRTUAL_ATTRIBUTES_VIEW, selectedVirSchemas);
+
                     prefMan.setList(getRequest(), getResponse(), prefs);
 
                     ((BasePage) pageRef.getPage()).setModalResult(true);

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=1459775&r1=1459774&r2=1459775&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 Fri Mar
22 13:55:04 2013
@@ -105,25 +105,25 @@ public class Users extends BasePage {
         final ClearIndicatingAjaxButton searchButton =
                 new ClearIndicatingAjaxButton("search", new ResourceModel("search"), getPageReference())
{
 
-                    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/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/AbstractSearchResultPanel.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/AbstractSearchResultPanel.java?rev=1459775&r1=1459774&r2=1459775&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/AbstractSearchResultPanel.java
(original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/AbstractSearchResultPanel.java
Fri Mar 22 13:55:04 2013
@@ -194,11 +194,13 @@ public abstract class AbstractSearchResu
         container.setOutputMarkupId(true);
         add(container);
 
+        rows = prefMan.getPaginatorRows(getRequest(), Constants.PREF_USERS_PAGINATOR_ROWS);
+    }
+
+    protected void initResultTable() {
         // ---------------------------
         // Result table initialization
         // ---------------------------
-        // preferences and container must be not null to use it ...
-        rows = prefMan.getPaginatorRows(getRequest(), Constants.PREF_USERS_PAGINATOR_ROWS);
         updateResultTable(false);
         // ---------------------------
 

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/RoleSearchResultPanel.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/RoleSearchResultPanel.java?rev=1459775&r1=1459774&r2=1459775&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/RoleSearchResultPanel.java
(original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/RoleSearchResultPanel.java
Fri Mar 22 13:55:04 2013
@@ -56,6 +56,7 @@ public class RoleSearchResultPanel exten
             final AbstractAttributableRestClient restClient) {
 
         super(id, filtered, searchCond, callerRef, restClient);
+        initResultTable();
     }
 
     @Override

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/RoleTabPanel.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/RoleTabPanel.java?rev=1459775&r1=1459774&r2=1459775&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/RoleTabPanel.java
(original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/RoleTabPanel.java
Fri Mar 22 13:55:04 2013
@@ -87,4 +87,4 @@ public class RoleTabPanel extends Panel 
         form.add(userListContainer);
         add(form);
     }
-}
\ No newline at end of file
+}

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/SelectOnlyUserSearchResultPanel.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/SelectOnlyUserSearchResultPanel.java?rev=1459775&r1=1459774&r2=1459775&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/SelectOnlyUserSearchResultPanel.java
(original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/SelectOnlyUserSearchResultPanel.java
Fri Mar 22 13:55:04 2013
@@ -54,12 +54,6 @@ public class SelectOnlyUserSearchResultP
 
         this.pageRef = pageRef;
         this.window = window;
-
-        container.get("reload").setEnabled(false);
-        container.get("reload").setVisible(false);
-
-        container.get("displayAttrsLink").setEnabled(false);
-        container.get("displayAttrsLink").setVisible(false);
     }
 
     @Override

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/UserSearchResultPanel.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/UserSearchResultPanel.java?rev=1459775&r1=1459774&r2=1459775&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/UserSearchResultPanel.java
(original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/UserSearchResultPanel.java
Fri Mar 22 13:55:04 2013
@@ -27,6 +27,7 @@ import java.util.List;
 import org.apache.syncope.common.search.NodeCond;
 import org.apache.syncope.common.to.AbstractAttributableTO;
 import org.apache.syncope.common.to.UserTO;
+import org.apache.syncope.common.types.AttributableType;
 import org.apache.syncope.common.types.SchemaType;
 import org.apache.syncope.common.validation.SyncopeClientCompositeErrorException;
 import org.apache.syncope.console.commons.Constants;
@@ -35,6 +36,7 @@ import org.apache.syncope.console.pages.
 import org.apache.syncope.console.pages.ResultStatusModalPage;
 import org.apache.syncope.console.pages.StatusModalPage;
 import org.apache.syncope.console.rest.AbstractAttributableRestClient;
+import org.apache.syncope.console.rest.SchemaRestClient;
 import org.apache.syncope.console.rest.UserRestClient;
 import org.apache.syncope.console.wicket.extensions.markup.html.repeater.data.table.ActionColumn;
 import org.apache.syncope.console.wicket.extensions.markup.html.repeater.data.table.AttrColumn;
@@ -52,6 +54,7 @@ import org.apache.wicket.extensions.mark
 import org.apache.wicket.model.IModel;
 import org.apache.wicket.model.Model;
 import org.apache.wicket.model.ResourceModel;
+import org.apache.wicket.spring.injection.annot.SpringBean;
 import org.springframework.util.ReflectionUtils;
 
 public class UserSearchResultPanel extends AbstractSearchResultPanel {
@@ -60,10 +63,26 @@ public class UserSearchResultPanel exten
 
     private final static String PAGEID = "Users";
 
+    @SpringBean
+    private SchemaRestClient schemaRestClient;
+
+    private final List<String> schemaNames;
+
+    private final List<String> dSchemaNames;
+
+    private final List<String> vSchemaNames;
+
     public <T extends AbstractAttributableTO> UserSearchResultPanel(final String id,
final boolean filtered,
-            final NodeCond searchCond, final PageReference callerRef, final AbstractAttributableRestClient
restClient) {
+            final NodeCond searchCond, final PageReference callerRef,
+            final AbstractAttributableRestClient restClient) {
 
         super(id, filtered, searchCond, callerRef, restClient);
+
+        this.schemaNames = schemaRestClient.getSchemaNames(AttributableType.USER);
+        this.dSchemaNames = schemaRestClient.getDerivedSchemaNames(AttributableType.USER);
+        this.vSchemaNames = schemaRestClient.getVirtualSchemaNames(AttributableType.USER);
+
+        initResultTable();
     }
 
     @Override
@@ -85,15 +104,21 @@ public class UserSearchResultPanel exten
         }
 
         for (String name : prefMan.getList(getRequest(), Constants.PREF_USERS_ATTRIBUTES_VIEW))
{
-            columns.add(new AttrColumn(name, SchemaType.NORMAL));
+            if (schemaNames.contains(name)) {
+                columns.add(new AttrColumn(name, SchemaType.NORMAL));
+            }
         }
 
         for (String name : prefMan.getList(getRequest(), Constants.PREF_USERS_DERIVED_ATTRIBUTES_VIEW))
{
-            columns.add(new AttrColumn(name, SchemaType.DERIVED));
+            if (dSchemaNames.contains(name)) {
+                columns.add(new AttrColumn(name, SchemaType.DERIVED));
+            }
         }
 
         for (String name : prefMan.getList(getRequest(), Constants.PREF_USERS_VIRTUAL_ATTRIBUTES_VIEW))
{
-            columns.add(new AttrColumn(name, SchemaType.VIRTUAL));
+            if (vSchemaNames.contains(name)) {
+                columns.add(new AttrColumn(name, SchemaType.VIRTUAL));
+            }
         }
 
         // Add defaults in case of no selection
@@ -206,7 +231,8 @@ public class UserSearchResultPanel exten
 
                             @Override
                             public Page createPage() {
-                                return new DisplayAttributesModalPage(page.getPageReference(),
displaymodal);
+                                return new DisplayAttributesModalPage(page.getPageReference(),
displaymodal,
+                                        schemaNames, dSchemaNames, vSchemaNames);
                             }
                         });
 

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/SchemaRestClient.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/SchemaRestClient.java?rev=1459775&r1=1459774&r2=1459775&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/SchemaRestClient.java
(original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/SchemaRestClient.java
Fri Mar 22 13:55:04 2013
@@ -120,7 +120,6 @@ public class SchemaRestClient extends Ba
      * @return List of derived schema names.
      */
     public List<String> getDerivedSchemaNames(final AttributableType type) {
-
         final List<String> userDerivedSchemasNames = new ArrayList<String>();
 
         try {
@@ -145,7 +144,6 @@ public class SchemaRestClient extends Ba
      */
     @SuppressWarnings("unchecked")
     public List<VirtualSchemaTO> getVirtualSchemas(final AttributableType type) {
-
         List<VirtualSchemaTO> userVirtualSchemas = null;
 
         try {

Modified: syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/AbstractSearchResultPanel.html
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/AbstractSearchResultPanel.html?rev=1459775&r1=1459774&r2=1459775&view=diff
==============================================================================
--- syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/AbstractSearchResultPanel.html
(original)
+++ syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/AbstractSearchResultPanel.html
Fri Mar 22 13:55:04 2013
@@ -16,7 +16,7 @@ KIND, either express or implied.  See th
 specific language governing permissions and limitations
 under the License.
 -->
-<html>
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
   <wicket:panel>
 
     <div wicket:id="container">



Mime
View raw message