4 'Ext.tip.QuickTipManager',
5 'Ext.layout.container.Accordion'
8 Ext.onReady(function(){
10 * Notice that Direct requests will batch together if they occur
11 * within the enableBuffer delay period (in milliseconds).
12 * Slow the buffering down from the default of 10ms to 100ms
14 Ext.app.REMOTING_API.enableBuffer = 100;
15 Ext.direct.Manager.addProvider(Ext.app.REMOTING_API);
17 // provide feedback for any errors
18 Ext.tip.QuickTipManager.init();
20 var basicInfo = Ext.create('Ext.form.Panel', {
21 // configs for FormPanel
22 title: 'Basic Information',
25 // configs for BasicForm
27 // The server-side method to call for load() requests
28 load: Profile.getBasicInfo,
29 // The server-side must mark the submit handler as a 'formHandler'
30 submit: Profile.updateBasicInfo
32 // specify the order for the passed params
33 paramOrder: ['uid', 'foo'],
38 style: 'margin: 0 5px 5px 0;',
42 basicInfo.getForm().submit({
51 defaultType: 'textfield',
63 fieldLabel: 'Company',
68 var phoneInfo = Ext.create('Ext.form.Panel', {
69 title: 'Phone Numbers',
72 load: Profile.getPhoneInfo
76 defaultType: 'textfield',
92 var locationInfo = Ext.create('Ext.form.Panel', {
93 title: 'Location Information',
97 load: Profile.getLocationInfo
100 defaultType: 'textfield',
105 fieldLabel: 'Street',
119 var accordion = Ext.create('Ext.panel.Panel', {
121 renderTo: Ext.getBody(),
125 items: [basicInfo, phoneInfo, locationInfo]
128 // load the forms (notice the load requests will get batched together)
129 basicInfo.getForm().load({
130 // pass 2 arguments to server side getBasicInfo method (len=2)
137 phoneInfo.getForm().load({
143 // defer this request just to simulate the request not getting batched
144 // since it exceeds to configured buffer
145 Ext.Function.defer(function(){
146 locationInfo.getForm().load({
154 TestAction.doEcho('sample');