1. #1
    Ext JS Premium Member Artistan's Avatar
    Join Date
    Apr 2007
    Location
    MN
    Posts
    144
    Vote Rating
    0
    Artistan is on a distinguished road

      0  

    Exclamation Direct Form: API Submit

    Direct Form: API Submit


    setting an api.submit value does not seem to work. I keep getting an error.
    Code:
    uncaught  exception: [Exception... "Component returned failure code: 0x80070057  (NS_ERROR_ILLEGAL_VALUE) [nsIXMLHttpRequest.open]"  nsresult:  "0x80070057 (NS_ERROR_ILLEGAL_VALUE)"  location: "JS frame ::  http://extadmin2.zenddev.net/js/ext-3.2.1/adapter/ext/ext-base.js :: i  :: line 7"  data: no]
    my container panel has this...
    Code:
        saveNote: function(){
            try{
                var x_form = this.form.getForm();
                var tab = this.tabs.getActiveTab();
                //x_form.baseParams = tab.store.baseParams;
                console.log(x_form);
                x_form.submit({waitMsg:'Saving Data...'});
                
            } catch(e) {
                console.log(e,this);
            }
        },
    notice i commented out the override of the baseparams.
    when I inspect the logged form the baseparams, api, and paramOrder are NOT set and I have no idea what is up.

    where is the code generated by designer.

    Code:
    /*
     * File: BenAdmin.formpanel.companynotes.ui.js
     * Date: Tue Aug 24 2010 10:11:24 GMT-0500 (Central Daylight Time)
     * 
     * This file was generated by Ext Designer version xds-1.0.2.11.
     * http://www.extjs.com/products/designer/
     *
     * This file will be auto-generated each and everytime you export.
     *
     * Do NOT hand edit this file.
     */
    
    Ext.ns('BenAdmin.formpanel');
    BenAdmin.formpanel.companynotesUi = Ext.extend(Ext.form.FormPanel, {
        title: 'Create Note',
        width: 310,
        collapsible: true,
        defaultType: 'textfield',
        autoScroll: true,
        padding: 10,
        frame: true,
        waitTitle: 'Processing Request...',
        initComponent: function() {
            this.defaults = {
                "width": 166
            };
            this.paramOrder = [
                't_ticket_type',
                'compid',
                'sitename'
            ];
            this.baseParams = {
                t_ticket_type: "1",
                compid: "2",
                sitename: "3"
            };
            this.api = {
                submit: BenAdmin.DirectAPI.mod_Support_Notes.update
            };
            this.items = [
                {
                    xtype: 'textfield',
                    fieldLabel: 'Call Back',
                    name: 'callback'
                },
                {
                    xtype: 'textarea',
                    anchor: '100%',
                    fieldLabel: 'Notes',
                    name: 'tn_note'
                },
                {
                    xtype: 'textfield',
                    fieldLabel: 'Minutes',
                    name: 'tn_work_minutes',
                    inputType: 'numeric',
                    value: 5
                }
            ];
            this.fbar = {
                xtype: 'toolbar',
                items: [
                    {
                        xtype: 'button',
                        text: 'Save',
                        iconCls: 'icn-save',
                        ref: '../save'
                    }
                ]
            };
            BenAdmin.formpanel.companynotesUi.superclass.initComponent.call(this);
        }
    });

  2. #2
    Ext JS Premium Member Artistan's Avatar
    Join Date
    Apr 2007
    Location
    MN
    Posts
    144
    Vote Rating
    0
    Artistan is on a distinguished road

      0  

    Default


    Tried this with same result.
    Help would be appreciated.

    Code:
    /*
     * File: BenAdmin.formpanel.companynotes.ui.js
     * Date: Tue Aug 24 2010 10:11:24 GMT-0500 (Central Daylight Time)
     * 
     * This file was generated by Ext Designer version xds-1.0.2.11.
     * http://www.extjs.com/products/designer/
     *
     * This file will be auto-generated each and everytime you export.
     *
     * Do NOT hand edit this file.
     */
    
    Ext.ns('BenAdmin.formpanel');
    BenAdmin.formpanel.companynotesUi = Ext.extend(Ext.form.FormPanel, {
        title: 'Create Note',
        width: 310,
        collapsible: true,
        defaultType: 'textfield',
        autoScroll: true,
        padding: 10,
        frame: true,
        waitTitle: 'Processing Request...',
        defaults: {
                    "width": 166
            },
        api: {
                    submit: BenAdmin.DirectAPI.mod_Support_Notes.update
            },
        paramOrder: [
                    't_ticket_type',
                    'compid',
                    'sitename'
            ],
        baseParams: {
                    t_ticket_type: "1",
                    compid: "2",
                    sitename: "3"
            },
        initComponent: function() {
            this.items = [
                {
                    xtype: 'textfield',
                    fieldLabel: 'Call Back',
                    name: 'callback'
                },
                {
                    name: 'tn_employee',
                    fieldLabel: 'Employee',
                    xtype: 'benadmin_combo_supportemployee'
                },
                {
                    name: 'tn_priority',
                    fieldLabel: 'Priority',
                    xtype: 'benadmin_combo_supportpriority'
                },
                {
                    xtype: 'textarea',
                    anchor: '100%',
                    fieldLabel: 'Notes',
                    name: 'tn_note'
                },
                {
                    xtype: 'textfield',
                    fieldLabel: 'Minutes',
                    name: 'tn_work_minutes',
                    inputType: 'numeric',
                }
            ];
            this.fbar = {
                xtype: 'toolbar',
                items: [
                    {
                        xtype: 'button',
                        text: 'Save',
                        iconCls: 'icn-save',
                        ref: '../save'
                    }
                ]
            };
            BenAdmin.formpanel.companynotesUi.superclass.initComponent.call(this);
        }
    });

  3. #3
    Sencha - Desktop Packager Dev Team jarrednicholls's Avatar
    Join Date
    Mar 2007
    Location
    Frederick, MD
    Posts
    1,747
    Vote Rating
    7
    jarrednicholls will become famous soon enough jarrednicholls will become famous soon enough

      0  

    Default


    Hi Artisan,

    This is an open ticket #197 for components that are configured via initialConfig, such as FormPanel & BasicForm. It will be corrected with the next maintenance release. Thanks.

Similar Threads

  1. Direct+Grid+FORM API ok now?
    By khebs@live.com in forum Ext.Direct
    Replies: 0
    Last Post: 9 Feb 2010, 10:21 AM
  2. api submit form
    By maren in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 2 Nov 2009, 12:22 AM
  3. Ext.Direct form submit without formHandler
    By scottpenrose in forum Ext.Direct
    Replies: 2
    Last Post: 10 Sep 2009, 12:16 AM
  4. Replies: 0
    Last Post: 22 Aug 2009, 1:35 AM
  5. Server API for form submit? (and info on actions)
    By j1m in forum Ext 1.x: Help & Discussion
    Replies: 3
    Last Post: 28 Aug 2007, 1:24 PM

Thread Participants: 1

Tags for this Thread