The scenario: I want to present a user with names of polygons from a layer in GeoServer. I then display the polygon(s) whose name(s) the user selected.
What I've done: I have a search box, which allows a user to enter name of a polygon they'd like to see. This works perfectly fine, even for wildcards. I've implemented it using CQL filters.
What I want: Instead of a user entering a name of a polygon, I want to pull all the polygon names and display them to the user for selection. After some research, I found out that my best bet is to use GeoServer's WPS aggregation function
gs:Aggregate. I've been looking for examples on how to use this, but no success so far. Can anyone who's had this experience point me in the right direction. I'll also be grateful for any alternative approaches.
My environment: GeoServer 2.1.3, PostGIS 1.5, OpenLayers 2.11.