]>
git.proxmox.com Git - sencha-touch.git/blob - src/examples/direct/form.js
13 Ext
.direct
.Manager
.addProvider(Ext
.app
.REMOTING_API
);
18 defaultType
: 'textfield',
19 paramOrder
: ['uid', 'foo'],
21 load
: 'Profile.getBasicInfo',
22 submit
: 'Profile.updateBasicInfo'
40 defaultType
: 'button',
50 handler: function(button
) {
51 var form
= button
.up('formpanel');
58 Ext
.Msg
.alert('Success', 'Form loaded successfully');
60 failure: function(form
, result
, response
) {
61 var errors
= response
.errors
,
65 for (name
in errors
) {
66 if (errors
.hasOwnProperty(name
)) {
69 ret
.push(name
+ ': ' + error
);
73 Ext
.Msg
.alert('Failure', ret
.join('<br />'));
82 handler: function(button
) {
83 var form
= button
.up('formpanel');
87 Ext
.Msg
.alert('Success', 'Form submit successful');
89 failure: function(form
, result
, response
) {
90 var errors
= response
.errors
,
94 for (name
in errors
) {
95 if (errors
.hasOwnProperty(name
)) {
98 ret
.push(name
+ ': ' + error
);
102 Ext
.Msg
.alert('Failure', ret
.join('<br />'));