[REVIEW REQUEST] Committing ComboBox text input to the value property on focus loss

Jonathan Giles jonathan.giles at oracle.com
Wed May 23 14:54:51 PDT 2012


Hi all,

The jira issue for the runtime bug is here: 
http://javafx-jira.kenai.com/browse/RT-21454
The jira issue for Scene Builder is here: 
http://javafx-jira.kenai.com/browse/DTL-4415

I'm hoping to make a slight behavioural change to ComboBox in 2.2 so 
that it acts in a more useful manner. Currently, in an editable 
ComboBox, the value property is only set when the user presses Enter. 
What RT-21454 asks for is that the value property also be updated when 
focus is lost.

If we don't make this change, the form developer has to consider either 
forcing an event to commit the value, or getting the ComboBox editor 
(which is new API in 2.2), and retrieve the text out of there. Of 
course, this will burn every developer until they test their form and 
realise the value property is not set.

Therefore, I would like to make a small change to ComboBox such that 
whatever the user has typed when focus is lost becomes the new ComboBox 
value (assuming it is legal input to the StringConverter). There is a 
patch attached to the runtime jira above which makes this change, but 
does not change any API: this is purely a behavioural change to make 
ComboBox more useful.

Thanks,
Jonathan


More information about the openjfx-dev mailing list