254 ◾ PhoneGap Build
]
},
{
xtype: 'button',
id: 'loginButton',
margin: '25 auto 0 auto ',
style: '',
maxWidth: 200,
ui: 'action',
width: '',
iconCls: 'user',
iconMask: true,
text: 'Login',
action: 'login'
}
]
}
});
We can see that the Ext.form.FormPanel class is extended to create a form panel with
the ID loginFormPanel. e title assigned to the form is loginFormPanel. In the form, a
text field is defined with the name username, a password field is defined with the name pass-
word, and a button is defined with the ID loginButton. e text displayed on the button
is Login, and its action value is set to login. When the button is clicked, the action and its
assigned value are passed to the controller to perform the desired task.
It is now time to de ...