wood burning stoves*
The moose likes JavaFX and the fly likes Removing selected row in TableView Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JavaFX
Bookmark "Removing selected row in TableView" Watch "Removing selected row in TableView" New topic
Author

Removing selected row in TableView

Jc Frane
Ranch Hand

Joined: Aug 15, 2013
Posts: 32
Hi I am a beginner in javafx.

So, my situation is like this:

I have my TableView with a CheckBox in one of its TableColumn and I named it productStatus which determine whether the product is already claimed if the checkbox is checked.
What I wanted is to remove the selected row everytime the checkbox is checked. I used ObservableList in populating the table.

I have a model class named Orders and some private properties including the BooleanProperty for productStatus. Then I add a listener to this property. However all I can do to it is to print whether the checkbox is selected and deselected. I ran in many problems everytime I try to retrieve the selected item in my observablelist and delete it.

Can somebody help me?

Thank you so much! Cheers!
Ranganathan Kaliyur Mannar
Bartender

Joined: Oct 16, 2003
Posts: 1076
    
  10

You have mentioned that you ran into many problems - what are those? exceptions? Can you tell us more about that?

Also, a SSCCE would be useful...


Ranga.
SCJP 1.4, OCMJEA/SCEA 5.0.
 
jQuery in Action, 2nd edition
 
subject: Removing selected row in TableView
 
Similar Threads
help on event listener
Error in action class
SWT Print selective components
To show an UITableView on an UIView
TableViewer Refresh not preserving selection