You can use one of the concrete implementations of AbstractSelectionModel to
select rows and respond to row selection. CellTables and
AbstractSelectionModel instances work hand-in-hand.

You connect the selection model to the cell table by calling the table's
setSelectionModel method passing an instance of a selection model.

You select rows by calling the selection model's setSelected method passing
an instance of the data object being displayed by the table. The row
displaying that instance of the data object will then be selected

You respond to row selection by adding a SelectionChangeEvent.Handler() to
the selection model by calling the selection model's
addSelectionChangeHandler method. You can use this event, for instance, to
load a detailed view of the selected data object such as more information,
data from its children data objects, etc. etc.

Jeff




On Fri, Jan 28, 2011 at 10:49 AM, Greg Dougherty <dougherty.greg...@mayo.edu
> wrote:

> I am trying to use three CellTables to make a Users and Groups panel
> in my current application.  Its purpose is so users can give other
> users access to resources that they control (in this particular case,
> choosing which people can see the information you've uploaded to a
> database).
>
> The first table is the Groups table.  Groups can be added and
> selected.  If you are the owner of the current Group then you can
> modify its settings, if not, you can't.
>
> The second table is Users.  It has two columns, a text field with the
> name of the user, and a checkbox reporting whether or not the user is
> a member of the selected group.
>
> The third table is Resources.  It lists the information available to
> members of the current group, and any information you control that is
> not available to the current group (so you can give access to that
> information to the members of the group).  It also has two fields, the
> name of the resource, and a checkbox.
>
> Issues I'm trying to solve:
> 1: How do I programmatically select a row in a table?  When a user
> creates a new group, I wish to select it.  When the user first brings
> up the panel, I'd like to select the first group (or, maybe, the first
> group the person owns).
>
> 2: How do I disable a checkbox?  If the user doesn't own the group,
> they shouldn't be able to change anything.
>
> 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-web-toolkit@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com<google-web-toolkit%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>


-- 
*Jeff Schwartz*

-- 
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-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to