Andrej Kopp

Greenhorn
+ Follow
since May 09, 2019
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
9
Given in last 30 days
9
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Andrej Kopp

Thank you very match! Everything worked as it should!
3 weeks ago

Andrej Kopp wrote:

Knute Snortum wrote:Selecting all and deleting from the database should be two different operations. You would click on the header checkbox to select all, then you press a delete button to delete from the database. I don't think you need anything to detect checking the checkbox of an individual Person.  The delete button would have a setOnAction() method where you do the deleting:



When I click on the checkbox, I want to count the number of checkboxes with a value of true.



It looks like something turned out, but I do not understand why, when clicking on the same checkbox, the number of duplicate output duplicates id. And displays 3, 4, 5, 6 copies each. And if after compilation to click on the very first checkbox with a record, then the console will output a double of the first record.
3 weeks ago

Knute Snortum wrote:Selecting all and deleting from the database should be two different operations. You would click on the header checkbox to select all, then you press a delete button to delete from the database. I don't think you need anything to detect checking the checkbox of an individual Person.  The delete button would have a setOnAction() method where you do the deleting:



When I click on the checkbox, I want to count the number of checkboxes with a value of true.

3 weeks ago

Knute Snortum wrote:I would assume just by calling getPersonId()



Thank you. And how to catch the event by clicking on the random checkbox with the output of his ID?

3 weeks ago


With this code all checkboxes began to get out. It remains to figure out how to get a list of ID for removal from the database.
4 weeks ago

Knute Snortum wrote:It looks like the problem is in the Person class.  You need to instantiate the boolean property, and it shouldn't be static.



Thank you. How when you click on the top checkbox, select all the checkboxes from the column?



This code catches the click event of the top column. In addition to selecting all the checkboxes, I need to catch the IP of these records in order to later remove them from the database MariaDB.
4 weeks ago

Knute Snortum wrote:I think all you need to do is remove some code from selectAllBoxes in PersonController:




As practice has shown the problem in this line. What can be done?

1 month ago

Knute Snortum wrote:Why do you have a CellFactory in a different class than the controller?  I don't think you can do that.





The selected checkbox in the TableView column selects all checkboxes when necessary, so that all checkboxes are not selected by clicking on the top checkbox. Please tell me how to fix?

Person


PersonController



FXML:

1 month ago

Knute Snortum wrote:I cloned your github project but a) I can't see that you're handling any checkboxes in PresonController.java and b) I can't get PersonView.fxml to display in my SceneBuilder (version 11.0.0, Ubuntu).



a) I'm new to javaFX, but it seemed right for me to do it in the controller CheckBoxTableCellFactory.

b) The problem is this import.



If you comment this out when using Scene Build, you can open the FXML file.
1 month ago

Knute Snortum wrote:Hi Andrej Kopp, and Welcome to the Ranch!

About your post: don't post to a very old thread with a new problem.  Create a new thread.  I've done that for you this time.



Hi Knute Snortum, thank you!

Knute Snortum wrote:

Andrej Kopp wrote:I can’t figure out how to add this to my FXML file.


If this code is static, then you can edit the FXML file with a text editor or Scenebuilder from Gluon.

If this code in dynamic, then don't worry about adding to the FXML file, just add to the scene graphic you want to change, for instance personOperationsView or rootLayout.

Am I getting what you want to do?



I already use Scene Builder. I want to integrate checkboxes into a tableview. In order to select Select All, all checkboxes from the table were selected as in the screenshot.



My Project on GitHub: https://github.com/SequelONE/UsersApp
1 month ago
Can you please tell me how to adapt this code for TableView JavaFX in FXML? I have placed the function code in Main.



I can’t figure out how to add this to my FXML file.

1 month ago