FormPanel Item Focus and Action Call
I am quite new in EXTJS, I am looking to set focus on item created in FormPanel but unable to findout how and also on click of `login` button like to call java action, could any one assist on based requirement of any forms.
Cheers,
HI
/***********************************
** Date : 08-10-07
** Version : 0.1
** Created By : Hiren Shah
** Last Modification Date : 08-10-07
** Description : Login Form with User Name, Password &
************************************/
Ext.onReady(function() {
var loginForm = new Ext.form.FormPanel({
baseCls: 'x-plain',
bodyStyle:'padding:5px 5px 0',
labelWidth: 65,
defaultType: 'textfield',
items: [{
fieldLabel: 'User name',
name: 'username',
id: 'username',
allowBlank: false,
anchor:'100%'
},{
fieldLabel: 'Password',
inputType: 'password',
name:'userPassword',
id: 'userPassword',
anchor: '100%'
}]
});
var loginWindow = new Ext.Window({
title: 'User Authentication',
width: '225',
autoHeight : true,
plain:true,
bodyStyle:'padding:5px;',
buttonAlign:'center',
closable: false,
collapsible: false,
resizable: false,
modal: false,
items: loginForm,
buttons: [{
text: 'Login'
},{
text: 'Clear'
}]
});
loginWindow.show();
$(window).resize(function() {loginWindow.center()});
});
#If you have any other info about this subject , Please add it free.# |

