Results 1 to 3 of 3

Thread: Reusing some common cofigs

  1. #1

    Default Reusing some common cofigs

    Hi.

    I am using 3 combo boxes in my project as follows:

    xtype: 'combo',
    width:150,
    id:'IdRetId',
    emptyText:'Select Origin',
    value:'Select Retailer Id',
    triggerAction: 'all',
    editable:true,
    typeAhead:true,
    forceSelection:true,
    mode:'remote',
    store:retDetStore,
    displayField: 'RETAILER_NAME',
    valueField: 'RETAILER_ID'

    Those are having few common configs. Is their any mechanism in which I can reduce the common configs?
    Please help. Thanks in advance

  2. #2
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,890

    Default

    There's been quite a bit of work put into not mutating passed in config objects.

    You should just be able to reuse that object.

  3. #3
    Sencha User Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,245

    Default

    Correct, but because your combobox is mode:'remote', each combobox will do it's own request to get the items in the list.

    It's probably better to configure the retDetStore with autoLoad:true and the comboboxes with mode:'local'.

    ps. The only reason your comboboxes can share the same store is because you've configured them with triggerAction:'all'.

Similar Threads

  1. Common Tree Icons...
    By yh800701 in forum Ext GWT: Discussion
    Replies: 6
    Last Post: 30 Jun 2010, 3:45 PM
  2. Some common questions
    By chrizmaster in forum Ext 2.x: Help & Discussion
    Replies: 5
    Last Post: 20 Feb 2009, 5:58 AM
  3. Common problems with ExtJS
    By nokia786 in forum Ext 2.x: Help & Discussion
    Replies: 7
    Last Post: 25 Oct 2008, 6:33 AM
  4. Conforming to Common Practices
    By thephatp in forum Community Discussion
    Replies: 11
    Last Post: 29 Aug 2008, 2:18 PM
  5. Common Errors and Fixes
    By dnixon in forum Ext 1.x: Help & Discussion
    Replies: 2
    Last Post: 12 Sep 2007, 7:13 AM

Posting Permissions

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