[1.2] FitLayout doesn't render with user controls or other controls in a UserControl

  1. #1

    [1.2] FitLayout doesn't render with user controls or other controls in a UserControl

    This is the scenario:
    [Test.aspx]
    <Viewport>
    <Items>
    
        <Panel>
        <Content>
              <UserControl1>
        </Content>
        </Panel>
    
    </Items>
    </Viewport>
    
    
    [UserControl1]
    <FitLayout>
        
        <Panel>
        </Panel>
    
    </FitLayout>
    
    <Menu />
    <Window />
    <UserControl2>
    The fitlayout control will not render. It constructs the following javascript:


    }});{ id: "ctl00_ctl00_cp_cp_ctl52_ProfP", xtype: "panel",


    As you can see after the ; there should be construction of a new object
    Last edited by geoffrey.mcgill; Nov 04, 2011 at 12:29 AM.
  2. #2
    FitLayout must single top level control in the user control, you cannot mix it with other controls
  3. #3
    Quote Originally Posted by Vladimir View Post
    FitLayout must single top level control in the user control, you cannot mix it with other controls

    Okay. Fine, but how would you recommend keeping non auto-rendered controls in the same self-contained user control?

    Is this a situation that can be handled with <Bin ></Bin>??
  4. #4

    Further thoughts...

    The more I think about your answer the more I regard this is a design flaw or bug. For discussion, this is why...

    This solution works renders fine (e.g. without user control):

    [Test.aspx]
    <Viewport>
    <Items>
     
        <Panel>
        <Content>
    
            <FitLayout>
                 <Panel/>
            </FitLayout>
            <Menu />
            <Window />
            <UserControl2 />
    
        </Content>
        </Panel>
     
    </Items>
    </Viewport>
    Then, also this works fine as a user control (e.g. no container layout):

    [Test.aspx]
    <Viewport>
    <Items>
     
        <Panel>
        <Content>
              <UserControl1>
        </Content>
        </Panel>
     
    </Items>
    </Viewport>
    
    [UserControl1]
    <Panel/>
    <Menu />
    <Window />
    <UserControl2 />
    Then the only time I get a problem is when I attempt to combine the two samples and use a layout in a user control.

    Is this really that big an issue to fix? It seems to me the only thing failing here is that the script code is not rendering the fitLayout name into the javascript stream, i.e. new fitLayout() { . This code would otherwise work (from what I can tell) if it just instantiated the object name into the stream. You guys have fixed hundreds of render issues exactly like this before.

    I'm in no position to question the level of challenge involved to address this here, or challenge your overall design goals, but it seems to me that if it's reasonable that I'm developing a user control, it is also reasonable that I wish to be able to contain related menus, windows and other related controls that are not rendered immediately but are related to the same user control in one ascx codebase, especially when I could accomplish the same effect on an aspx page without limitation of using a layout control inside a user control.

    Anyway, I'm just posing this as food for thought. I am still seeking a workaround to this problem. At present the ONLY solution I have is to provide a height to this control.

    I am days away from ordering my support subscription now that I'm switching full-time into my ext.net project.
  5. #5

    More testing...

    I've run a lot more independent tests and I'm starting to believe the bug is real, but something else. Apparently my original scenario (as I described it in my first description) actually renders perfectly fine the way I argued it should.

    The bug I'm experiencing seems a little more elusive, so I'll continue to try to create a test sample to reproduce it. The challenge is that the depth and complexity of the code-base where the problem occurs is very deep, and I can't just provide you my entire project solution, so I'm trying to reproduce a sample test I can submit that is more reproducible.

    This could take awhile...
  6. #6

    [MOVED]

    I moved this item to a new bug who's title is more accurate, now that I've narrowed it down.

    http://forums.ext.net/showthread.php?16053
    Last edited by geoffrey.mcgill; Nov 04, 2011 at 12:30 AM.

Similar Threads

  1. Replies: 1
    Last Post: Jul 20, 2012, 8:08 AM
  2. [CLOSED] How should I nested ext.net.controls with user controls?
    By ViDom in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jul 04, 2012, 11:14 AM
  3. Replies: 2
    Last Post: Nov 04, 2011, 12:33 AM
  4. Page Render - Controls all strange
    By Tbaseflug in forum Bugs
    Replies: 0
    Last Post: Jun 26, 2009, 1:27 PM
  5. Can't render window controls
    By Snargleflap in forum 1.x Help
    Replies: 3
    Last Post: May 07, 2009, 4:27 PM

Posting Permissions