[ 
https://issues.apache.org/jira/browse/SYNCOPE-332?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13592131#comment-13592131
 ] 

Colm O hEigeartaigh commented on SYNCOPE-332:
---------------------------------------------


I don't think User list sorting will work for Virtual attributes either looking 
at the code. The problem is that the selected property name available via 
SortableDataProvider.getSort().getProperty() just returns the attribute name, 
and not whether it is a (derived|virtual) attribute. The 
SortableAttributableProviderComparator then calls:

super.compare(new AttrModel(o1.getAttributeMap()), new 
AttrModel(o2.getAttributeMap()));

As the selected attribute name is not in getAttributeMap(), but in 
getDerivedAttributeMap(), a NPE results. Two possible solutions:

a) Record that the selected Attribute is derived or virtual when selected. Not 
too sure how to do this as there is only a getProperty() method available.
b) Check to see if the selected property name is in the attributes map in 
SortableAttributableProviderComparator. If not then check derived, then 
virtual, etc.

                
> User List sorting via Derived attributes column doesn't work
> ------------------------------------------------------------
>
>                 Key: SYNCOPE-332
>                 URL: https://issues.apache.org/jira/browse/SYNCOPE-332
>             Project: Syncope
>          Issue Type: Bug
>          Components: console
>    Affects Versions: 1.0.5, 1.0.6, 1.1.0
>         Environment: OpenJDK JRE (IcedTea7 2.3.7);
> Tomcat7;
> Ubuntu Server 12.04
>            Reporter: Edward Siewick
>            Priority: Trivial
>              Labels: attributes, derived, list, sorting, user
>             Fix For: 1.0.7, 1.1.0
>
>
> User List sorting works for "Attributes" but not "Derived attributes." These 
> column headers can be selected; the presented URL is of the form similar to 
> the "Attributes" columns. However, the refreshed page isn't sorted. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to