To Google Team: Re: Celltable rows selection with focus

507 views
Skip to first unread message

Deepak Singh

unread,
Feb 7, 2011, 4:24:55 PM2/7/11
to google-we...@googlegroups.com
Hello Team@google,

I could not find any solution to implement this feature but i need this anyhow.
Can you guys give some solution to this. I am using GWT 2.1.1.

Hope the google team finds out some way out.

Thanks
Deepak

On Tue, Feb 1, 2011 at 12:39 AM, Zak <zak...@gmail.com> wrote:
These docs should help you:

http://code.google.com/webtoolkit/doc/latest/DevGuideUiCellWidgets.html#selection

On Jan 31, 11:42 am, Deepak Singh <deepaksingh...@gmail.com> wrote:
>  Any suggestion pls...
>
> On Sun, Jan 30, 2011 at 4:00 PM, Deepak Singh <deepaksingh...@gmail.com>wrote:
>
> > Hi,
>
> > I am using GWT 2.1.1 and have one celltable working fine.
> > I want to provide better user experience so i need to implement the
> > following feature,
>
> > I want the rows to be selected with focus and then get the selected object
> > for further action.
> > when the table is created and appeared first time, the focus should
> > automatically go to first row and the row should automatically be selected
> > and as focus moves through rows by using arrow keys, corresponding rows
> > should be selected and i should be able to get the selected object with
> > focus moving on.
>
> > I tried to add FocusHandler to celltable but could not find any suitable
> > API for this.
>
> > Suggest some ways to acheive this.
>
> > Thanks

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


John LaBanca

unread,
Feb 7, 2011, 5:13:13 PM2/7/11
to google-we...@googlegroups.com
I created an issue to track this:
http://code.google.com/p/google-web-toolkit/issues/detail?id=5990

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

zixzigma

unread,
Feb 7, 2011, 5:50:35 PM2/7/11
to google-we...@googlegroups.com
don't you think this can be achieved by using selectionModel.setSelection  and selecting the first item from the current range ?

John LaBanca

unread,
Feb 7, 2011, 6:46:17 PM2/7/11
to google-we...@googlegroups.com
I think deepak wants to set native focus on the table so the user can use keyboard navigation without having to click on a cell first.

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


On Mon, Feb 7, 2011 at 5:50 PM, zixzigma <zixz...@gmail.com> wrote:
don't you think this can be achieved by using selectionModel.setSelection  and selecting the first item from the current range ?

--

Deepak Singh

unread,
Feb 8, 2011, 1:44:23 PM2/8/11
to google-we...@googlegroups.com
Hi John,

Exactly i want what you said. To be more clear, i explain it with example.

Say we have,

 CellTable<ObjectABC> table = new CellTable<ObjectABC>();
table.setSelectionModel(....);

I should be able to call the following line when the table gets focus  

table.getSelectionModel().setSelected(tableList.get('Row id of the table where the focus is currently active now'), true);

and as the focus moves from one row to another through navigation keys, it should be able to call the above line with corresponding Row id.
Then, In the selection model, i should be able to get the selected object corresponding to the row id where the focus is currently active.

public void onSelectionChange(SelectionChangeEvent event) {
ObjectABC selectedObject = selectionModel.getSelectedObject();
                                  // Further action with selectedObject
}
So Concluding is that i should be able to get the object of the row with respect to the focus.

I hope it is now very clear.

Thanks
Deepak

Deepak Singh

unread,
Feb 8, 2011, 1:46:24 PM2/8/11
to google-we...@googlegroups.com
Hi Zix,
Could you pls explain a bit more.

Thanks
Deepak

On Tue, Feb 8, 2011 at 4:20 AM, zixzigma <zixz...@gmail.com> wrote:
don't you think this can be achieved by using selectionModel.setSelection  and selecting the first item from the current range ?

--
Reply all
Reply to author
Forward
0 new messages