PDA

View Full Version : Itemchanged event in Ext JS



Roger_John
20 Feb 2015, 4:05 AM
My team is migrating an application which is in Powerbuilder to Ext JS 5.1.


In Powerbuilder, there is an event "itemchanged" which will be invoked whenever a field is modified and loses focus.
When we are migrating to Ext JS, we have mapped the functionalities in this event to blur event of the fields.
Blur event gets fired everytime the field loses focus irrespective of whether or not the value in the field was modified.
So, we mapped these functionalities to change event in Ext JS. Now, the issue is change event gets fired as soon as user starts typing
i.e. for each character entered, change event gets fired which again does not work for some scenarios.


Is there any event in Ext JS which can work similar to "itemchanged" event of PowerBuilder ?

Thanks,
Roger

steffenk
22 Feb 2015, 11:36 AM
do it in blur and compare value with the origin value.

Roger_John
22 Feb 2015, 10:31 PM
Hi,

Thanks for your response. If we were to use on blur event, is there any property to obtain the previous value; so that we can check for the change w.r.t to the new value?

Thanks,
Roger

steffenk
23 Feb 2015, 9:20 AM
Hi,

as i wrote, you can use originalValue as value from last load.
If you want to store also last change, just set it in blur event to any own property for comparing on next blur.