GZGQ.COM
welcome to my space
X
Search:  
 HOME   Trouble rendering comboboxes added in Panel sub-class.
Trouble rendering comboboxes added in Panel sub-class.
Published by: rose 2009-01-08
Welcome to:gzgq.com

  • hi,

    i'm just learning how to extend Ext classes.
    i am having trouble with the one included below. in onStoreLoad() the comboboxes are added to the panel as expected. but the problem is that they disregard the tablelayout of the panel they are added to. is there some other way to do this?
    thanks.

    LT



    Application.ClientCheckBoxGroup = Ext.extend(Ext.Panel, {
    Macopinion::
    And I added RAM to 768 MB. with a 160GB drive in my MacBook, the Air would be a step back Id have trouble For the high-class market it was going for,
    http://www.macopinion.com/index.php/site/more/ heaven_caoore@applelinks.com/P120/
    HOME
    irclogs.ubuntu.com/2008/02/19/#kubuntu.txt::
    [ 00:25] <unagi_> sub[t]rnl: i didnt have zaxismapping so i added it with 6 and 7, anyone had trouble ripping Led Zeppelins you mean the whole panel?
    http://irclogs.ubuntu.com/2008/02/19/#kubuntu.txt
    HOME

    initComponent:function() {

    Application.ClientCheckBoxGroup.superclass.initCom ponent.apply(this, arguments);

    this.store = new Application.PartyStore({baseParams: {roleName: this.roleName}});

    this.store.on({
    load: { fn: this.onStoreLoad, scope: this },
    loadexception: { fn: this.onStoreLoadException, scope: this }
    });

    },

    onRender:function(ct, position) {
    Application.ClientCheckBoxGroup.superclass.onRende r.call(this, ct, position);
    this.add({
    xtype: 'panel'
    ,id: this.cbPanelId
    ,layout: 'table'
    ,layoutConfig: { columns: this.columns }
    //,items:
    Advogato - Recent Blog Entries::
    deposit to start using it, rendering this issue moot in the future? I set out this term to teach a CS class in the way I would have wanted it taught
    http://advogato.org/recentlog.html?thresh=4
    HOME
    });
    },

    load: function (p) {
    var _p = p {};
    this.store.load({
    params: _p
    });
    },

    onStoreLoad: function (store, records, params) {
    var cbPanel = this.getComponent(this.cbPanelId);
    for (var i = 0; i < records.length; i++) {
    var id = 'cb-' + records[i].id + '-' + Ext.id();
    var cb = new Ext.form.Checkbox({
    id: id,
    inputValue: records[i].id,
    name: this.cbGroupName,
    boxLabel: records[i].name,
    checked: false,
    width: 115,
    renderTo: cbPanel.el.child('.x-table-layout')
    })
    cbPanel.add(cb);
    }
    this.doLayout();
    },

    onStoreLoadException: function (httpProxy, dataObj, callbackArg) {
    showErrors(getResponseFailureErrors(callbackArg));
    },

    check: function (ids) {

    },

    roleName: '',

    columns: 3,

    cbGroupName: 'cb-group',

    store: null,

    cbPanelId: 'cb-panel-' + Ext.id()

    });

    Ext.reg('clientcheckboxgroup', Application.ClientCheckBoxGroup);

    ccbg = new Application.ClientCheckBoxGroup({
    renderTo: 'container'
    ,roleName: 'client'
    ,cbGroupName: 'clients'
    });

    ccbg.load();


  • Better would be to add panel with table layout to parent panel items (via xtype). Then you do not need to even think when it is rendered as Ext would take care.

    The whole point of this "pre-configured" classes technology is to leave as much job and decisions to Ext as possible. If you need to think: "Should I render my components from onRender or from afterRender?" then there is something wrong with the basic concept.

    Very good example of what I'm talking about is: http://examples.extjs.eu/?ex=compcomm

    Take a look at the source code.


  • Cool! Thanks, Saki!
    LT





  • Traditional University or MLM University? You Choose
    15 Questions to Ask Your Software Vendor

    You are looking at:gzgq.com's Trouble rendering comboboxes added in Panel sub-class., click gzgq.com to home
  • form baseparams help
  • messagebox promt value
  • css based navigation
  • the missing handler for json reader
  • drag n drop enabled grid prevents deselecting when all rows are selected
  • form validation masking in ext 1 0
  • how do i hide a grid
  • svn rev 93 ext all debug js problem
  • yahoo util dom equivalences
  • keep track of changes in editable grids
  • doctype in ie and editable grid problem
  • ie6 grid toolbar css problem
  • quicktips display question
  • treenode dragdrop partialy disabled when using custom uiprovider
  •  
  • json with ruby on rails
  • multilanguage support
  • grid selectionmodel selectall
  • sample of existing table to grid missing border
  • dynamically loading javascript
  • new validation message type side screenshot
  • loading sizing basicdialog
  • firebug
  • menu button event
  • why ie show the page is downloading something from www yui ext com
  • adding existing layout to layoutdialog
  • help filtering grid
  • update multiple datastores in one xhr request
  •  Homepage | Add to favorites | Contact us | Exchange links | LOGIN | Site map | 
    Copyright© 2008 gzgq.com        Site made:CFZ