1. #11
    Ext User
    Join Date
    Apr 2008
    Posts
    2
    Vote Rating
    0
    57258815 is on a distinguished road

      0  

    Default



  2. #12
    Sencha - Community Support Team mystix's Avatar
    Join Date
    Mar 2007
    Location
    Singapore
    Posts
    6,236
    Vote Rating
    5
    mystix will become famous soon enough

      0  

    Default


    [QUOTE=57258815;169624]

  3. #13
    Ext User
    Join Date
    May 2008
    Posts
    2
    Vote Rating
    0
    yubo1007 is on a distinguished road

      0  

    Default 来这里看看

    来这里看看


    最近项目使用了EXT

  4. #14
    Ext JS Premium Member
    Join Date
    Jun 2007
    Posts
    44
    Vote Rating
    0
    Thomas_K is on a distinguished road

      0  

    Default


    thx for this example, very usefull!

  5. #15
    Ext User woog's Avatar
    Join Date
    Apr 2008
    Posts
    12
    Vote Rating
    0
    woog is on a distinguished road

      0  

    Default 兄弟能不能给个具体的实例啊?

    兄弟能不能给个具体的实例啊?


    请问楼主兄弟,你能不能 给个具体的 在线的实例给看看。怎么觉得你的comboxtree的tree的限制比较大。你能不能把你的东西做一个演示show一下。非常感谢,a fans of ext。

  6. #16
    Sencha User
    Join Date
    Apr 2007
    Posts
    90
    Vote Rating
    0
    marcing is on a distinguished road

      0  

    Default


    Thanks for this great idea! I find it very useful.

    Here is the code which works for me on Ext 2.2 with id/value combo:

    Code:
                var flatCategoriesStore = new Ext.data.Store
                ({  
                    // load using HTTP
                    proxy: new Ext.data.HttpProxy
                    ({
                        url: 'categories/flat',
                        method: 'GET'
                    }),
                    reader: new Ext.data.JsonReader
                    ({
                        root: 'items',
                        totalProperty: 'count',
                        id: 'id', 
                        fields: [
                            {name: 'id', type: 'int'}, 
                            {name: 'name', type: 'string'}
                        ]
                    })
                });
                
                var comboAlias = new Ext.form.ComboBox
                ({
                    store: flatCategoriesStore,
                    displayField: 'name',
                    valueField: 'id',
                    hiddenName: 'alias',
                    fieldLabel: Lang.Alias,
                    allowBlank: true,
                    editable: false,
                    shadow: false,
                    anchor: '100%',
                    mode: 'local',
                    triggerAction: 'all',
                    maxHeight: 200,
                    emptyText: Lang.None,
                    tpl: '<tpl for="."><div><div id="treeAddAlias"></div></div></tpl>',
                    selectedClass: '',
                    onSelect: Ext.emptyFn,
                    renderer:
                        function(data)
                        {
                            record = flatCategoriesStore.getById(data);
           
                            if(record)
                            {
                                return record.data.name;
                            }
                            else
                            {
                                return data;
                            }
                        },
                    tooltipText: Lang.AliasTip,
                    listeners:
                    {
                        render: CMS.setFormFieldTooltip 
                    }
                });
            
                var treeAlias = new Ext.tree.TreePanel
                ({
                    loader: new Ext.tree.TreeLoader({dataUrl: 'categories/combo'}),
                    root: new Ext.tree.AsyncTreeNode(),
                    rootVisible: false,
                    lines: false,
                    autoScroll: true,
                    border: false,
                    height: 200,
                    enableDD: false,
                    useArrows: true,
                    listeners:
                    {
                        click: function(node)
                        {
                           comboAlias.setValue(node.attributes.cid);
                           comboAlias.collapse();
                        }
                    }
                });
    
                comboAlias.on('expand', function()
                {
                    treeAlias.render('treeAddAlias');
                });
             
                flatCategoriesStore.on('load', function()
                {
                    comboAlias.setValue(category.attributes.alias); 
                });
           
                flatCategoriesStore.load();

  7. #17
    Sencha User galdaka's Avatar
    Join Date
    Mar 2007
    Location
    Spain
    Posts
    1,166
    Vote Rating
    -1
    galdaka is an unknown quantity at this point

      0  

    Default


    Quote Originally Posted by marcing View Post
    Thanks for this great idea! I find it very useful.

    Here is the code which works for me on Ext 2.2 with id/value combo:

    Code:
                var flatCategoriesStore = new Ext.data.Store
                ({  
                    // load using HTTP
                    proxy: new Ext.data.HttpProxy
                    ({
                        url: 'categories/flat',
                        method: 'GET'
                    }),
                    reader: new Ext.data.JsonReader
                    ({
                        root: 'items',
                        totalProperty: 'count',
                        id: 'id', 
                        fields: [
                            {name: 'id', type: 'int'}, 
                            {name: 'name', type: 'string'}
                        ]
                    })
                });
     
                var comboAlias = new Ext.form.ComboBox
                ({
                    store: flatCategoriesStore,
                    displayField: 'name',
                    valueField: 'id',
                    hiddenName: 'alias',
                    fieldLabel: Lang.Alias,
                    allowBlank: true,
                    editable: false,
                    shadow: false,
                    anchor: '100%',
                    mode: 'local',
                    triggerAction: 'all',
                    maxHeight: 200,
                    emptyText: Lang.None,
                    tpl: '<tpl for="."><div><div id="treeAddAlias"></div></div></tpl>',
                    selectedClass: '',
                    onSelect: Ext.emptyFn,
                    renderer:
                        function(data)
                        {
                            record = flatCategoriesStore.getById(data);
     
                            if(record)
                            {
                                return record.data.name;
                            }
                            else
                            {
                                return data;
                            }
                        },
                    tooltipText: Lang.AliasTip,
                    listeners:
                    {
                        render: CMS.setFormFieldTooltip 
                    }
                });
     
                var treeAlias = new Ext.tree.TreePanel
                ({
                    loader: new Ext.tree.TreeLoader({dataUrl: 'categories/combo'}),
                    root: new Ext.tree.AsyncTreeNode(),
                    rootVisible: false,
                    lines: false,
                    autoScroll: true,
                    border: false,
                    height: 200,
                    enableDD: false,
                    useArrows: true,
                    listeners:
                    {
                        click: function(node)
                        {
                           comboAlias.setValue(node.attributes.cid);
                           comboAlias.collapse();
                        }
                    }
                });
     
                comboAlias.on('expand', function()
                {
                    treeAlias.render('treeAddAlias');
                });
     
                flatCategoriesStore.on('load', function()
                {
                    comboAlias.setValue(category.attributes.alias); 
                });
     
                flatCategoriesStore.load();

    Sorry, but... Where is the code of combobox tree?

    Greetings,

  8. #18
    Ext User
    Join Date
    Oct 2007
    Posts
    7
    Vote Rating
    0
    WebArchitect is on a distinguished road

      0  

    Default


    Just a quick hack on this one...

    tree1.on('click',function(node){
    comboxWithTree.valueNotFoundText = node.text;
    comboxWithTree.setValue(node.id);
    comboxWithTree.collapse();
    });

    So now we can see the selected text and the selected id is submitted to the server.

  9. #19
    Sencha User galdaka's Avatar
    Join Date
    Mar 2007
    Location
    Spain
    Posts
    1,166
    Vote Rating
    -1
    galdaka is an unknown quantity at this point

      0  

    Default


    Quote Originally Posted by WebArchitect View Post
    Just a quick hack on this one...

    tree1.on('click',function(node){
    comboxWithTree.valueNotFoundText = node.text;
    comboxWithTree.setValue(node.id);
    comboxWithTree.collapse();
    });

    So now we can see the selected text and the selected id is submitted to the server.
    Where is the code of this component?

  10. #20
    Ext User
    Join Date
    Oct 2007
    Posts
    7
    Vote Rating
    0
    WebArchitect is on a distinguished road

      0  

    Default


    It's just a small modification on the initial code posted here... It's not so difficult to figure it out.

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi