Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » JFace Data Binding and SWT.Modify
JFace Data Binding and SWT.Modify [message #1368598] Tue, 20 May 2014 07:33
Alfred Hiebl is currently offline Alfred HieblFriend
Messages: 3
Registered: February 2013
Junior Member

we use JFace Data Binding in RAP our application. The target observable value is created with a FocusOut event:

     SWTObservables.observeText(myTextControl, SWT.FocusOut);

The expectation was that once the user has entered the field and tabs out to the next field, it is actually bound to the model.

I realized during testing, though, that with every keystroke in the text field the browser makes a request with a Modify Event. The reason seems to be that org.eclipse.jface.internal.databinding.swt.TextTextProperty internally registers a second (SWT.Modify) listner for its staleEvents, see:

     private static int[] staleEvents(int[] changeEvents) {
          if (changeEvents != null)
               for (int i = 0; i < changeEvents.length; i++)
                    if (changeEvents[i] == SWT.Modify)
                         return null;
               return new int[] { SWT.Modify };

Is there a way to avoid this behaviour and strictly validate and convert on FocusOut events?

I appreciate any feedback.


Previous Topic:Webcontainer thread pool and SefverPush requests
Next Topic:Massive problems with RAP 2.3 M3
Goto Forum:

Current Time: Sat Jun 06 06:06:43 GMT 2020

Powered by FUDForum. Page generated in 0.01278 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top