ClientIDs with nested UserControls

  1. #1

    ClientIDs with nested UserControls

    Hello,

    i have the following problem:
    There is a UserControl (ID=UC1), which is loaded dynamically through a DirectMethod. Within this UserControl there is another DirectMethod, which creates a window with another UserControl in it (UC2). UC2 is also loaded dynamically through a DirectMethod.
    In UC2 there is a DropDownField with a GridPanel (including a store with ID=STORE1) as the choice component.

    When I now try to set a value to the DropDownField, it says UC2_STORE1 not found. (Firebug says that). But acutally I would expect that the id it tries to update is UC1_UC2_STORE1.
    I have set the ClientIDMode to AutoID.

    I sniffed the browser-server communication with tcpmon and the strange thing is, that when creating the store it correctly says: this.UC1_UC2_STORE1=new Ext.ux.data.PagingStore(...)
    But when the system tries to access the store for some refreshCallback functions and stuff, it references it with UC2_STORE1.

    Also when I output the ClientID of the Store in codebehind, it says UC2_STORE1.


    Does anyone have an idea what the problem there can be?
    Thanks so much for your help, i am really stuck.
    bright
  2. #2
    Ok. I found a work-around for me: I now load the UC2 control through the master page and not through the UC1 control.

    That seems to work for me, but the behavior keeps being a bit strange.
    Thanks, bright
  3. #3
    Can you post test case with steps to reproduce the issue?
  4. #4
    Thanks for your reply. But I have resolved the problem:

    The problem was, that I loaded the UC2 UserControl inside a window. I had to adapt the parameter of the Window.Render() control and now it works perfectly.

    Sorry for bothering you with that,
    bright

Similar Threads

  1. [CLOSED] Nested data in nested grids
    By FAS in forum 1.x Legacy Premium Help
    Replies: 16
    Last Post: Apr 19, 2012, 7:51 PM
  2. UserControls and Validation
    By Zdenek in forum 1.x Help
    Replies: 3
    Last Post: Nov 23, 2011, 6:59 PM
  3. [CLOSED] Portlets and UserControls
    By rthiney in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Dec 14, 2010, 7:32 PM
  4. ScriptManagerProxy and UserControls
    By davidhoyt in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Dec 31, 2008, 4:30 PM

Posting Permissions