Hi Jeff,

I ended up writing my own version of CheckboxCell (rather, taking the
code for it, and making my own class with modifications).

First change: I added a boolean field "disabled", and a setEnabled
call.
Second change: I redid render so it has 4 options (checked | unchecked
x enabled | disabled)
Third change: removed all the code for keeping track of its value,
since my getValue and FieldUpdater take care of that.

Result, a disable able CheckboxCell that behaves the way I expect it
to.

(The purpose of the graphic was to show how hiding col 2, the checkbox
column, moves col 3, a non-checkbox column, since you didn't seem to
understand why I consider the show / hide to be a bad thing.)

Greg

On Feb 1, 2:59 pm, Jeff Schwartz <jefftschwa...@gmail.com> wrote:
> On Tue, Feb 1, 2011 at 3:38 PM, Greg Dougherty
> <dougherty.greg...@mayo.edu>wrote:
>
> > Jeff:
>
> > Column 1 : Column 2 ; Column 3
> > Column 1 :Column 3
> > Column 1 : Column 2 ; Column 3
>
> > I thought you said column, Geg, not an individual row's cells and naturally
>
> I took that then to mean all check boxes within a column. Is that what you
> said or do I have a pencil sticking out of my head :)?
>
> In any case it's now obvious what your intention is so here's one way to do
> this but it is by no means the only way:
>
> Iterate row by row through your cell table and for each row iterate through
> each of its cells. If a cell contains a checkbox that needs to be disabled
> then get the cell's inner html which will be a checkbox. Once you have the
> checkbox just set it's enabled property to false or better yet hide the
> checkbox by setting its display attribute to none.
>
> There are numerous GWT methods that can assist you in iterating over the DOM
> and in particular a table. For instance, I use TableElement often,
> especially TableElement.as which assert that the given Element is compatible
> with a TableElement and automatically typecast it. Once I have a valid
> TableElement reference I can then get a reference to its rows by calling its
> getRows method - just remember to compensate for any table header rows you
> may have. Once you have a NodeList<TableRowElement> use its TableRowElements
> to obtain the cells by calling it getCells method. Once you have the cells
> you can then iterate over each one and do with them as you like.
>
> Jeff
>
> Jeff

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