Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » scout » Enable validation of keys typed in AbstractStringField(Enable the validation of keys typed in AbstractStringField)
Enable validation of keys typed in AbstractStringField [message #631717] Fri, 08 October 2010 14:21 Go to next message
Jens Holzhaus is currently offline Jens Holzhaus
Messages: 1
Registered: July 2009
Junior Member
SwtScoutStringField should propagate every SWT-Event of event type SWT.KeyUp to the setTextFromUI(String) method of P_UIFacade of the AbstractStringField (analogous for KeyEvents in Swing). That would enable a programmer to validate text input on every key typed, for example by overriding the execIsEmpty() method of AbstractValueField. Currently only a validation after a traversal is possible, which is sometimes not so convenient for the user.
Re: Enable validation of keys typed in AbstractStringField [message #631912 is a reply to message #631717] Sun, 10 October 2010 13:49 Go to previous messageGo to next message
Claudio Guglielmo is currently offline Claudio Guglielmo
Messages: 127
Registered: March 2010
Senior Member
Hi Jens

You are right, a validation on every key typed would be helpful in some circumstances. Fortunately it is already possible. Smile

You only have to enable it by setting the property validateOnAnyKey on your string field to true.

@Override
protected boolean getConfiguredValidateOnAnyKey(){
  return true;
}


This will execute execValidate on every key typed.

Regards
Claudio
Re: Enable validation of keys typed in AbstractStringField [message #676561 is a reply to message #631912] Sun, 05 June 2011 09:25 Go to previous message
Jeremie Bresson is currently offline Jeremie Bresson
Messages: 118
Registered: November 2010
Senior Member
I just mentioned it on the wiki: StringField page

[Updated on: Sun, 05 June 2011 09:26]

Report message to a moderator

Previous Topic:Access a Scout Service from another servlet
Next Topic:WebStart with Scout
Goto Forum:
  


Current Time: Fri Oct 31 07:18:05 GMT 2014

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

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