View Full Version : How to reset Listener

13 Jan 2011, 8:24 PM

I wanna to show a form both in View Mode and in Edit mode..

In View Mode... i cleared the events like below...


then is it possible to re activate the event['blur']....
in Edit/Add Mode ... If yes then pls show me how????

13 Jan 2011, 8:48 PM
What is it really that you are trying to accomplish? What's "view mode?"

13 Jan 2011, 8:55 PM
okk i'm sorry

the View mode by which i meant the form that contains read only fields just for showing details and not for editing ...
so that i removed all the events like blur, focus...... as above #1.

But now i want to reset that event listeners.. how???

13 Jan 2011, 9:53 PM
Can you just disable all the fields instead, then re-enable them for edit-mode? Trying to remove, then restore the listeners seems a very difficult way to get this done.

13 Jan 2011, 10:00 PM
not possible.. coz.. still after disable all the fields the listener will work.... that not allowed... thats why i cleared the listener...

is that possible to disable the event listener and re enable.. can u pls specify the piece of code???

14 Jan 2011, 7:00 AM
I don't know how to do what you want. Why do you have to disable the listeners? That doesn't make sense to me.

14 Jan 2011, 7:06 AM
Let's see, the documentation for form fields (http://dev.sencha.com/deploy/dev/docs/?class=Ext.form.Field) says that there are some usable methods you should look into.

Ext.form.Field.suspendEvents and Ext.form.Field.resumeEvents

Have a go at those.