1. #1
    Sencha User
    Join Date
    Nov 2008
    Location
    alexandria,va
    Posts
    49
    Vote Rating
    0
    capn is on a distinguished road

      0  

    Default doLayout()

    doLayout()


    doLayout( [Boolean shallow] ) : void Force this container's layout to be recalculated. A call to this function is required after adding a new component to...
    Force this container's layout to be recalculated. A call to this function is required after adding a new component to an already rendered container, or possibly after changing sizing/position properties of child components.



    So does this work if you change visibility or value of textfield? The parent container needs doLayout for change to appear in ui?

  2. #2
    Sencha User
    Join Date
    Nov 2008
    Location
    alexandria,va
    Posts
    49
    Vote Rating
    0
    capn is on a distinguished road

      0  

    Default


    sorry-- one inherits from container, and the other from component..


    http://extjs.com/forum/showthread.php?t=33541

    I came across animals post about getting containers..


    Animal, how do you manage your components and containers without accessing them by ID?

  3. #3
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    17,018
    Vote Rating
    650
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    If you don't want use an id, then you'll need to save a reference to it somehow, eg:

    Code:
    var p = new Ext.Panel({
       title: 'foo'
    });
    
    new Ext.Viewport({
       layout: fit,
       items: p
    });
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  4. #4
    Ext User
    Join Date
    Jul 2007
    Location
    Florida
    Posts
    9,996
    Vote Rating
    6
    mjlecomte will become famous soon enough mjlecomte will become famous soon enough

      0  

    Default


    id, or Evan's approach is easiest, you don't state why you don't want to use an id, but you could also use one of ComponentMgr's mixedCollection methods to search for your component if you have some property you know you can search by (xtype, someCustomProperty, etc.).

  5. #5
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,508
    Vote Rating
    56
    Animal has a spectacular aura about Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    I use a complex framework generated by JSP tags which creates a large config object which embeds variable names named after the name attribute in the tag, so I don't have this problem.

    For example the JSP page:

    Code:
    <%@ taglib uri="aspui" prefix="asp" %>
    <%@ page import="java.net.InetAddress,
            Synergex.synTypes.synAlpha,
            Synergex.synTypes.synDec,
            Synergex.synProxy.*,
            Synergex.net.xfServerNackException,
            com.fcl.util.Logger,
            com.fcl.servlet.AspCtrlConnect" %>
    <%
        response.setHeader("Cache-Control", "no-cache");
        response.setHeader("Pragma", "no-cache");
        response.setHeader("Expires", "0");
        response.setHeader("Asp-Login", "true");
        if (session.getAttribute("FCLUser") != null) {        // If we're logged in already, goto the menu
    %>        <jsp:forward page="AspCtrlMenu.jsp"/><%
            return;
        }
    
    //---------------------------------------------------------------------
    //    If those params were not in the URL...
    //---------------------------------------------------------------------
    
        String loginError;
        boolean loginEnabled = true;
        if (session.getAttribute("URLparamsNotPresent") == Boolean.TRUE) {
            loginError = "Missing parameters to Login page. Possibly expired session";
            loginEnabled = false;
        } else {
            loginError = (String)session.getAttribute("login_error");
            if (loginError == null) {
                loginError = request.getParameter("msg");
            } else {
                session.removeAttribute("login_error");
            }
        }
    
        String customerUrl = (String)session.getAttribute("asp_web_url");
        String asp_login_welcome = (String)session.getAttribute("asp_login_welcome");
        Boolean asp_public_wt_req = (Boolean)session.getAttribute("asp_public_wt_req");
        String asp_public_title = (String)session.getAttribute("asp_public_title");
        String asp_public_wt_title = (String)session.getAttribute("asp_public_wt_title");
    
    //---------------------------------------------------------------------
    //    Collect login details to populate the form
    //---------------------------------------------------------------------
        String custId = request.getParameter("ptc");
        String userId = request.getParameter("ptu");
        String password = request.getParameter("ptp");
    
    //---------------------------------------------------------------------
    //    If so, go straight to the login servlet
    //---------------------------------------------------------------------
        if ((custId != null) && (userId != null) && (password != null)) {
    %>        <jsp:forward page="asp_connect.do">
                <jsp:param name="cust_id" value="<%=custId%>"/>
                <jsp:param name="user_id" value="<%=userId%>"/>
                <jsp:param name="password" value="<%=password%>"/>
            </jsp:forward><%
            return;
        }
    %>
    <asp:page style="text-align:center" title="Secure Login For ASP WebTrack">
    <%if (loginEnabled) { %>
            <asp:container tag="center">
                <asp:container classname="login-errormessage" style="margin-top:65px;margin-bottom:10px">
    <%            if (loginError != null) {
                    %><%=loginError%><%
                }%>
                </asp:container>
                <asp:panel width="400" autoHeight="true" frame="true" border="true" baseCls="x-window" title="&#160;">
                    <asp:script>
                        var p = this;
                        function initPanel() {
                            p.doAutoWidth('.title');
                            loginForm.getForm().findField('cust_id').focus();
                            p.el.child('a.login-help').on('click', function(e) {
                                e.stopEvent();
                                loginHelp.show();
                            });
                        }
                    </asp:script>
                    <asp:form name="loginForm" classname="login" autoHeight="true" standardSubmit="true" bodyStyle="padding:10px" url="asp_connect.do" border="false">
                        <asp:component>
                            <asp:listener event="afterrender" handler="initPanel" options="{delay:100}"/>
    <%                        if (customerUrl != null) {%>
                                <a href="<%=customerUrl%>">
    <%                        }%>
                            <img alt="" src='<%=session.getAttribute("asp_cust_logo")%>' style="border:0px none">
    <%                        if (customerUrl != null) {%>
                                </a>
    <%                        }%>
                            <div class="title" style="margin-top:10px"><%=asp_login_welcome%></div>
                            <div class="note">
                                To use this service you need a login ID and password.&#160;
                                <a class="login-help" href="#" title="Help on connecting to ASP" target='help'>Tell me why</a><br>
    <%                            String email = request.getParameter("cema");
                                if (email != null) {%>
                                    If you require a login, or have forgotten yours, please <%
                                    if (email.indexOf('@') == -1) {
                                        out.print("<a href='" + request.getParameter("cema") + "'>contact us</a>");
                                    } else {
                                        out.print("<a href='mailto:" + request.getParameter("cema") + "'>contact us</a>");
                                    }
                                }%>
                            </div>
                        </asp:component>
                        <asp:textfield allowBlank="false" label="Customer ID" id="cust_id" value='<%=custId%>'/>
                        <asp:textfield allowBlank="false" label="User ID" id="user_id" value='<%=userId%>'/>
                        <asp:textfield allowBlank="false" label="Password" id="password" inputType="password" value='<%=password%>'/>
                        <asp:toolbar center="true" position="bottom">
                            <asp:button type="submit" text="Login" handler="if (!this.ownerCt.ownerCt.getForm().isValid()) {arguments[1].stopEvent();}" title='<%="Log in to " + session.getAttribute("asp_service_name")%>'/>
                            <asp:button text="Clear" handler="this.ownerCt.ownerCt.getForm().reset();" title="Clear form"/>
                        </asp:toolbar>
                        <input type="hidden" name="cic" value='<%=request.getParameter("cic")%>'>
                        <input type="hidden" name="cin" value='<%=request.getParameter("cin")%>'>
                        <input type="hidden" name="clif" value='<%=request.getParameter("clif")%>'>
                        <input type="hidden" name="cema" value='<%=request.getParameter("cema")%>'>
                        <input type="hidden" name="stct" value='<%=request.getParameter("stct")%>'>
                        <input type="hidden" name="xfpn" value='<%=request.getParameter("xfpn")%>'>
                        <input type="hidden" name="scheme" value='<%=request.getParameter("scheme")%>'>
                    </asp:form>
    <%                if (asp_public_wt_req.booleanValue()) { %>
                        <asp:fbar>
                            <asp:container tag="center" style="line-height:normal;font-size:11px;padding:5px">
                                <div class="public-service-title"><%=asp_public_title%></div>
                                <a class="bulleted" style="text-decoration:none;" href='<%=request.getContextPath() + "/AspWtPublic.jsp?imp=" + request.getParameter("imp")%>'><%=asp_public_wt_title%></a>
                            </asp:container>
                        </asp:fbar>
    <%                }%>
                </asp:panel>
            </asp:container>
            <asp:window name="loginHelp" buttonAlign="center" title='<%=(String)session.getAttribute("asp_login_welcome")%>' autoHeight="true" width="600" closeAction="hide" bodyStyle="padding:10px">
                    This is a secure service that requires you to log in using your username and password. This is because this service 
                    stores and delivers sensitive commercial data. Your username and password will also tell the system which services 
                    to show you and which data belongs to you.<br>
                    <br>
                    If you have not been supplied with  username and password, you will not be able to use this service. An Email link 
                    to the correct contact has been provided on the login screen above the login form. This is the person you should 
                    contact.<br>
                    <br>
                    If you are unable to connect to this service you <em>should</em> be given a meaningful error message. To connect to 
                    our services your must do the following:-<br>
                    <ul>
                        <li>Enable cookies in your browser.</li>
                        <li>Log in using the correct customer ID, user ID and password that you were supplied with (these are not case sensitive)</li>
                    </ul>
                    Please bear in mind that if your session window is inactive for more than a few minutes, this service will 
                    disconnect you to free up the connection.
                    <asp:fbar>
                        <asp:container tag="center">
                            <asp:button text="Close" handler="function(){loginHelp.hide();}"/>
                        </asp:container>
                    </asp:fbar>
            </asp:window>
    <%} // loginEnabled%>
    </asp:page>
    Ends up as the following HTML Page (After being run through a Javascript beautifier). Note that there is NO HTML, just a single Ext Viewport creation statement. Any embedded HTML is buffered by the tag handler that processes it, and inserted into an html config object. I have extended Ext.Component to be able to use the html config to embed HTML. (Ext should add this ability)

    Every Component that is generated by a tag handler has its own initComponent method injected which creates all its child items, and stores them in variables (named after the tag's name attribute) before calling the add method to add them.

    The advantage of doing this over just using the items config is that you get the variable name to use, and all embedded Components have access to it because they are all created in that closure so have access to all its variables.

    Code:
    <link rel="stylesheet" type="text/css" href="/fclasp71A/css/ext-all.css"/>
    <link rel="stylesheet" type="text/css" href="/fclasp71A/css/Aspicio.css"/>
    <script type="text/javascript" src="/fclasp71A/js/asp-all.js"></script>
    <script type="text/javascript">
    Ext.BLANK_IMAGE_URL = '/fclasp71A/images/s.gif';
    Ext.form.DateField.prototype.format = 'd-M-Y';
    Ext.onReady(function() {
    
        new Ext.Viewport({
            "initComponent": function() {
                try {
    
                    this.constructor.prototype.initComponent.apply(this, arguments);
                    var loginHelp = this.children.loginHelp = new AW.Window({
                        "initComponent": function() {
                            try {
    
                                this.constructor.prototype.initComponent.apply(this, arguments);
                                this.elements += ',footer';
                                this.fbar = new Ext.Button({
                                    "name": "AspicioButton1227714703619",
                                    "infoline": "infoline",
                                    "text": "Close",
                                    "handler": function() {
                                        loginHelp.hide();
                                    }
                                })
    
                                } catch(e) {
                                Ext.Msg.alert('Error in Window initialization script', "<pre><code>" + e + "</code></pre>")
                                }
                        },
                        "id": "AspicioWindow1227714703621",
                        "name": "loginHelp",
                        "title": "On-line Services from SBS Worldwide (UK)",
                        "html": "This is a secure service that requires you to log in using your username and password. This is because this service stores and delivers sensitive commercial data. Your username and password will also tell the system which services to show you and which data belongs to you.<br><br> If you have not been supplied with username and password, you will not be able to use this service. An Email link to the correct contact has been provided on the login screen above the login form. This is the person you should contact.<br><br> If you are unable to connect to this service you <em>should<\/em> be given a meaningful error message. To connect to our services your must do the following:-<br><ul><li>Enable cookies in your browser.<\/li><li>Log in using the correct customer ID, user ID and password that you were supplied with (these are not case sensitive)<\/li><\/ul> Please bear in mind that if your session window is inactive for more than a few minutes, this service will disconnect you to free up the connection.",
                        "width": 600,
                        "autoHeight": true,
                        "children": {},
                        "labelSeparator": " ",
                        "bodyStyle": "padding:10px",
                        "buttonAlign": "center",
                        "autoScroll": true,
                        "closeAction": "hide",
                        "ownerCt": this
                    });
                    var AspicioContainer1227714703616 = this.children.AspicioContainer1227714703616 = this.lookupComponent({
                        "initComponent": function() {
                            try {
    
                                this.constructor.prototype.initComponent.apply(this, arguments);
                                var AspicioContainer1227714703594 = this.children.AspicioContainer1227714703594 = this.lookupComponent({
                                    "id": "AspicioContainer1227714703594",
                                    "cls": "login-errormessage",
                                    "style": "margin-top:65px;margin-bottom:10px;",
                                    "xtype": "container",
                                    "autoEl": {},
                                    "children": {},
                                    "labelSeparator": " "
                                });
                                var AspicioPanel1227714703615 = this.children.AspicioPanel1227714703615 = new Ext.Panel({
                                    "initComponent": function() {
                                        try {
    
                                            this.constructor.prototype.initComponent.apply(this, arguments);
    
                                            var p = this;
                                            function initPanel() {
                                                p.doAutoWidth('.title');
                                                loginForm.getForm().findField('cust_id').focus();
                                                p.el.child('a.login-help').on('click', function(e) {
                                                    e.stopEvent();
                                                    loginHelp.show();
                                                });
                                            }
                                            this.elements += ',footer';
                                            this.fbar = {
                                                "id": "AspicioContainer1227714703614",
                                                "style": "line-height:normal;font-size:11px;padding:5px;",
                                                "html": "<div class=\"public-service-title\">Public Services (no login required)<\/div><a class=\"bulleted\" style=\"text-decoration:none;\" href='/fclasp71A/AspWtPublic.jsp?imp=sbs_sbs71_ext'>Public Consignment Tracking<\/a>",
                                                "xtype": "container",
                                                "autoEl": {
                                                    tag: 'center'
                                                },
                                                "children": {},
                                                "labelSeparator": " "
                                            }
                                            var loginForm = this.children.loginForm = new Ext.form.FormPanel({
                                                "initComponent": function() {
                                                    try {
    
                                                        this.constructor.prototype.initComponent.apply(this, arguments);
                                                        this.elements += ',bbar';
                                                        this.bottomToolbar = new Ext.Toolbar({
                                                            "initComponent": function() {
                                                                try {
    
                                                                    this.constructor.prototype.initComponent.apply(this, arguments);
                                                                    var AspicioButton1227714703608 = this.children.AspicioButton1227714703608 = new Ext.SubmitButton({
                                                                        "title": "Log in to On-line Services",
                                                                        "name": "AspicioButton1227714703607",
                                                                        "infoline": "infoline",
                                                                        "text": "Login",
                                                                        "handler": function() {
                                                                            if (!this.ownerCt.ownerCt.getForm().isValid()) {
                                                                                arguments[1].stopEvent();
                                                                            }
                                                                        }
                                                                    });
                                                                    var AspicioButton1227714703610 = this.children.AspicioButton1227714703610 = new Ext.Button({
                                                                        "title": "Clear form",
                                                                        "name": "AspicioButton1227714703609",
                                                                        "infoline": "infoline",
                                                                        "text": "Clear",
                                                                        "handler": function() {
                                                                            this.ownerCt.ownerCt.getForm().reset();
                                                                        }
                                                                    });;
                                                                    this.add.apply(this, [AspicioButton1227714703608, AspicioButton1227714703610]);
                                                                    this.on('afterlayout', function(tb) {
                                                                        tb.el.child('.x-toolbar-right').remove();
                                                                        var t = tb.el.child('.x-toolbar-left');
                                                                        t.removeClass('x-toolbar-left');
                                                                        t = tb.el.child('.x-toolbar-ct');
                                                                        t.setStyle('width', 'auto');
                                                                        t.wrap({
                                                                            tag: 'center'
                                                                        });
                                                                    }, null, {
                                                                        single: true
                                                                    });
    
                                                                } catch(e) {
                                                                    Ext.Msg.alert('Error in Toolbar initialization script', "<pre><code>" + e + "</code></pre>")
                                                                    }
                                                            },
                                                            "id": "AspicioToolbar1227714703606",
                                                            "children": {},
                                                            "labelSeparator": " "
                                                        })
                                                            var AspicioComponent1227714703599 = this.children.AspicioComponent1227714703599 = this.lookupComponent({
                                                            "initComponent": function() {
                                                                try {
    
                                                                    this.constructor.prototype.initComponent.apply(this, arguments);
                                                                    this.on({
                                                                        "afterrender": {
                                                                            "delay": 100,
                                                                            "fn": initPanel
                                                                        }
                                                                    });
    
                                                                } catch(e) {
                                                                    Ext.Msg.alert('Error in Component initialization script', "<pre><code>" + e + "</code></pre>")
                                                                    }
                                                            },
                                                            "xtype": "component",
                                                            "autoEl": {},
                                                            "id": "AspicioComponent1227714703599",
                                                            "html": "<a href=\"http://www.sbsworldwide.com/\"><img alt=\"\" src='images/asp_lgo_sbs.gif' style=\"border:0px none\"><\/a><div class=\"title\" style=\"margin-top:10px\">On-line Services from SBS Worldwide (UK)<\/div><div class=\"note\"> To use this service you need a login ID and password.&#160; <a class=\"login-help\" href=\"#\" title=\"Help on connecting to ASP\" target='help'>Tell me why<\/a><br> If you require a login, or have forgotten yours, please <a href='http://www.sbsworldwide.com/trackingrequest'>contact us<\/a><\/div>"
                                                        });
                                                        var AspicioTextField1227714703601 = this.children.AspicioTextField1227714703601 = new Ext.form.TextField({
                                                            "name": "cust_id",
                                                            "fieldLabel": "Customer ID",
                                                            "infoline": "infoline",
                                                            "allowBlank": false
                                                        });
                                                        var AspicioTextField1227714703603 = this.children.AspicioTextField1227714703603 = new Ext.form.TextField({
                                                            "name": "user_id",
                                                            "fieldLabel": "User ID",
                                                            "infoline": "infoline",
                                                            "allowBlank": false
                                                        });
                                                        var AspicioTextField1227714703605 = this.children.AspicioTextField1227714703605 = new Ext.form.TextField({
                                                            "name": "password",
                                                            "fieldLabel": "Password",
                                                            "inputType": "password",
                                                            "infoline": "infoline",
                                                            "allowBlank": false
                                                        });;
                                                        this.add.apply(this, [AspicioComponent1227714703599, AspicioTextField1227714703601, AspicioTextField1227714703603, AspicioTextField1227714703605]);
                                                        this.on({
                                                            "beforeaction": {
                                                                "fn": function(f, a) {
                                                                    if (a.type == 'submit') {
                                                                        if (!f.areFieldsValid()) {
                                                                            aspicio.util.displayMessage('Invalid Fields', aspicio.util.ERROR);
                                                                            f.highlightInvalid();
                                                                            return false;
                                                                        }
                                                                    }
                                                                }
                                                            }
                                                        });
    
                                                    } catch(e) {
                                                        Ext.Msg.alert('Error in Form initialization script', "<pre><code>" + e + "</code></pre>")
                                                        }
                                                },
                                                "id": "AspicioForm1227714703611",
                                                "name": "loginForm",
                                                "cls": "login",
                                                "html": "<input type=\"hidden\" name=\"cic\" value='FCL'><input type=\"hidden\" name=\"cin\" value='SBS Worldwide (UK)'><input type=\"hidden\" name=\"clif\" value='asp_lgo_sbs.gif'><input type=\"hidden\" name=\"cema\" value='http://www.sbsworldwide.com/trackingrequest'><input type=\"hidden\" name=\"stct\" value='alpha'><input type=\"hidden\" name=\"xfpn\" value='2517'><input type=\"hidden\" name=\"scheme\" value='ext'>",
                                                "autoHeight": true,
                                                "children": {},
                                                "layout": "form",
                                                "labelSeparator": " ",
                                                "bodyStyle": "padding:10px",
                                                "border": false,
                                                "autoScroll": true,
                                                "fileUpload": false,
                                                "standardSubmit": true,
                                                "url": "asp_connect.do"
                                            });;
                                            this.add.apply(this, [loginForm]);
    
                                        } catch(e) {
                                            Ext.Msg.alert('Error in Panel initialization script', "<pre><code>" + e + "</code></pre>")
                                            }
                                    },
                                    "id": "AspicioPanel1227714703615",
                                    "title": "&#160;",
                                    "width": 400,
                                    "autoHeight": true,
                                    "children": {},
                                    "labelSeparator": " ",
                                    "frame": true,
                                    "baseCls": "x-window",
                                    "border": true,
                                    "autoScroll": true
                                });;
                                this.add.apply(this, [AspicioContainer1227714703594, AspicioPanel1227714703615]);
    
                            } catch(e) {
                                Ext.Msg.alert('Error in Container initialization script', "<pre><code>" + e + "</code></pre>")
                                }
                        },
                        "id": "AspicioContainer1227714703616",
                        "xtype": "container",
                        "autoEl": {
                            tag: 'center'
                        },
                        "children": {},
                        "labelSeparator": " "
                    });;
                    this.add.apply(this, [AspicioContainer1227714703616]);
    
                } catch(e) {
                    Ext.Msg.alert('Error in Page id "AspicioPage1227714703622" initialization script', "<pre><code>" + e + "</code></pre>")
                    }
            },
            "id": "AspicioPage1227714703622",
            "style": "text-align:center;",
            "title": "Secure Login For ASP WebTrack",
            "children": {},
            "labelSeparator": " ",
            "xtype": "panel",
            "border": true,
            "layout": "fit"
        });
    }, null, {
        delay: 100
    });
    </script>
    <title>Secure Login For ASP WebTrack</title></head>
    <body id="asp-document-body">
    </body></html>
    And any utility UI classes are all OO, and keep references to any Components they use within themselves.

  6. #6
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,508
    Vote Rating
    56
    Animal has a spectacular aura about Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    Ends up like this:


  7. #7
    Sencha User
    Join Date
    Nov 2008
    Location
    alexandria,va
    Posts
    49
    Vote Rating
    0
    capn is on a distinguished road

      0  

    Default


    Thank you for sharing this. I might have some questions to ask about the way you did this, but for moment I have to go back to original question about doLayout.

    I made a simple example where by clicking a button, textfield and button attributes are supposed to change but they aren't. I can't see any other options to use in the api. Here is the code I used to test:

    Code:
    Ext
    
    .onReady(function(){
    var form =new Ext.form.FormPanel({ baseCls
    :'x-plain',
    layout
    :'absolute',
    defaultType
    :'textfield',
    items
    :[
    { x
    :60,
    y
    :0,
    name
    :'a textfield',
    id
    :'txt',
    anchor
    :'100%'// anchor width by percentage
    },{ x
    :60,
    y
    :60,
    name
    :'a textfield 2',
    id
    :'txt2',
    text
    :'hidden=false',
    hidden
    :true,
    anchor
    :'100%'// anchor width by percentage
    }] });
    var window =new Ext.Window({ title
    :'Resize Me',
    width
    :500,
    height
    :300,
    minWidth
    :300,
    minHeight
    :200,
    layout
    :'fit',
    plain
    :true,
    bodyStyle
    :'padding:5px;',
    buttonAlign
    :'center',
    items
    : form,
    buttons
    :[{text:'button1',id:'btn1',disabled:true},{
    text
    :'button2',
    listeners
    :
    { click
    :function(me,e)
    {
    Ext
    .getCmp('btn1').disabled=false;
    Ext.getCmp('btn1').ownerCt.doLayout(true);
    Ext.getCmp('txt').value='test'; Ext
    .getCmp('txt').ownerCt.doLayout(true);
    Ext
    .getCmp('txt2').hidden=false;
    Ext
    .getCmp('txt2').ownerCt.doLayout(true);
    alert
    (
    'Ext.getCmp("btn1").disabled:\t'+ Ext.getCmp('btn1').disabled+"\n"+ 'Ext.getCmp("txt").value:\t'+ Ext.getCmp('txt').value+"\n"+ 'Ext.getCmp("txt2").hidden:\t'+ Ext.getCmp('txt2').hidden+"\n"
    );
    } } }] });
    window
    .show(); });


Thread Participants: 3