PDA

View Full Version : createInterceptor and createSequence isn't working for my component



abdelaat
28 Oct 2010, 2:29 AM
Hello,
I have a component extending the FormPanel, in the init method i create an interceptor and sequence for the formPanel form property like this :




Ext.ux.ScoolFormPanel = Ext.extend(Ext.form.FormPanel, {

initComponent:function()
{
// call parent initComponent
Ext.ux.ScoolFormPanel.superclass.initComponent.call(this);

// createSequence here
this.getForm().reset.createSequence(function()
{
alert('Sequence');
});

// createInterceptor here
this.getForm().loadRecord.createInterceptor(function()
{
alert('Interceptor');
});
}
//...
}


but whene i call the loadRecord method i don't see the alert messages ! am i missing some thing :-? ?

Thanks

Animal
28 Oct 2010, 2:35 AM
createInterceptor creates a function.

You just create the function and throw away any reference to it.

If you want your form to use the new function you have to poke it into the form.

abdelaat
28 Oct 2010, 3:43 AM
Thank you very much my brain should have been gone away