I am working with AutoTest.js to build a custom add-in for QTP. The app I need to automate is using SmartGWT 2.5.
I have a need to add a handler for the "changed" event of a SelectItem control. I am able to get a reference to the SelectItem and manipulate it. But I have been unable to get correct syntax to add the handler for the "changed" event.
I have tried various versions of code but am not able to get it to fire.
The code snippet that I thought would work is shown below:
thisItem.addChangedHandler(new ChangedHandler() {
public OnChanged(event) {
var thisValue = event.getValue();
//...code to work w/ Value goes here...
return true;
}
});
My end goal is to run some code when SelectItem value has changed. addChangedHandler seems ideal for this but I'm open to other approaches.
Any help to point out my error or direct me to the correct working example is appreciated.
I have a need to add a handler for the "changed" event of a SelectItem control. I am able to get a reference to the SelectItem and manipulate it. But I have been unable to get correct syntax to add the handler for the "changed" event.
I have tried various versions of code but am not able to get it to fire.
The code snippet that I thought would work is shown below:
thisItem.addChangedHandler(new ChangedHandler() {
public OnChanged(event) {
var thisValue = event.getValue();
//...code to work w/ Value goes here...
return true;
}
});
My end goal is to run some code when SelectItem value has changed. addChangedHandler seems ideal for this but I'm open to other approaches.
Any help to point out my error or direct me to the correct working example is appreciated.
Comment