Re: CellList row data - possible bug?

2010-11-02 Thread John LaBanca
I think we should add CellList#setRowData(List value) that does not take a
start index.  Using that method would assume that the List of values was the
complete list and would set the row count to the list size.

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


On Mon, Nov 1, 2010 at 5:44 PM, Rafi  wrote:

> Thank you Chris and John. Yes, that was somewhat counterintuitive ;),
> but now I get the idea.
>
> Best regards!
>
> On 28 Paź, 15:46, Chris Conroy  wrote:
> > setRowData deals with the visible display of data. What you really want
> to
> > do in this case is use a ListDataProvider. You can call setList on your
> > ListDataProvider and it will handle the updating for you. Somewhat
> > counter-intuitively, you add the display to the list provider--not the
> other
> > way around.
> >
> > So...
> >
> > ListDataProvder provider = new ListDataProvider();
> > provider.addDataDisplay(myCellList);
> > provider.setList(list_with_5_elements);
> > 
> > provider.setList(list_with_2_elements);
> >
> >
> >
> >
> >
> >
> >
> > On Thu, Oct 28, 2010 at 6:07 AM, Rafi  wrote:
> > > Hi!
> >
> > > Either I do not get the idea or there is a little bug in CellList.
> >
> > > Calling:
> > > setRowData(0, list_with_5_elements);
> >
> > > Will show cell list with 5 elements.
> >
> > > Then calling on the same CellList:
> > > setRowData(0, list_with_2_elements);
> >
> > > Will show cell list containing 5(!) elements. First two items will be
> > > new one, other 3 items will be from old list. And I do not see any
> > > method to clear existing list. Setting an empty list as rowData of
> > > course does not do anything.
> >
> > > Anyone knows is it designed behaviour or bug?
> >
> > > Best regards,
> > > Rafal
> >
> > > --
> > > 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-tool...@googlegroups.com.
> > > To unsubscribe from this group, send email to
> > > google-web-toolkit+unsubscr...@googlegroups.com cr...@googlegroups.com>
> > > .
> > > For more options, visit this group at
> > >http://groups.google.com/group/google-web-toolkit?hl=en.
>
> --
> 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-tool...@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.
>
>

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



Re: CellList row data - possible bug?

2010-11-01 Thread Rafi
Thank you Chris and John. Yes, that was somewhat counterintuitive ;),
but now I get the idea.

Best regards!

On 28 Paź, 15:46, Chris Conroy  wrote:
> setRowData deals with the visible display of data. What you really want to
> do in this case is use a ListDataProvider. You can call setList on your
> ListDataProvider and it will handle the updating for you. Somewhat
> counter-intuitively, you add the display to the list provider--not the other
> way around.
>
> So...
>
> ListDataProvder provider = new ListDataProvider();
> provider.addDataDisplay(myCellList);
> provider.setList(list_with_5_elements);
> 
> provider.setList(list_with_2_elements);
>
>
>
>
>
>
>
> On Thu, Oct 28, 2010 at 6:07 AM, Rafi  wrote:
> > Hi!
>
> > Either I do not get the idea or there is a little bug in CellList.
>
> > Calling:
> > setRowData(0, list_with_5_elements);
>
> > Will show cell list with 5 elements.
>
> > Then calling on the same CellList:
> > setRowData(0, list_with_2_elements);
>
> > Will show cell list containing 5(!) elements. First two items will be
> > new one, other 3 items will be from old list. And I do not see any
> > method to clear existing list. Setting an empty list as rowData of
> > course does not do anything.
>
> > Anyone knows is it designed behaviour or bug?
>
> > Best regards,
> > Rafal
>
> > --
> > 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-tool...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-web-toolkit+unsubscr...@googlegroups.com > cr...@googlegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/google-web-toolkit?hl=en.

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



Re: CellList row data - possible bug?

2010-10-28 Thread John LaBanca
setRowData(0, list_with_2_elements) "replaces" elements 0 and 1.  Its
designed this way so you can do incremental loading, or push updates of
specific rows.  If you want to hide the last three elements, you have to set
the row count:
CellList#setRowCount(2, true);

Adding more data to the CellList automatically increases the row count.

As Chris mentioned, using a ListDataProvider is an even better option.  Any
modifications you make to the underlying java.util.List (via
ListDataProvider#getList()) will be reflected in the table.

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


On Thu, Oct 28, 2010 at 6:07 AM, Rafi  wrote:

> Hi!
>
> Either I do not get the idea or there is a little bug in CellList.
>
> Calling:
> setRowData(0, list_with_5_elements);
>
> Will show cell list with 5 elements.
>
> Then calling on the same CellList:
> setRowData(0, list_with_2_elements);
>
> Will show cell list containing 5(!) elements. First two items will be
> new one, other 3 items will be from old list. And I do not see any
> method to clear existing list. Setting an empty list as rowData of
> course does not do anything.
>
> Anyone knows is it designed behaviour or bug?
>
> Best regards,
> Rafal
>
> --
> 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-tool...@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.
>
>

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



Re: CellList row data - possible bug?

2010-10-28 Thread Chris Conroy
setRowData deals with the visible display of data. What you really want to
do in this case is use a ListDataProvider. You can call setList on your
ListDataProvider and it will handle the updating for you. Somewhat
counter-intuitively, you add the display to the list provider--not the other
way around.

So...

ListDataProvder provider = new ListDataProvider();
provider.addDataDisplay(myCellList);
provider.setList(list_with_5_elements);

provider.setList(list_with_2_elements);


On Thu, Oct 28, 2010 at 6:07 AM, Rafi  wrote:

> Hi!
>
> Either I do not get the idea or there is a little bug in CellList.
>
> Calling:
> setRowData(0, list_with_5_elements);
>
> Will show cell list with 5 elements.
>
> Then calling on the same CellList:
> setRowData(0, list_with_2_elements);
>
> Will show cell list containing 5(!) elements. First two items will be
> new one, other 3 items will be from old list. And I do not see any
> method to clear existing list. Setting an empty list as rowData of
> course does not do anything.
>
> Anyone knows is it designed behaviour or bug?
>
> Best regards,
> Rafal
>
> --
> 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-tool...@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.
>
>

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