Results 1 to 8 of 8

Thread: adding login example

  1. #1
    Sencha User
    Join Date
    Mar 2010
    Posts
    16

    Default adding login example

    ext 6.0.2
    cmd 6.1.2.15

    Hi I'm new in extjs6 I'm just playing with the code, and I try to do the login example.


    well, the login show up, after that I try to create the main view, but never show up, then I try to render it.


    And the viewport moves

    Code:
    Ext.create({
    			xtype: 'app-main',
    			renderTo : Ext.getBody()
    		});
    What I'm doing wrong?
    Attached Images Attached Images

  2. #2
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985
    Answers
    506

    Default

    Hard to say without seeing more code. What are you doing when the menu migrates to the top? Are you talking about this login example?
    http://examples.sencha.com/extjs/6.0...nk/#form-login

  3. #3
    Sencha User
    Join Date
    Mar 2010
    Posts
    16

    Default

    I'm so sorry, I was thinking that was easy to understand, it is the example.

    Im just triying to login, then show the example, I did not write more code.

    I follow this link that comes with de trial app

    http://docs.sencha.com/extjs/6.0/get...login_app.html

    i have exactly the same code, I copy paste it

    I make some tests,

    remove this line in app.js

    //mainView: 'Test2.view.main.Main'


    then add this to the Aplication.js

    launch: function () {
    // TODO - Launch the application
    Ext.create('Ext.container.Viewport',{
    items: [{
    xtype: 'app-main'
    }]
    });


    },

    and it show wrong, nothing more added

  4. #4
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985
    Answers
    506

    Default

    What are you doing that makes it switch from appearing like your first image to appearing like your second image? Put another way, what action or code causes it to switch?

  5. #5
    Sencha User
    Join Date
    Mar 2010
    Posts
    16

    Default

    Hi


    I'm not doing anything and thats my question, why it moves ?


    I'm following your guide http://docs.sencha.com/extjs/6.0/get...login_app.html


    I create a new app "Test", then it shows fine.


    Then, I remove this line in app.js

    //mainView: 'Test.view.main.Main'

    after that if you reload the app, only get a blank page.


    then i modify aplication.js to manually create the main view


    Code:
    launch: function () {
    // TODO - Launch the application
    Ext.create('Ext.container.Viewport',{
    items: [{
    xtype: 'app-main'
    }]
    });
    },
    and it shows verticaly.

    I'm trying to load a "window login" before the main view as your guide

  6. #6
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985
    Answers
    506

    Default

    Do you see any error messages in the console when the blank page loads? As far as the two views you posted, the menu loads on the left side and then switches to the top on its own?

  7. #7

    Default

    Quote Originally Posted by dmdarki View Post
    ext 6.0.2
    cmd 6.1.2.15

    Hi I'm new in extjs6 I'm just playing with the code, and I try to do the login example.


    well, the login show up, after that I try to create the main view, but never show up, then I try to render it.


    And the viewport moves

    Code:
    Ext.create({
                xtype: 'app-main',
                renderTo : Ext.getBody()
            });
    What I'm doing wrong?
    -----------------------------------------------------------------------------

    Hi, your are not doing anything wrong, For me the example its wrong
    the thing is that you have 2 xtype call 'app-main' because you created one in the path they told you {appRoot}/app/view/main/Main.js erase it ande then go to {appRoot}/app/view/main/Main.js and modify it as its says in the doc and it should work fine




  8. #8
    Sencha Premium User
    Join Date
    Apr 2017
    Posts
    3

    Default

    I am facing the same issue. Can some one elaborate what's wrong in the example. Since I am new ExtJS its hard to understand what has been said in the solution.

Similar Threads

  1. Adding google+ javascript and html for a login button
    By montalbano in forum Sencha Touch 2.x: Q&A
    Replies: 0
    Last Post: 9 Jul 2014, 12:45 PM
  2. Replies: 1
    Last Post: 14 Apr 2014, 10:36 PM
  3. Replies: 2
    Last Post: 12 Nov 2013, 6:17 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •