X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/0494b8d9b9bb03ab6c22b34dae81261e3cd7e3e6..7a654f8d43fdb43d78b63d90528bed6e86b608cc:/examples/direct/named-arguments.js?ds=sidebyside diff --git a/examples/direct/named-arguments.js b/examples/direct/named-arguments.js new file mode 100644 index 00000000..9807dce1 --- /dev/null +++ b/examples/direct/named-arguments.js @@ -0,0 +1,47 @@ +Ext.require([ + 'Ext.direct.*', + 'Ext.form.Panel', + 'Ext.form.field.Text', + 'Ext.form.field.Number' +]); + +Ext.onReady(function(){ + Ext.direct.Manager.addProvider(Ext.app.REMOTING_API); + + var form = Ext.create('Ext.form.Panel', { + width: 300, + height: 130, + renderTo: document.body, + bodyPadding: 5, + items: [{ + xtype: 'textfield', + fieldLabel: 'First Name', + name: 'firstName', + value: 'Evan' + }, { + xtype: 'textfield', + fieldLabel: 'Last Name', + name: 'lastName', + value: 'Trimboli' + }, { + xtype: 'numberfield', + fieldLabel: 'Age', + name: 'age', + value: 25 + }], + dockedItems: [{ + dock: 'bottom', + ui: 'footer', + xtype: 'toolbar', + items: ['->', { + text: 'Send', + handler: function(){ + var values = form.getForm().getValues(); + TestAction.showDetails(values, function(value){ + Ext.example.msg('Server Response', value); + }); + } + }] + }] + }); +});