[OPEN] [#403] UserControlRendererConfig does not render some controls

Page 2 of 2 FirstFirst 12
  1. #11
    So I stepped through the code and the IDMode is correct when the controls are in UserControlScriptBuilder.Build() when it loads uc, but they change to IDMode.Static when it retrieves childControls = this.FindControls() in DefaultScriptBuilder.Build(). Inside FindControls() it calls Control.EnsureChildControls() which is causing the loss of IDMode. This calls LifeCycle.CreateClientControls. IDMode changes immediately after this:
    this.Controls.Add(((IContent)this).ContentContaine r). this, in this case is the ContentContainer and it was explicitly set to IDMode.Static at the top in UserControlScriptBuilder.Build() [why I do not know). I'm wondering if the IDMode is cascading to the children, but I cannot step through further. At this point I'm hoping this can clue you in on the issue.
    Last edited by michaeld; Dec 13, 2013 at 9:38 AM.
  2. #12
    So I'm completely dead in the water until this item gets looked into.
  3. #13
    Sorry for the delay.

    There are a few points.

    1. The EventP's IDMode has been switching to Static, because the UserControlRenderer creates an intermediary Panel with IDMode="Static" and the EventP inherits that (IDMode is Inherit by default). It is why you are seeing that switch to Static. That hardcoded IDMode="Static" for an intermediary Panel and no way to change it is definitely a problem. We created an Issue and will try to address it. Thank you for bringing that problem to us.
    https://github.com/extnet/Ext.NET/issues/403

    2. Currently, to fix your test case you can set up IDMode="Legacy" or IDMode="Explicit" for the EventP.

    3. Also it is worth to use "Items = true" for the UserControlRendererConfig in your sample. In this case an intermediary Panel won't be rendered, and the LP's VBoxLayout will manage the EventP. Otherwise, it will manage the intermediary Panel.
    Last edited by Daniil; Dec 16, 2013 at 3:43 PM.
  4. #14
    Quote Originally Posted by Daniil View Post
    1. The EventP's IDMode has been switching to Static, because the UserControlRenderer creates an intermediary Panel with IDMode="Static" and the EventP inherits that (IDMode is Inherit by default). It is why you are seeing that switch to Static. That hardcoded IDMode="Static" for an intermediary Panel and no way to change it is definitely a problem. We created an Issue and will try to address it. Thank you for bringing that problem to us.
    https://github.com/extnet/Ext.NET/issues/403
    As soon as you've got a fix for this, I can share some work I've taken on a stab at this:
    http://forums.ext.net/showthread.php...er-amp-Manager

    Quote Originally Posted by Daniil View Post
    2. Currently, to fix your test case you can set up IDMode="Legacy" or IDMode="Explicit" for the EventP.
    I understand and I tried, but the problem identified here makes this solution prohibitive: http://forums.ext.net/showthread.php...ig-RenderModes
    Also, the test case in that example there does not have a parent container that I can do this.

    Quote Originally Posted by Daniil View Post
    3. Also it is worth to use "Items = true" for the UserControlRendererConfig in your sample. In this case an intermediary Panel won't be rendered, and the LP's VBoxLayout will manage the EventP. Otherwise, it will manage the intermediary Panel.
    It's actually very strange, but in the last sample I provided, I've found the exact opposite to be true. If Items=true, EventP doesn't expand to the length of the right panel despite having Flex=1. But with Items=false, it does. Maybe you can explain why that is because I can't.
  5. #15
    Quote Originally Posted by michaeld View Post
    As soon as you've got a fix for this, I can share some work I've taken on a stab at this:
    http://forums.ext.net/showthread.php...er-amp-Manager
    Nice! I have seen the thread already, but have not had a good chance to read thoroughly

    Quote Originally Posted by michaeld View Post
    2. Currently, to fix your test case you can set up IDMode="Legacy" or IDMode="Explicit" for the EventP.
    I understand and I tried, but the problem identified here makes this solution prohibitive: http://forums.ext.net/showthread.php...ig-RenderModes
    Also, the test case in that example there does not have a parent container that I can do this.
    Could you, please, clarify why?

    Quote Originally Posted by michaeld View Post
    It's actually very strange, but in the last sample I provided, I've found the exact opposite to be true. If Items=true, EventP doesn't expand to the length of the right panel despite having Flex=1. But with Items=false, it does. Maybe you can explain why that is because I can't.
    VBoxLayout uses Flex of its items to calculate its height, not width. To get the EventP stretched you should set up
    <LayoutConfig>
        <ext:VBoxLayoutConfig Align="Stretch" />
    </LayoutConfig>
    for the "RP" Container.

    I am not quite sure why it stretches without "Items = true", but I would not rely on that.
  6. #16
    The fruits of this thread and others can be found here:
    http://forums.ext.net/showthread.php...875#post122875
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Replies: 5
    Last Post: Nov 03, 2011, 2:39 AM
  2. ComboBox/Controls Render Improperly
    By Tbaseflug in forum 1.x Help
    Replies: 6
    Last Post: Mar 15, 2011, 1:44 PM
  3. Page Render - Controls all strange
    By Tbaseflug in forum Bugs
    Replies: 0
    Last Post: Jun 26, 2009, 1:27 PM
  4. Replies: 9
    Last Post: May 11, 2009, 4:06 PM
  5. Can't render window controls
    By Snargleflap in forum 1.x Help
    Replies: 3
    Last Post: May 07, 2009, 4:27 PM

Tags for this Thread

Posting Permissions