pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Todd Volkert <tvolk...@gmail.com>
Subject Re: Pivot vs. ExtJS
Date Sat, 20 Feb 2010 03:00:12 GMT
Hi Scott,

Good feedback and very good questions -- I've answered inline, though others
can elaborate if I missed anything.

1.  Closeable tabs.  It seems there is a property for this, but setting it
> has no effect.  My guess is that this is intended to be implemented soon,
> and some of the groundwork has been laid, but it isn't done yet.  Or I'm
> missing something entirely and there just some other property I need to set
> and it'll start working.  I coded my own "close" button, but I placed it
> within the tab body because I'm not quite sure how to place the close button
> on the tab itself where it makes most sense.

You're not missing anything -- this just hasn't been implemented yet :).
The feature is being tracked by

> 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), 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.  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.

Row expanders aren't intrinsically supported in TableView because the rows
are just data (they're not nested components).  You could hack this together
by registering a mouse button listener on the table view, determine which
row and column was clicked on, then setting some property on the row item
such that the row renderer would pick it up and render a taller row.  You'd
need to set the "variableRowHeight" style as well in order for this to work.

As for the filtering columns, the best data model for this might be to use a
FilteredList (in the collections package) as your table data -- the filtered
list would wrap your primary data model.

> 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.

It sounds like what you need is a custom renderer for your ListButton that
is capable of rendering your hashmaps by displaying the product name.  In my
Pivot apps, I've written a custom "MapRenderer" that takes a JSON path
property and renders maps by getting the value associated with that key.
The list button's "data renderer" will render the selected item when the
dropdown is collapsed, and the "item renderer" will render each item in the
dropdown when it's expanded.

> 4.   I have a weird issue with rendering tree views.  I placed a tree view
> in the left pane of a split pane.  When I resize the tree view's split pane
> down to the point that the tree view is almost not visible (perhaps the icon
> but not the text), the tree view starts throwing exceptions:

Looks like you've found a bug in TerraTreeViewSkin.  Can you please file a
ticket in JIRA (http://issues.apache.org/jira/browse/PIVOT) so we don't
forget about it for the next maintenance release?


View raw message