Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Dynamic enable/disable of table row fields

JGagnonSep 26 2013 — edited Sep 26 2013

I have a situation where I have a TableView where each row contains the following columns:

  • Select - a checkbox that will be used to indicate that the row checked will be included in a particular list of items.  Those rows with this field unchecked will not be included.
  • Name - a text value indicating the name or description of the item in that row.  This is not editable.
  • Allow - a checkbox that provides overall granting/denying of access.
  • 4 checkbox columns representing create, read, update, delete (CRUD) privilege.

I need the following behavior based upon the "checked" state of the various checkboxes:

  • If the "select" checkbox is not checked, all other checkbox columns on that row should be disabled in some way.  The user should not be able to check or uncheck any of them.  If this field is checked, the "allow" checkbox will be enabled.
  • If the "allow" checkbox is checked, the 4 CRUD checkboxes will be enabled, otherwise they will be disabled.

I'm trying to figure out how to go about making this happen.  I suspect that I will either need to make some sort of customized TableCell or some other technique.  I would appreciate any ideas that may help solve this.

This post has been answered by James_D on Sep 26 2013
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 24 2013
Added on Sep 26 2013
3 comments
1,535 views