CellTable, Column, and ActionCell

328 views
Skip to first unread message

GregD

unread,
Nov 17, 2010, 1:49:32 AM11/17/10
to Google Web Toolkit
I have a CellTable that is going to display excerpts from 65,000 rows
at about 130 columns per row. I have a couple of ways to try to make
this manageable for the users. The first is I'm providing them
various filters they can use to cut down on the number of rows. The
second is I'm giving them ToggleButtons with which they can select
which groups of Columns they want to see.

I'd like to add a third way, which is to have some columns that are
buttons, where clicking on the button brings up a dialog box that
displays the relevant data for that row. The ActionCell seems like it
would be prefect for this. Is that correct?

If it is, how do I get a Column with an ActionCell? Do I need to make
a new class that extends Column, or is there a simpler / better way?

TIA,

Greg

John LaBanca

unread,
Nov 17, 2010, 8:14:16 AM11/17/10
to google-we...@googlegroups.com
You can just add an ActionCell to an IdentityColumn.  The following should work:
// Create an ActionCell that shows more info on click.
Delegate<RowObject> handler = new Delegate<RowObject>() {
  public void execute(RowObject object) {
    // Popup DialogBox with additional info for RowObject.
  }
};
ActionCell<RowObject> actionCell = new ActionCell<RowObject>("Click for more info");

// Add the Cell to a Column.
Column<RowObject> column = new IdentityColumn(actionCell);

Thanks,
John LaBanca
jlab...@google.com



--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.


Greg Dougherty

unread,
Nov 17, 2010, 8:59:10 AM11/17/10
to Google Web Toolkit
Hi John,

I'm assuming that actually
ActionCell<RowObject> actionCell = new ActionCell<RowObject>("Click
for more info", handler);

Right?

Thanks!

Greg

On Nov 17, 7:14 am, John LaBanca <jlaba...@google.com> wrote:
> You can just add an ActionCell to an IdentityColumn.  The following should
> work:
> // Create an ActionCell that shows more info on click.
> Delegate<RowObject> handler = new Delegate<RowObject>() {
>   public void execute(RowObject object) {
>     // Popup DialogBox with additional info for RowObject.
>   }};
>
> ActionCell<RowObject> actionCell = new ActionCell<RowObject>("Click for more
> info");
>
> // Add the Cell to a Column.
> Column<RowObject> column = new IdentityColumn(actionCell);
>
> Thanks,
> John LaBanca
> jlaba...@google.com
>
> On Wed, Nov 17, 2010 at 1:49 AM, GregD <gre...@gmail.com> wrote:
> > I have a CellTable that is going to display excerpts from 65,000 rows
> > at about 130 columns per row.  I have a couple of ways to try to make
> > this manageable for the users.  The first is I'm providing them
> > various filters they can use to cut down on the number of rows.  The
> > second is I'm giving them ToggleButtons with which they can select
> > which groups of Columns they want to see.
>
> > I'd like to add a third way, which is to have some columns that are
> > buttons, where clicking on the button brings up a dialog box that
> > displays the relevant data for that row.  The ActionCell seems like it
> > would be prefect for this.  Is that correct?
>
> > If it is, how do I get a Column with an ActionCell?  Do I need to make
> > a new class that extends Column, or is there a simpler / better way?
>
> > TIA,
>
> > Greg
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google Web Toolkit" group.
> > To post to this group, send email to google-we...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-web-tool...@googlegroups.com<google-web-toolkit%2Bunsu...@googlegroups.com>
> > .
Reply all
Reply to author
Forward
0 new messages