ExtJS 6 MVVM "Hello World" Application

Posted By Vitaliy | June 13, 2017 | ExtJS 6.0.1
0 284
This is minimal html page code to run ExtJS version 6 with MVVM Architecture.
Note: it's recommended to add html DOCTYPE for this version of library.

<!DOCTYPE html>
<html>
	<head>
		<link href="/ext/6.0.1/build/classic/theme-triton/resources/theme-triton-all.css" rel="stylesheet" />
		<script src="/ext/6.0.1/build/ext-all.js"></script>
		<script src="/ext/6.0.1/build/classic/theme-triton/theme-triton.js"></script>
		<script src="/js/apps/6.0.1/mvvm/HelloWorld/app.js"></script>
	</head>
	<body>
	</body>
</html>

ExtJS 5 MVVM "Hello World" Application

Posted By Vitaliy | May 02, 2017 | ExtJS 5.0.1
0 393
This is minimal html page code to run ExtJS version 5 with MVVM Architecture.
Note: it's recommended to add html DOCTYPE for this version of library.

<!DOCTYPE html>
<html>
	<head>
		<link  href="/ext/5.0.1/build/packages/ext-theme-neptune/build/resources/ext-theme-neptune-all.css" rel="stylesheet" />
		<script src="/ext/5.0.1/build/ext.js"></script>
		<script src="/ext/5.0.1/build/packages/ext-theme-neptune/build/ext-theme-neptune.js"></script>
		<script src="/js/apps/5.0.1/mvvm/HelloWorld/app.js"></script>
	</head>
	<body>
	</body>
</html>

ExtJS 6: Building a Login System

Posted By Vitaliy | April 21, 2017 | ExtJS 6.0.0
0 734
This post is a demo for this tutorial

Js Code

Ext.define("App.view.login.Login", {
    extend: 'Ext.window.Window',
    xtype: 'login',
 
    requires: [
        'App.view.login.LoginController',
        'Ext.form.Panel'
    ],
 
    controller: 'login',
    bodyPadding: 10,
    title: 'Login Window',
    closable: false,
    autoShow: true,
 
    items: {
        xtype: 'form',
        reference: 'form',
        items: [{
            xtype: 'textfield',
            name: 'username',
            fieldLabel: 'Username',
            allowBlank: false
        }, {
            xtype: 'textfield',
            name: 'password',
            inputType: 'password',
            fieldLabel: 'Password',
            allowBlank: false
        }, {
            xtype: 'displayfield',
            hideEmptyLabel: false,
            value: 'Enter any non-blank password'
        }],
        buttons: [{
            text: 'Login',
            formBind: true,
            listeners: {
                click: 'onLoginClick'
            }
        }]
    }
});
            

ExtJS 5: Building a Login System

Posted By Vitaliy | September 26, 2014 | ExtJS 5.0.0
1 9381
This post is a demo for this tutorial

Js Code

//app/view/login/Login.js
Ext.define("App.view.login.Login", {
    extend: 'Ext.window.Window',
    xtype: 'login',

    requires: [
        'App.view.login.LoginController',
        'Ext.form.Panel'
    ],

    controller: 'login',
    bodyPadding: 10,
    title: 'Login Window',
    closable: false,
    autoShow: true,

    items: {
        xtype: 'form',
        reference: 'form',
        items: [{
            xtype: 'textfield',
            name: 'username',
            fieldLabel: 'Username',
            allowBlank: false
        }, {
            xtype: 'textfield',
            name: 'password',
            inputType: 'password',
            fieldLabel: 'Password',
            allowBlank: false
        }, {
            xtype: 'displayfield',
            hideEmptyLabel: false,
            value: 'Enter any non-blank password'
        }],
        buttons: [{
            text: 'Login',
            formBind: true,
            listeners: {
                click: 'onLoginClick'
            }
        }]
    }
});