We are thinking of using WiseJ for an app that gets a text field stuffed by stuffing the keyboard. This is done by a barcode scanner that simply puts the value into the keyboard buffer which stuffs the textbox.
We would like to fire an event when the textbox has our end of string character (in this case a “@”).
Is that possible?
Thanks,
Shawn
I think we have created an example that does exactly what you need. Try the example here:
It shows two ways: event and callback. You can pick either one. The control has a new property that accepts a regular expression and fires a “match” event when matched. You may want to tweak the javascript code: now it checks on focus in but you can instead listen to “changeValue” like this in construct():
this.getChildControl(“textfield”).addListener(“changeValue”, this._onChangeValue, this);
or on keypress
this.getChildControl(“textfield”).addListener(“keypress”, this._onKeyPress, this);
or try
this.addListener(“keypress”, this._onKeyPress, this);
since keypress bubbles up.
Please login first to submit.