[CLOSED] CardLayout rendering ALL panel contents at once AND OUTSIDE the CardLayout?

  1. #1

    [CLOSED] CardLayout rendering ALL panel contents at once AND OUTSIDE the CardLayout?


    Hi,
    I have a rather urgent issue to solve. I'm working with an SVN code versio downloaded on monday.

    At first I thought it might have to do with my app, but the I reproduced the issue simply modifying a little your Coolite sample.

    It is simply that whatver content I put in any of the CardLayout panels gets rendered BEFORE the CardLayout, the content of all panels is rendered visible at the same time... I must be missing something here... right?.

    Here it goes the code:

    <%@ Page Language="C#" %>
    <%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" TagPrefix="ext" %>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head id="Head1" runat="server">
        <title>Card Layout</title>
        <link href="../../../../resources/css/examples.css" rel="stylesheet" type="text/css" />
        
        <script runat="server">
            protected void Next_Click(object sender, EventArgs e)
            {
                int index = int.Parse(WizardLayout.ActiveItem);
                if ((index + 1) < WizardLayout.Items.Count)
                {
                    WizardLayout.ActiveItem = (index + 1).ToString();
                }
                CheckButtons();
            }
    
            protected void Prev_Click(object sender, EventArgs e)
            {
                int index = int.Parse(WizardLayout.ActiveItem);
                if ((index - 1) >= 0)
                {
                    WizardLayout.ActiveItem = (index - 1).ToString();
                }
                CheckButtons();
            }
    
            private void CheckButtons()
            {
                int index = int.Parse(WizardLayout.ActiveItem);
                btnNext.Disabled = index == (WizardLayout.Items.Count - 1);
                btnPrev.Disabled = index == 0;
            }
        </script>
    </head>
    <body>
        <form id="form1" runat="server">
            <ext:ScriptManager ID="ScriptManager1" runat="server" />
            
            <ext:Panel ID="WizardPanel" runat="server" Title="Example Wizard" BodyStyle="padding:15px" Height="300" >       
                <Body>
                    <ext:CardLayout ID="WizardLayout" runat="server" ActiveItem="0">
                        <ext:Panel runat="server" 
                            Html="<h1>Welcome to the Wizard!</h1><p>Step 1 of 3</p>" Border="false" 
                            Header="false" ID="Panel1">
                            <Body>
                                <ext:Button ID="Button1" Text="Botonazo" runat="server"> </ext:Button>
                            </Body>
                        </ext:Panel>
                            
                        <ext:Panel runat="server" Html="<p>Step 2 of 3</p>" Border="false" 
                            Header="false" ID="Panel2">
                            <Body>
                                <ext:Button ID="Button2" Text="Botonazo2222" runat="server"> </ext:Button>
                            </Body>
                        </ext:Panel>
                        <ext:Panel runat="server" 
                            Html="<h1>Congratulations!</h1><p>Step 3 of 3 - Complete</p>" Border="false" 
                            Header="false" ID="Panel3">
                            <Body>
                                <ext:Button ID="Button3" Text="Botonazo3333" runat="server"> </ext:Button>
                            </Body>
                        </ext:Panel>
                    </ext:CardLayout> 
                </Body>         
                <Buttons>
                    <ext:Button ID="btnNext" runat="server" Text="Next">
                        <AjaxEvents>
                            <Click OnEvent="Next_Click" ViewStateMode="Include">
                            </Click>
                        </AjaxEvents>
                    </ext:Button>
                    <ext:Button ID="btnPrev" runat="server" Text="Prev" Disabled="true">
                        <AjaxEvents>
                            <Click OnEvent="Prev_Click" ViewStateMode="Include">
                            </Click>
                        </AjaxEvents>
                    </ext:Button>
                </Buttons>     
            </ext:Panel>
        </form>
    </body>
    </html>
    Please, 'Ive been wasting hours on this, and now I'm runing against the clock with a delivery to a productive environment...

    Thanks in advance!


  2. #2

    RE: [CLOSED] CardLayout rendering ALL panel contents at once AND OUTSIDE the CardLayout?

    Hi,

    You can't use Html property and Body content at one time. Please remove Html property if you use Body
    *
  3. #3

    RE: [CLOSED] CardLayout rendering ALL panel contents at once AND OUTSIDE the CardLayout?

    Thanks Vladimir!

    I only wished I knew that before... :-(

    Is that documented?

    Maybe you could make a little bit more realistic sample... who's gonna make a wizard with HTML only, hu? :-)

    Adrián
  4. #4

    RE: [CLOSED] CardLayout rendering ALL panel contents at once AND OUTSIDE the CardLayout?

    Hi*Adrián,

    We're going to be changing the functionality of the Html + <Body> scenario by throwing an Exception if both properties are set.


    Geoffrey McGill
    Founder
  5. #5

    RE: [CLOSED] CardLayout rendering ALL panel contents at once AND OUTSIDE the CardLayout?

    *Thanks Geoffrey!

Similar Threads

  1. Ext.net CardLayout Panel Client Side Rotation
    By NickBin in forum Examples and Extras
    Replies: 2
    Last Post: Aug 19, 2014, 2:14 AM
  2. Add Dynamic panel in CardLayout
    By threewonders in forum 1.x Help
    Replies: 2
    Last Post: Jul 23, 2012, 1:29 PM
  3. Replies: 1
    Last Post: Mar 09, 2010, 2:27 PM
  4. [CLOSED] [1.0] TriggerField on CardLayout not rendering properly
    By tdracz in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Jan 12, 2010, 11:53 AM
  5. [CLOSED] CardLayout Panel focus with client code
    By LeeTheGreek in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Sep 17, 2009, 5:46 AM

Posting Permissions