ClickableTextCell + CellList

36 views
Skip to first unread message

Jaroslav Z?ruba

unread,
Dec 14, 2010, 6:15:14 PM12/14/10
to google-we...@googlegroups.com
Hello

I need to create a simple list just for picking an item: the list pops up, user clicks one item, list disappears, item id gets sent somewhere...
I assume ClickableTextCell is the "official" way to do this, but I was able to find only an example used together with CellTable. (CwCellSampler.java) CellList feels like more suitable for that. Is there any example where ClickableTextCell is used within a CellList please?

Regards
  J. Záruba

John LaBanca

unread,
Dec 14, 2010, 9:31:10 PM12/14/10
to google-we...@googlegroups.com
Actually, you probably want to use a plain TextCell in a CellList and attach a SelectionModel instead.  The SelectionModel will fire a SelectionChangeEvent when the user selects an item.  You can use NoSelectionModel if you want to catch the event without actually selecting anything.

see CellList#setSelectionModel.  

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.

Jaroslav Záruba

unread,
Dec 15, 2010, 3:29:08 AM12/15/10
to google-we...@googlegroups.com
On Wed, Dec 15, 2010 at 3:31 AM, John LaBanca <jlab...@google.com> wrote:
Actually, you probably want to use a plain TextCell in a CellList and attach a SelectionModel instead.  The SelectionModel will fire a SelectionChangeEvent when the user selects an item.  
 
You can use NoSelectionModel if you want to catch the event without actually selecting anything.

That sounds like exactly what I need :)
thank you, John!
Reply all
Reply to author
Forward
0 new messages