Hello list, I have a CellDataTable that display some object of my
application; some of that object could be added manually by the user
and other are fetched from the server; the user can delete only the
ones added by hand, for this I have a column on my table that render a
Button, when the user click I need to check if the data row is manual
or not before removing it; there is a way to don't render a cell
depending on a specific value?
This is the current code:

            // table declaration:
            CellTable<MyDataProxy> table;

            // Only manual added rows can be deleted
            Column<CompoundDataProxy, String> deleteColumn = new
Column<MyDataProxy, String>(
                    new ButtonCell()) {
                public String getValue(CompoundDataProxy c) {
                    return "Delete";
                }
            };
            deleteColumn
                    .setFieldUpdater(new FieldUpdater<MyDataProxy, String>() {
                        public void update(int index, MyDataProxy c,
String value) {
                            if (c.isManualAdded())
                                removeDataFromList(c);
                        }
                    });
            table.addColumn(deleteColumn, "");

thanks!
-- 
Luca Morettoni <luca(AT)morettoni.net> | http://www.morettoni.net
gtalk/msn: luca(AT)morettoni.net | http://twitter.com/morettoni
jugUmbria founder: https://jugUmbria.dev.java.net/ | skype: luca.morettoni

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

Reply via email to