comboBox.setValue and ActionEvent cycle

Alex Sviridov ooo_saturn7 at mail.ru
Wed Jul 1 05:37:41 UTC 2015


I have combobox with page numbers (1,2,3,etc). When user select the certain page (by mouse or by keyboard(as combobox editable)) 
I  want to show and total pages. That's why on combobox action I do:
@FXMLprivatevoid onPageComboBoxAction(ActionEvent event){
        ....
       combobox.setValue(currentPage+"/"+totalPages)

} However this code ( combobox . setValue ) fires one more ActionEvent and code cycles. I tried to use swithers like boolean ignoreActionEvent but it didn't work as it seems event is handled in different thread.

How to solve such problem? 

P.S. I understand that this problem is for user mailing list but I ask at stackoverflow and get no answer.


More information about the openjfx-dev mailing list