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

jerome cambon jerome.cambon at oracle.com
Thu May 24 00:23:31 PDT 2012


+1
And it will simplify our code for Scene Builder

Jerome


On 5/23/2012 11:54 PM, Jonathan Giles wrote:
> 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