Friday, April 27, 2012

Re: Please help with CellTable

Also part of 4 is SingleSelectionModel. So you can either use Single
or Multiple as the SelectionModel depending on what you need.

Regards,

Alfredo

On Fri, Apr 27, 2012 at 9:36 PM, Alfredo Quiroga-Villamil
<lawwton@gmail.com> wrote:
> Hi Blake:
>
> I will try to take a look later at 1 and 2, they are CSS controlled.
>
> For now:
>
> 4. See below for an example:
>
>        MultiSelectionModel<String> multiSelectionModel = new
> MultiSelectionModel<String>();
>        CellTable<String> cellTable = new CellTable<String>();
>        cellTable.setSelectionModel(multiSelectionModel);
>
> 3. Handler for the selection model below:
>
>        // Handler
>        cellTable.getSelectionModel().addSelectionChangeHandler(new
> SelectionChangeEvent.Handler() {
>            @Override
>            public void onSelectionChange(SelectionChangeEvent event) {
>                Set<String> selected = ((MultiSelectionModel<String>)
> cellTable.getSelectionModel()).getSelectedSet();
>                if (selected != null) {
>
>                }
>
>            }
>        });
>
> Hope it helps.
>
> Regards,
>
> Alfredo
>
> On Fri, Apr 27, 2012 at 5:27 PM, Blake McBride <blake1024@gmail.com> wrote:
>> Greetings,
>>
>> I need a sort of listbox where each row is made up of several columns.  I
>> don't want to edit the data in the listbox.  I just want to select one or
>> more rows, click a button, and be able to know which rows were selected.
>>  Looking around it seems like CellTable is close.  I put it together as
>> described in the various examples.  It works as described but not how I
>> want.  Specifically:
>>
>> 1.  I would rather each row not be shown alternately light blue and white
>> background.  I want the rows all displayed with a white background.
>>
>>
>> 2.  While I can select individual row (they get highlighted in yellow), it
>> also places a border around the column within the selected row.  I am not
>> editing the column within the row.  I just want to select the row, not the
>> column within the row.  How can I configure it to just highlight the
>> selected row and not add any borders?
>>
>>
>> 3.  When a row is selected, how can I tell which one is selected
>> programmatically?
>>
>>
>> 4.  How can I control single / multiple row selection?
>>
>> Thanks for the help!
>>
>> Blake McBride
>>
>> --
>> 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+unsubscribe@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>
>
> --
> Alfredo Quiroga-Villamil
>
> AOL/Yahoo/Gmail/MSN IM:  lawwton



--
Alfredo Quiroga-Villamil

AOL/Yahoo/Gmail/MSN IM:  lawwton

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

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate