Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 133978 - [DataBinding] When the default button is clicked via <ENTER>, the current field doesn't get saved
Summary: [DataBinding] When the default button is clicked via <ENTER>, the current fie...
Status: RESOLVED DUPLICATE of bug 133548
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.1   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Dave Orme CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-29 22:34 EST by Dave Orme CLA
Modified: 2006-03-29 22:45 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dave Orme CLA 2006-03-29 22:34:51 EST
From the newsgroup:

Christoph Jaeger wrote:
> Hi,
> 
> I created a simple login dialog, which has a default button called
> login. When I click this button with the mouse, all values (userId and
> password text field) are propagated through the databinding setup.
> However, when I just hit the <ENTER> key to activate the default (login)
> button, the last field I edited (typically the "password" field) is not
> propagated to the property defined.
> 
> As a workaround, I programmatically set the focus to a different field
> to trigger "onFocusLost", and then go on -> works nicely.
> 
> I tried to fill in a bug report, but I first have to register there, and
> wanted to make this known as soon as possible, as it is probably a quick
> fix.

I'm not sure it's a quick fix since I'm not sure what the correct behavior would be.

As you observed, we normally save on focus lost.  Perhaps we should set a filter on the Display that triggers a data binding save whenever any Button gets a Selection event?

Does anyone have any suggestions here?
Comment 1 Dave Orme CLA 2006-03-29 22:45:46 EST

*** This bug has been marked as a duplicate of 133548 ***