Hey Scott,
> 2. Table Views (ExtJS calls them grids). Has anyone tried to implement the
> following with Table Views in Pivot: Row expanders (ability to expand a row
> to show more information about a record, for example, a product description
> in a textarea underneath the row),
I haven't tried this so there may be some issues, but you might be able to use
multiple table views, each contained in a Rollup, to get this behavior.
TableView's "columnSource" property allows you to link a collection of table
views to a primary table view that defines the columns.
> column filtering (basically turn each the column header into drop down menu
> that allows you to enter a filter by string, which then limits the results to
> only the rows that contain the entered value in the selected column.
I am doing exactly this in an application I'm working on right now. You can
register a mouse listener on the table view header, then use the mouse
coordinates to get the index of the selected header. You can then call
getHeaderBounds(index) to get the header bounds and align your popup to it.
> My guess is that this is best done by removing rows (Objects) from the
> underlying List, but you'd first need to make an unfiltered "copy" of it so
> that if the filter was cleared, you could redisplay all the rows without
> having to re-query the application server.
As Todd suggested, the best approach would probably be to use a FilteredList.
However, you might also simply resubmit your query to the server (this is what
I am doing in my app).
> 3. Assigning values and display text to drop lists and radio buttons. Let's
> say I create a ButtonList. I then create a GetQuery to retrieve some JSON
> from my application server, which is automatically placed into an ArrayList
> of HashMaps by the JSON serializer.
> So, let's assume that I'm querying a product database, and I'm getting back
> an array of hashmaps that look like {productID:33443435, productName:'Widget
> Number 1', productDescription:'Blah blah blah'}, how do I put this into my
> ButtonList so that the user sees the product name in the drop list, but when
> it is serialized and sent back to the server, the id is what is actually
> sent? When I simply setListData(myArrayofHashMaps), the drop list actually
> displays the results of the toString() method of each hash map, which is not
> what is desired. It almost seems like the ButtonList.setListData() method
> will only accept a one dimensional array of strings.
Again, as Todd suggested, a custom renderer is probably what you want here. I
am doing the same thing in my current app. For ListButton, you'll probably need
two custom renderers: one for the selected button data and another for the list
items. Simplest thing to do is extend the default renderers (in
org.apache.pivot.wtk.content), use JSONSerializer to extract the value you
need, then pass it to the base render() method.
Greg