I'm hoping to find some existing code which emulates the "Select by Attributes" dialog in ArcMap, within the ArcGIS Server JavaScript API.
Writing a hard-coded QueryTask is easy - I'm looking for some code which will automatically handle any layer on the map, forming a Query on-the-fly using any attributes, ideally returning the results into a datagrid.
Clever people have written Table of Contents and Identify widgets which handle any layers in the map. Has anyone written something similar for "select by attributes"?