The list of styles can't be sorted, it's a ModificationProxy$list
-----------------------------------------------------------------
Key: GEOS-3146
URL: http://jira.codehaus.org/browse/GEOS-3146
Project: GeoServer
Issue Type: Bug
Components: Wicket UI
Affects Versions: 2.0-beta1
Reporter: Gabriel Roldán
Assignee: Justin Deoliveira
Fix For: 2.0-beta2
try to sort the list of styles, GeoServerDataProvider.iterator() will complain at line 145 {{Collections.sort(items, comparator);}} because {{items}} is a {{ModificationProxy$list}} and does not support the {{List.set}} method:
{panel}
aused by: java.lang.UnsupportedOperationException
at java.util.AbstractList.set(AbstractList.java:115)
at java.util.AbstractList$ListItr.set(AbstractList.java:412)
at java.util.Collections.sort(Collections.java:163)
at org.geoserver.web.wicket.GeoServerDataProvider.iterator(GeoServerDataProvider.java:145)
at org.apache.wicket.markup.repeater.data.DataViewBase$ModelIterator.<init>(DataViewBase.java:103)
...
{panel}
The easiest would be to change {{StyleProvider.getItems()}} to return {{new ArrayList(getCatalog().getStyles())}} instead of plain {{getCatalog().getStyles()}}, but am not completely sure that'd be the way to go.
Justin?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira