3 This file is part of Ext JS 4
5 Copyright (c) 2011 Sencha Inc
7 Contact: http://www.sencha.com/contact
9 GNU General Public License Usage
10 This file may be used under the terms of the GNU General Public License version 3.0 as published by the Free Software Foundation and appearing in the file LICENSE included in the packaging of this file. Please review the following information to ensure the GNU General Public License version 3.0 requirements will be met: http://www.gnu.org/copyleft/gpl.html.
12 If you are unsure which license is appropriate for your use, please contact the sales department at http://www.sencha.com/contact.
18 'Ext.tip.QuickTipManager',
19 'Ext.layout.container.Accordion'
22 Ext.onReady(function(){
24 * Notice that Direct requests will batch together if they occur
25 * within the enableBuffer delay period (in milliseconds).
26 * Slow the buffering down from the default of 10ms to 100ms
28 Ext.app.REMOTING_API.enableBuffer = 100;
29 Ext.direct.Manager.addProvider(Ext.app.REMOTING_API);
31 // provide feedback for any errors
32 Ext.tip.QuickTipManager.init();
34 var basicInfo = Ext.create('Ext.form.Panel', {
35 // configs for FormPanel
36 title: 'Basic Information',
39 // configs for BasicForm
41 // The server-side method to call for load() requests
42 load: Profile.getBasicInfo,
43 // The server-side must mark the submit handler as a 'formHandler'
44 submit: Profile.updateBasicInfo
46 // specify the order for the passed params
47 paramOrder: ['uid', 'foo'],
52 style: 'margin: 0 5px 5px 0;',
56 basicInfo.getForm().submit({
65 defaultType: 'textfield',
77 fieldLabel: 'Company',
82 var phoneInfo = Ext.create('Ext.form.Panel', {
83 title: 'Phone Numbers',
86 load: Profile.getPhoneInfo
90 defaultType: 'textfield',
106 var locationInfo = Ext.create('Ext.form.Panel', {
107 title: 'Location Information',
111 load: Profile.getLocationInfo
114 defaultType: 'textfield',
119 fieldLabel: 'Street',
133 var accordion = Ext.create('Ext.panel.Panel', {
135 renderTo: Ext.getBody(),
139 items: [basicInfo, phoneInfo, locationInfo]
142 // load the forms (notice the load requests will get batched together)
143 basicInfo.getForm().load({
144 // pass 2 arguments to server side getBasicInfo method (len=2)
151 phoneInfo.getForm().load({
157 // defer this request just to simulate the request not getting batched
158 // since it exceeds to configured buffer
159 Ext.Function.defer(function(){
160 locationInfo.getForm().load({
168 TestAction.doEcho('sample');