Wednesday, October 31, 2018

Re: Dynamic SelectionCell

I misunderstood your question to mean that you just wanted to make data dynamic in your table, which looks like you already are, except for the SelectionCell.

Looks like SelectionCell can only get its list of available options in its constructor, so what I would try is getting the updated list of options from the server (or wherever you get them) before getting the new values to display on the table, replace the SelectionCell with the new values in your table, and then get the values to display on the table immediately after (assuming you get a new list of options for the SelectionCell every time you get a new list of values for the table).


On Wednesday, October 31, 2018 at 3:04:20 AM UTC-6, Ousti Driss wrote:
Can you elaborate ? 
I managed to update all the columns with the response I got from the servlet, except the one with the selection cell,
this is how I instanciate a SelectionCell
Column<Record, String> categoryColumn = new Column<Record, String>(new SelectionCell(list)) {
}
where list is a List<String>,
therefore all my rows have list as value in the categoryColumn ...

On Wednesday, October 31, 2018 at 12:22:43 AM UTC+1, Rogelio Flores wrote:
Of course it is possible, just look at the CellTable in the GWT Showcase:

http://samples.gwtproject.org/samples/Showcase/Showcase.html#!CwCellTable

Instead of a DataProvider as in the example, you probably want an AsyncDataProvider which gets the data from the server through your servlet.


On Monday, October 29, 2018 at 9:38:52 AM UTC-6, Ousti Driss wrote:
Hi everyone!!
I have a cell table which contains three rows.
I added a selection cell column,
the problem is the contents of this columns is static, I need something similar, but instead of being static I can update it with the response I get from my servlet
is such thing possible? 
Thanks !! 

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment