I am trying to add a listener to my text fields when I focus. The code is as follows:

  
      foreach (Component comp in leftComponenets)
        {
            //((TextField)comp).AddListener("Click", "Ext.net.DirectMethods.clickOnObject()");
            if (comp is TextField)
            {
                ((TextField)comp).Listeners.Focus.Handler = "Ext.net.DirectMethods.clickOnObject();";
            }
        }
It is being assigned the following method:

 
    [DirectMethod]
    public void clickOnObject()
    {
        Response.Write("hwerlkjasdf;ljasdf");
    }
However, when I focus on the text field, I am getting the following error in Chrome:

Object #<Object> has no method 'clickOnObject'
I have tried a number of different methods including putting the code inline into the front end XML but I still have the same problem. It seems to me that the linker doesn't get assigned properly into Ext.net.DirectMethods object. I am not sure what i am doing wrong. Is it because I am using the back end to assign the listener?

Any help is greatly appreciated!