Page 1 of 2 12 LastLast
Results 1 to 10 of 20

Thread: Remote Loading Items, Remote Checkbox Group Ext.ux.RemoteCheckboxGroup

  1. #1
    Sencha User
    Join Date
    Jan 2009
    Posts
    61

    Default Remote Loading Items, Remote Checkbox Group Ext.ux.RemoteCheckboxGroup

    I have been working on improving the remote checkbox group written collaboratiely by a few users on this forum. It works fairly well but when I call my refresh method (reload) it sometimes will do quirky things like duplicating the checkboxes or removing a checkbox or two. In addition to this quirkiness I am just not sure if my method is even the best way to do this. I am going to try and post a working example a little later today but I will post the code so forum members may revise and improve it, I feel that a remote loading checkbox group would be a great addition to the framework.

    Code:
    Ext.namespace("Ext.ux");
    Ext.ux.RemoteCheckboxGroup = Ext.extend(Ext.form.CheckboxGroup, {
        baseParams: null,
        url: '',
        defaultItems: [
            new Ext.form.Checkbox({
            xtype: 'checkbox',
            boxLabel: 'No Items',
            disabled: true
        })
            ],
        fieldId: 'id',
        fieldName: 'name',
        fieldLabel: 'boxLabel',
        fieldValue: 'inputValue',
        fieldChecked: 'checked',
        reader: null,
    
        //private
        initComponent: function () {
    
            this.addEvents(
            /**
             * @event add
             * Fires when a checkbox is added to the group
             * @param {Ext.form.CheckboxGroup} this
             * @param {object} chk The checkbox that was added.
             */
            'add',
            /**
             * @event beforeadd
             * Fires before a checkbox is added to the group
             * @param {Ext.form.CheckboxGroup} this
             * @param {object} chk The checkbox to be added.
             */
            'beforeadd',
            /**
             * @event load
             * Fires when a the group has finished loading (adding) new records
             * @param {Ext.form.CheckboxGroup} this
             */
            'load',
            /**
             * @event beforeremove
             * Fires before a checkbox is removed from the group
             * @param {Ext.form.CheckboxGroup} this
             * @param {object} chk The checkbox to be removed.
             */
            'beforeremove');
            
            Ext.ux.RemoteCheckboxGroup.superclass.initComponent.apply(this, arguments);
        },
    
        onRender: function (H, F) {
                    Ext.ux.RemoteCheckboxGroup.superclass.onRender.call(this, H, F);
                    this.reload();
        },
    
        reload: function () {
            this.items = this.defaultItems;
    
            if ((this.url != '') && (this.reader != null)) {
    
    
                this.removeAll(); //ensure we clear existing checkboxes
                cbObj = this; //save a reference to the checkboxgroup
                handleCB = function (responseObj) {
    
                    var response = Ext.decode(responseObj.responseText);
    
                    if (response.success) {
                        var data = cbObj.reader.readRecords(Ext.decode(responseObj.responseText));
    
                        var item;
                        var record;
                        var id, name, checked;
    
                        for (var i = 0; i < data.records.length; i++) {
                            record = data.records[i];
                            item = new Ext.form.Checkbox({
                                xtype: 'checkbox',
                                listeners: {
                                    'render': cbObj.cbRenderer
                                },
                                handler: cbObj.cbHandler,
                                boxLabel: record.get(cbObj.fieldLabel),
                                inputValue: record.get(cbObj.fieldValue)
                            });
    
                            if (cbObj.fieldId != '') {
                                item.id = record.get(cbObj.fieldId);
                            }
    
                            if (cbObj.fieldName != '') {
                                item.name = record.get(cbObj.fieldName);
                            }
    
                            if (cbObj.fieldChecked != '') {
                                item.checked = record.get(cbObj.fieldChecked);
                            }
    
                            if (record.get('disabled')) {
                                item.disabled = true;
                            }
    
                            if (cbObj.fireEvent('beforeadd', cbObj, item) !== false) {
                                var chk = cbObj.panel.getComponent(0).add(item);
                                cbObj.items[i] = chk;
                                cbObj.panel.getComponent(0).doLayout();
                                cbObj.fireEvent('add', cbObj, item);
                            }
                        }
                        Ext.ux.RemoteCheckboxGroup.superclass.onRender.call(cbObj, H, F);
                        cbObj.fireEvent('load', cbObj);
                    }
    
                }
    
            }
            var fail = function () {console.log("fail")};
    
            Ext.Ajax.request({
                headers: ['Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8'],
                method: 'POST',
                url: this.url,
                params: this.baseParams,
                success: handleCB,
                failure: fail
            });
        },
        removeAll: function () {
            cbObj = this;
            for (var j = 0; j < this.columns; j++) {
                if (cbObj.panel.getComponent(j).items.length > 0) {
                    cbObj.panel.getComponent(j).items.each(
    
                    function (i) {
                        if (cbObj.fireEvent('beforeremove', cbObj, i) !== false) {
                            i.destroy();
                        }
                    });
                }
            }
        },
        getGroupValue:function(){
            var valuesArray = [];
            for (var j = 0; j < this.columns; j++) {
                if (this.panel.getComponent(j).items.length > 0) {
                    this.panel.getComponent(j).items.each(
                        function (i) {
                            if (i.checked) {
                                valuesArray.push(i.inputValue);
                            }
                    });
                }
            }
            return valuesArray;
        }
        
    });
    Ext.reg("remotecheckboxgroup", Ext.ux.RemoteCheckboxGroup);
    To create an instance this would be the code:
    Code:
    new Ext.ux.RemoteCheckboxGroup({
       name: 'dsCheck',
       id:'checkbx',
       baseParams:{queryId:'1',mode:'id'},
       url:'serverfile.php',
       method:'post',
       reader: new Ext.data.JsonReader(
       {
        totalProperty: 'total',
         root: 'data',
         fields: [{name: 'name'}, {name: 'boxLabel'},{checked:'checked'}]
       }),
    cbRenderer:function(){},
    cbHandler:function(){},
    items:[{boxLabel:'Loading'},{boxLabel:'Loading'}],
       fieldId: 'name',
       fieldName: 'name',
       fieldLabel: 'boxLabel',
       fieldValue: 'name',
       fieldChecked: 'checked'
    });

  2. #2
    Ext JS Premium Member
    Join Date
    Mar 2007
    Posts
    32

    Default

    It appears that there is a bug in the removeAll method. The first for loop was not checking the size of the array properly. Here is an update
    Code:
    for (var j = 0; j < cbObj.columns.length; j++) {
                if (cbObj.panel.getComponent(j).items.length > 0) {
                    cbObj.panel.getComponent(j).items.each(function(i){
                        if (cbObj.fireEvent('beforeremove', cbObj, i) !== false) {
                            i.destroy();
                        }
                    });
                }
            }

  3. #3
    Sencha User
    Join Date
    Jan 2009
    Posts
    61

    Default Added your change

    I have added your change and it was a good catch! I have also added a loadmask that is configurable to some extent. Does anyone else have any ideas?

    Code:
    Ext.namespace("Ext.ux");
    Ext.ux.RemoteCheckboxGroup = Ext.extend(Ext.form.CheckboxGroup, {
        baseParams: null,
        url: '',
        defaultItems: [
        new Ext.form.Checkbox(
        {
            xtype: 'checkbox',
            boxLabel: 'No Items',
            disabled: true
        })],
        fieldId: 'id',
        fieldName: 'name',
        fieldLabel: 'boxLabel',
        fieldValue: 'inputValue',
        fieldChecked: 'checked',
        reader: null,
    
        //private
        initComponent: function ()
        {
    
            this.addEvents(
            /**
             * @event add
             * Fires when a checkbox is added to the group
             * @param {Ext.form.CheckboxGroup} this
             * @param {object} chk The checkbox that was added.
             */
            'add',
            /**
             * @event beforeadd
             * Fires before a checkbox is added to the group
             * @param {Ext.form.CheckboxGroup} this
             * @param {object} chk The checkbox to be added.
             */
            'beforeadd',
            /**
             * @event load
             * Fires when a the group has finished loading (adding) new records
             * @param {Ext.form.CheckboxGroup} this
             */
            'load',
            /**
             * @event beforeremove
             * Fires before a checkbox is removed from the group
             * @param {Ext.form.CheckboxGroup} this
             * @param {object} chk The checkbox to be removed.
             */
            'beforeremove');
    
            Ext.ux.RemoteCheckboxGroup.superclass.initComponent.apply(this, arguments);
        },
    
        onRender: function ()
        {
            Ext.ux.RemoteCheckboxGroup.superclass.onRender.apply(this, arguments);
            if (this.showMask)
            {
                this.loadmask = new Ext.LoadMask(this.ownerCt.getEl(), {
                    msg: "Loading..."
                });
            }
            this.reload();
        },
    
        reload: function ()
        {
            this.items = this.defaultItems;
    
            if ((this.url != '') && (this.reader != null))
            {
    
    
                this.removeAll(); //ensure we clear existing checkboxes
                if (this.showMask)
                {
                    this.loadmask.show();
                }
                cbObj = this; //save a reference to the checkboxgroup
                handleCB = function (responseObj)
                {
    
                    var response = Ext.decode(responseObj.responseText);
    
                    if (response.success)
                    {
                        var data = cbObj.reader.readRecords(Ext.decode(responseObj.responseText));
    
                        var item;
                        var record;
                        var id, name, checked;
    
                        for (var i = 0; i < data.records.length; i++)
                        {
                            record = data.records[i];
                            item = new Ext.form.Checkbox(
                            {
                                xtype: 'checkbox',
                                listeners: {
                                    'render': cbObj.cbRenderer
                                },
                                handler: cbObj.cbHandler,
                                boxLabel: record.get(cbObj.fieldLabel),
                                inputValue: record.get(cbObj.fieldValue)
                            });
    
                            if (cbObj.fieldId != '')
                            {
                                item.id = record.get(cbObj.fieldId);
                            }
    
                            if (cbObj.fieldName != '')
                            {
                                item.name = record.get(cbObj.fieldName);
                            }
    
                            if (cbObj.fieldChecked != '')
                            {
                                item.checked = record.get(cbObj.fieldChecked);
                            }
    
                            if (record.get('disabled'))
                            {
                                item.disabled = true;
                            }
    
                            if (cbObj.fireEvent('beforeadd', cbObj, item) !== false)
                            {
                                var chk = cbObj.panel.getComponent(0).add(item);
                                cbObj.items[i] = chk;
                                cbObj.panel.getComponent(0).doLayout();
                                cbObj.fireEvent('add', cbObj, item);
                            }
                        }
    
                        cbObj.fireEvent('load', cbObj);
                    }
                    if (cbObj.showMask)
                    {
                        cbObj.loadmask.hide();
                    }
                }
    
            }
            var fail = function ()
            {
                console.log("fail")
            };
    
            Ext.Ajax.request(
            {
                headers: ['Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8'],
                method: 'POST',
                url: this.url,
                params: this.baseParams,
                success: handleCB,
                failure: fail
            });
        },
        removeAll: function ()
        {
            cbObj = this;
            for (var j = 0; j < this.columns.length; j++)
            {
                if (cbObj.panel.getComponent(j).items.length > 0)
                {
                    cbObj.panel.getComponent(j).items.each(
    
                    function (i)
                    {
                        if (cbObj.fireEvent('beforeremove', cbObj, i) !== false)
                        {
                            i.destroy();
                        }
                    });
                }
            }
        },
        getGroupValue: function ()
        {
            var valuesArray = [];
            for (var j = 0; j < this.columns; j++)
            {
                if (this.panel.getComponent(j).items.length > 0)
                {
                    this.panel.getComponent(j).items.each(
    
                    function (i)
                    {
                        if (i.checked)
                        {
                            valuesArray.push(i.inputValue);
                        }
                    });
                }
            }
            return valuesArray;
        }
    
    });
    Ext.reg("remotecheckboxgroup", Ext.ux.RemoteCheckboxGroup);

  4. #4

    Default

    hi bartonjd:
    it can not be distributed based on the value of vertical. i have set columns:6 ;

    sorry,my english is poor~~

  5. #5

    Default

    hi all,

    how to implement this extension in extjs?
    where do I save these files?
    Regards,
    shahrzad

  6. #6

    Default Multiple RemoteCheckboxGroups

    Thanks for the extension! I had to make a slight change to the reload method allow for multiple RemoteCheckboxGroups in the same form.

    Code:
    reload: function ()
        {
            this.items = [
                    new Ext.form.Checkbox(
            	    {
            	        xtype: 'checkbox',
            	        boxLabel: 'No Items',
            	        disabled: true
            	    })];
    
            if ((this.url != '') && (this.reader != null))
            {
            	this.removeAll(); 
                if (this.showMask)
                {
                    this.loadmask.show();
                }
               
                handleCB = function (responseObj, options)
                {
                	var response = Ext.decode(responseObj.responseText);
    
                    if (response.success)
                    {
                        var data = this.reader.readRecords(Ext.decode(responseObj.responseText));
                        for (var i = 0; i < data.records.length; i++)
                        {
                            var record = data.records[i];
                            var item = new Ext.form.Checkbox(
                            {
                                xtype: 'checkbox',
                                listeners: {
                                    'render': this.cbRenderer
                                },
                                handler: this.cbHandler,
                                boxLabel: record.get(this.cbfieldLabel),
                                inputValue: record.get(this.fieldValue)
                            });
    
                            if (this.fieldId != '')
                            {
                                item.id = record.get(this.fieldId);
                            }
    
                            if (this.fieldName != '')
                            {
                                item.name = record.get(this.fieldName);
                            }
    
                            if (this.fieldChecked != '')
                            {
                                item.checked = record.get(this.fieldChecked);
                            }
    
                            if (record.get('disabled'))
                            {
                                item.disabled = true;
                            }
    
                            if (this.fireEvent('beforeadd', this, item) !== false)
                            {
                            	var chk = this.panel.getComponent(0).add(item);
                                this.items[i] = chk;
                                this.panel.getComponent(0).doLayout();                        	 
                            	
                                this.fireEvent('add', this, item);
                            }
                        }
    
                        this.fireEvent('load', this);
                    }
                    if (this.showMask)
                    {
                    	this.loadmask.hide();
                    }
                }
    
            }
            var fail = function ()
            {
                console.log("fail")
            };
    
            Ext.Ajax.request(
            {
                headers: ['Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8'],
                method: 'POST',
                url: this.url,
                params: this.baseParams,
                success: handleCB,
                failure: fail,
                scope: this
            });
        }

  7. #7

    Default

    I think there is a bug in the loop that adds the checkboxes to the checkboxgroup that prevents the checkboxes to be in different columns. If you try and set the 'columns' parameter when instantiating your RemoteCheckboxGroup object, it will always be displayed in a single column no matter the value you entered.

    if you look closely at the code that is generated by a checkboxGroup, each checkbox is put in a seperate component while the RemoteCheckboxGroup class puts them all in the same component;

    Code:
    if (this.fireEvent('beforeadd', this, item) !== false) 
    {
         var chk = this.panel.getComponent(0).add(item);
         this.items[i] = chk;
         this.panel.getComponent(0).doLayout();     
                            
         this.fireEvent('add', this, item);
    }
    Shouldn't the panel contains multiple components that themselves contain the different checkboxes?

  8. #8

    Default Adding checkboxes

    Good catch, I actually changed that code:

    Code:
                          if (this.fireEvent('beforeadd', this, item) !== false)
                          {
                                var items = this.items;
                                var columns = this.panel.items;
                                var column = columns.itemAt(items.getCount() % columns.getCount());
                                var chk = column.add(item);
                                items.add(item);
                                this.doLayout();
                            	
                                this.fireEvent('add', this, item);
                           }
    My entire reload and removeAll functions:

    Code:
        reload: function ()
        {
            if ((this.url != '') && (this.reader != null))
            {
                this.removeAll(); 
                if (this.showMask)
                {
                    this.loadmask.show();
                }
               
                handleCB = function (responseObj, options)
                {
                	var response = Ext.decode(responseObj.responseText);
    
                    if (response.success)
                    {
                        var data = this.reader.readRecords(Ext.decode(responseObj.responseText));
                        for (var i = 0; i < data.records.length; i++)
                        {
                            var record = data.records[i];
                            var item = new Ext.form.Checkbox(
                            {
                                xtype: 'checkbox',
                                listeners: {
                                    'render': this.cbRenderer
                                },
                                boxLabel: record.get(this.cbfieldLabel),
                                inputValue: record.get(this.fieldValue)
                            });
    
                            if (this.fieldId != '')
                            {
                                item.id = record.get(this.fieldId);
                            }
    
                            if (this.fieldName != '')
                            {
                                item.name = record.get(this.fieldName);
                            }
    
                            if (this.fieldChecked != '')
                            {
                                item.checked = record.get(this.fieldChecked);
                            }
    
                            if (record.get('disabled'))
                            {
                                item.disabled = true;
                            }
    
                            item.on('check', this.cbHandler, this.cbHandlerScope ? this.cbHandlerScope : this, {buffer: 10});
                            
                            if (this.fireEvent('beforeadd', this, item) !== false)
                            {
                                var items = this.items;
                                var columns = this.panel.items;
                                var column = columns.itemAt(items.getCount() % columns.getCount());
                                var chk = column.add(item);
                                items.add(item);
                                this.doLayout();
                            	
                                this.fireEvent('add', this, item);
                            }
                        }
    
                        this.fireEvent('load', this);
                    }
                    if (this.showMask)
                    {
                    	this.loadmask.hide();
                    }
                }
    
            }
           
            Ext.Ajax.request(
            {
                headers: ['Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8'],
                method: 'POST',
                url: this.url,
                params: this.baseParams,
                success: handleCB,
                failure: fail,
                scope: this
            });
        },
        removeAll: function ()
        {
        	for (var j = 0; j < this.columns.length; j++)
            {
               if (this.panel.items.length > 0)
        		{
                	var items = this.items;
                	var columns = this.panel.items;
                	var column = columns.itemAt(items.getCount() % columns.getCount());
                	                
                	column.items.each(
                	
                    function (i)
                    {
                        if (this.fireEvent('beforeremove', this, i) !== false)
                        {
                            var items = this.items;
                        	var columns = this.panel.items;
                        	var column = columns.itemAt(items.getCount() % columns.getCount());
                            
                            var chk = column.remove(i);
                            items.remove(i);
                        }
                    }, this);
                }
            }
        }
    I am not using the getGroupValue method, so I didn't make any changes there. I am sure it will need to be redone as well. I also changed the member variable fieldLabel to cbFieldLabel, so as not to interfere with the CheckboxGroup's fieldLabel field.

  9. #9

    Default re

    Thanks for the help!

    Actually, the code you posted don't seem to take care of the 'vertical' value that can be passed to the RemoteCheckboxGroup. I may be missing something though!

    I came up with that - temporary - fix in a hurry since we are in a rush, I'm pretty sure it could get some more work...

    Code:
    var colPos = 0;
    if(this.vertical) {
         colPos = Math.ceil((i+1)/(Math.ceil(data.records.length/this.columns.length)))-1;
    }else{
         var mod = ((i+1)%this.columns.length)
         colPos = mod-1;
         if(mod == 0)
             colPos = this.columns.length-1;
    }
    
    if (cbObj.fireEvent('beforeadd', cbObj, item) !== false) {
         var chk = cbObj.panel.getComponent(colPos).add(item);
         cbObj.items[i] = chk;
         cbObj.panel.getComponent(colPos).doLayout();
         cbObj.fireEvent('add', cbObj, item);
    }
    Let me know if I'm wrong!

    Thanks.

  10. #10
    Ext JS Premium Member
    Join Date
    Jul 2007
    Posts
    65

    Default

    Quote Originally Posted by akaemi View Post
    Good catch, I actually changed that code:

    Code:
                          if (this.fireEvent('beforeadd', this, item) !== false)
                          {
                                var items = this.items;
                                var columns = this.panel.items;
                                var column = columns.itemAt(items.getCount() % columns.getCount());
                                var chk = column.add(item);
                                items.add(item);
                                this.doLayout();
                            	
                                this.fireEvent('add', this, item);
                           }
    My entire reload and removeAll functions:

    Code:
        reload: function ()
        {
            if ((this.url != '') && (this.reader != null))
            {
                this.removeAll(); 
                if (this.showMask)
                {
                    this.loadmask.show();
                }
               
                handleCB = function (responseObj, options)
                {
                	var response = Ext.decode(responseObj.responseText);
    
                    if (response.success)
                    {
                        var data = this.reader.readRecords(Ext.decode(responseObj.responseText));
                        for (var i = 0; i < data.records.length; i++)
                        {
                            var record = data.records[i];
                            var item = new Ext.form.Checkbox(
                            {
                                xtype: 'checkbox',
                                listeners: {
                                    'render': this.cbRenderer
                                },
                                boxLabel: record.get(this.cbfieldLabel),
                                inputValue: record.get(this.fieldValue)
                            });
    
                            if (this.fieldId != '')
                            {
                                item.id = record.get(this.fieldId);
                            }
    
                            if (this.fieldName != '')
                            {
                                item.name = record.get(this.fieldName);
                            }
    
                            if (this.fieldChecked != '')
                            {
                                item.checked = record.get(this.fieldChecked);
                            }
    
                            if (record.get('disabled'))
                            {
                                item.disabled = true;
                            }
    
                            item.on('check', this.cbHandler, this.cbHandlerScope ? this.cbHandlerScope : this, {buffer: 10});
                            
                            if (this.fireEvent('beforeadd', this, item) !== false)
                            {
                                var items = this.items;
                                var columns = this.panel.items;
                                var column = columns.itemAt(items.getCount() % columns.getCount());
                                var chk = column.add(item);
                                items.add(item);
                                this.doLayout();
                            	
                                this.fireEvent('add', this, item);
                            }
                        }
    
                        this.fireEvent('load', this);
                    }
                    if (this.showMask)
                    {
                    	this.loadmask.hide();
                    }
                }
    
            }
           
            Ext.Ajax.request(
            {
                headers: ['Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8'],
                method: 'POST',
                url: this.url,
                params: this.baseParams,
                success: handleCB,
                failure: fail,
                scope: this
            });
        },
        removeAll: function ()
        {
        	for (var j = 0; j < this.columns.length; j++)
            {
               if (this.panel.items.length > 0)
        		{
                	var items = this.items;
                	var columns = this.panel.items;
                	var column = columns.itemAt(items.getCount() % columns.getCount());
                	                
                	column.items.each(
                	
                    function (i)
                    {
                        if (this.fireEvent('beforeremove', this, i) !== false)
                        {
                            var items = this.items;
                        	var columns = this.panel.items;
                        	var column = columns.itemAt(items.getCount() % columns.getCount());
                            
                            var chk = column.remove(i);
                            items.remove(i);
                        }
                    }, this);
                }
            }
        }
    I am not using the getGroupValue method, so I didn't make any changes there. I am sure it will need to be redone as well. I also changed the member variable fieldLabel to cbFieldLabel, so as not to interfere with the CheckboxGroup's fieldLabel field.
    I think I have all of your code implemented correctly. I am getting an error with the following line in the reload method:

    Code:
    this.doLayout();
    Error:

    Code:
    Uncaught TypeError: Object [object Object] has no method 'doLayout'
    I put a break on that line and "this" does refer to the RemoteCheckBox var that I created earlier:

    Code:
    			dsLanguages = new Ext.ux.RemoteCheckboxGroup({
    				xtype : 'remotecheckboxgroup',
    				name: 'dsLanguages',
    				hideLabel: true,
    				//columns: 2,
    				//vertical: true,
    				id: 'language',
    				url: '/ajax/get_cm_lang_codes.do',
    				method: 'post',
    				baseParams: {site_id: '<c:out value="${requestScope.site_id}"/>'},
    				reader: new Ext.data.JsonReader(
    				{
    				  totalProperty: 'totalProperty',
    				  root: 'data',
    				  fields: [{name: 'id'}, {name: 'label'}, {name: 'is_checked'}, {name: 'inputValue'}]
    				}),
    				cbRenderer:function(){},
    				cbHandler:function(){},
    				items:[{boxLabel:'Loading'},{boxLabel:'Loading'}],
    				fieldId: 'inputValue',
    				fieldName: 'inputValue',
    				fieldLabel: 'label',
    				fieldValue: 'id',
    				fieldChecked: 'is_checked'
    			});
    And then put that in a FormPanel:

    Code:
    					var edit_form = new Ext.FormPanel({
    					    labelAlign: 'top',
    					    id: 'html_editor',
    					    waitMsgTarget: true,
    					    frame:true,
    					    title: 'Edit HTML for this section',
    					    //bodyStyle:'padding:5px 5px 0',
    					    width: 800,
    					    items: [
    							dsLanguages
    						,
    ...............
    And then that in a window that I show:

    Code:
    					if(!edit_form_window){
    						edit_form_window = new Ext.Window({
    					        id     : 'myWin',
    					        height : 600,
    					        width  : 800	,
    					        items  : [edit_form]
    					    });
    					}
    Anu clue why that error is coming up? I am using EXT JS 2.3 and doLayout is in the API, I checked. Just not sure what I am doing wrong, any help would be greatly appreciated.

    JJ

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •