采用struts2 + extjs4(MVC)
1.简单登录
1.简单登录

Ext.define('Cart.view.LoginWin',{
extend: 'Ext.window.Window',
alias: 'widget.loginwin',
title: 'Login',
width: 340,
height: 200,
plain: true,
headerPosition: 'top',
layout: 'fit',
renderTo: Ext.getBody(),
constrain: true,
buttonAlign: 'center',
resizable: false,
requires: ['Cart.view.form.LoginForm'],
initComponent : function() {
this.buttons = [
{text: 'login',action: 'winlogin'},
{text: 'reset',action: 'winreset'}
];
this.items = [
{xtype: 'loginform'}
];
this.callParent(arguments);
}
});