[CLOSED] ComponentLoader issue

  1. #1

    [CLOSED] ComponentLoader issue

    I generate a GridPanel that has a CheckBoxSelecionModel using ComponentLoader.ToJason. The Selecion has a handler that pass another element to a javascript function. If i set "testFunc(elementName);" when the function is called the control is not the control expected. I cannot set "testFunc(#{elementName});" because the ComponentLoader fails (Error during ClientConfig initialization.).

    Any help will be appreciated :)

    CheckboxSelectionModel selMdl = new CheckboxSelectionModel { ID = "_smd", Mode = SelectionMode.Single };
    selMdl.Listeners.SelectionChange.Handler = "testFunc(#{elementName});";
    Last edited by Daniil; Apr 20, 2012 at 6:51 PM. Reason: [CLOSED]
  2. #2
    In <Loader> element it´s possible to accomplish this task setting the Scripts property to true. How can i do it in component loader?
  3. #3
    i could use selMdl.Listeners.SelectionChange.Handler = "testFunc(Ext.getCmp(elementName));" but i think that it´s not a good practice. Could someone give me directions to overcome this problem?
  4. #4
    If 'elementName' is grid then you can use 'this.view.panel' in the selection model event handler
    selMdl.Listeners.SelectionChange.Handler = "testFunc(this.view.panel);";
    Also in v2, there is default namespace - App
    So, if widget has ID="GridPanel1" then you have add 'App.' to ID injavascript code (of course, if widget is not inside INamingContainer, in this case ID != ClientID)
    selMdl.Listeners.SelectionChange.Handler = "testFunc(App.elementName);";

Similar Threads

  1. [CLOSED] ComponentLoader inconsistency
    By RCN in forum 2.x Legacy Premium Help
    Replies: 10
    Last Post: Jun 07, 2012, 12:24 PM
  2. Replies: 1
    Last Post: Apr 03, 2012, 9:36 AM
  3. [CLOSED] ComponentLoader - DirectEvents
    By PatrikG in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Mar 15, 2012, 1:20 PM
  4. [CLOSED] Pecilluar issue in the DropDown, UI Issue
    By Shanth in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Feb 22, 2012, 12:02 PM

Posting Permissions