Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8988895
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T22:07:21+00:00 2026-06-15T22:07:21+00:00

I am developing web site in extjs4 + yii framework. I am using a

  • 0

I am developing web site in extjs4 + yii framework. I am using a border layout as a viewport.
Inside it I am using a accordian layout and displays home page. In Home page there is a login window whcih i want to hide after ligin completion. how can i remove this window.
here is my code:–

1)Viewport.js:-
Ext.define('AM.view.Viewport', {
    extend: 'Ext.container.Viewport',
    layout: 'border',
    id:'vp',
    border: 5,
    style: {
        borderColor: 'red',
        borderStyle: 'solid'
    },
    requires: [
               'AM.view.header.Header',
               'AM.view.login.Login',
               'AM.view.wordOfDay.WordOfDay',
               'AM.view.weather.Weather',
               'AM.view.poll.Poll',
               'AM.view.qod.QOD',
               'AM.view.history.History',
               'AM.view.qod.LastQuestion'
              ],


    items: [
    {
        region:'north',
        xtype: 'headerHeader',
        margins:5,
        height:70,
        //html:'<h1>Welcome</h1>',
    },
    {
    /*  title:'West',
        region:'west',
        margins:'0 5 0 5',
        flex:.3,
        collapsible:true,
        split:true,
        titleCollapse:true,
    */  

    //  title:'Main menu',

        region:'west',
        margins:'0 5 5 5',
        flex:.3,
        //collapsible:true,
        //titleCollapse:true,
        layout:'accordion',
        layoutConfig:
        {
                animate:false,
                multi:true
        },
        items:[
        {
            title:'wordOfDay',
            xtype:'wod' 
        },
        {
            title:'weather Information',
            xtype:'weather' 
        },
        {
            title:'poll of the day',
            xtype:'poll'
        },
        {
            title:'questionOfDay',
            xtype:'questionOfDay'
        }
        ]//end if items

    },
    {
        //title:'center',
        region:'center',
        html:'center region'
    },
    {
    /*  //title:'East',
        xtype:'loginLogin',
        region:'east',
        margins:'0 5 0 5',
        width:200,
        //collapsible:true,
        //collapsed:true,
    */
        region:'east',
        margins:'0 5 0 5',
        flex:.3,
        //collapsible:true,
        //titleCollapse:true,
        layout:'accordion',
        layoutConfig:
        {
                animate:false,
                multi:true
        },
        items:[
        {
            title:'Login Window',
            xtype:'loginLogin'
        },       
        {
            title:'QuestionOfDay',
            xtype:'questionOfDay'
        },
        {
            title:'Last Question And its answer',
            xtype:'lastQusetion'
        },
        {
            title:'This Day In a History',
            xtype:'history'
        }
        ]//end if items
    },
    {
        //title:'South',
        region:'south',
        margins:'0 5 5 5',
        flex:.1,
        html:'<h6 align="center">Footer</h6>',
        split:false
    },//mainMenu   // used mainMenu when you are using mainMenu variable
    ]//end if items
});//End of view port

2)Login.js :-- this is the login view page
Ext.define('AM.view.login.Login',
{
        extend:'Ext.form.Panel',
        id:'lg',
        alias:'widget.loginLogin',
        bodyStyle:'padding:5px 5px 0',
        title:'Login Window',
        hidden:false,
        height: 150,
        //items:
        //[
         //{
             //xtype:'form',
             border:3,
             items:[
                    {
                        xtype:'textfield',
                        fieldLabel:'Key In',
                        name:'uname',
                        //width:'10px',
                        anchor:'100%',
                        //flex:2,
                        //labelAlign:'top',               
                        //  cls:'field-margin',
                        allowBlank:false,
                        //minLength:6,
                        //draggable:true,
                    },
                    {
                        xtype:'textfield',
                        fieldLabel:'Key',
                        //width:'20px',
                        flex:6,
                        //labelAlign:'top',
                        name:'pass',
                        inputType:'password',
                        allowBlank:false,
                        minLength:6,
                        anchor:'100%',

                    },
                    {
                        xtype:'button',
                        formBind: true,
                        fieldLabel:'Keylogin',
                        action:'loginAction',
                        text:'login',
                        //width:'20px',
                        flex:6,
                        //labelAlign:'top',

                        anchor:'100%',

                    }
                    ],  
         //}],//end of items
});//End

3) And here is some code in controller file

authenticateUser:function(button)
{   
    console.log('enter');
    var obj = Ext.ComponentQuery.query('#vp');

    obj[0].remove('lg');
}    

code is executing but is does not hides the login window.please give me suggestions..
Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T22:07:22+00:00Added an answer on June 15, 2026 at 10:07 pm

    Ext.ComponentQuery.query() method always returns an array of objects so change your code from var obj = Ext.ComponentQuery.query('#vp'); to var obj = Ext.ComponentQuery.query('#vp')[0]; which will give you first element from the array. You need to check whether this first element is null or not

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am currently developing a web site using ASP.NET 3.5. On a page there
I am developing a web site using the Zend Framework. I was using this
I'm developing a web site using codeigniter framework. To document it, I've installed doxygen.
I'm developing web site that loads pages dynamically using the .load function. For example:
I'm developing a Web Site using ASP.NET MVC 3, Nowadays I need to encrypt
I'm developing a web site containing 3 pages (Home, page2, page3) ... in the
I am using ASP.NET MVC for developing a web site. I am using jquery
I am developing a php web site. Here I have implemented clean URL using
I am developing a web site that uses a CMS and my actual home
I'm developing a web site, and i'm using infragistics for web, but I want

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.