1. #1
    Sencha User
    Join Date
    Jan 2013
    Posts
    13
    Vote Rating
    0
    mailmejanar is on a distinguished road

      0  

    Default CollapsibleList in Sencha 2.1

    CollapsibleList in Sencha 2.1


    hi all

    I am struggles to create the expand and collabse function in sencha 2.1 list control. I did that in sencha 2.0.1 but i have not any idea in sencha 2.1. If any body share the code is best way for me

  2. #2
    Sencha User
    Join Date
    Aug 2011
    Location
    London
    Posts
    392
    Vote Rating
    16
    digeridoopoo will become famous soon enough

      0  

    Default Do you know about this...

    Do you know about this...


    Do you know about this component?

    https://github.com/kawanoshinobu/Ext.ux.AccordionList

    :-)

  3. #3
    Sencha User
    Join Date
    Jan 2013
    Posts
    13
    Vote Rating
    0
    mailmejanar is on a distinguished road

      0  

    Default


    thank for your reply. I looked that. But i need more than six span items in inside the list item row. I tried in accordian but it should not help me. It is showing only single span in a row.

  4. #4
    Sencha User
    Join Date
    Jan 2013
    Posts
    13
    Vote Rating
    0
    mailmejanar is on a distinguished road

      0  

    Default


    Wow!.. Suberb! Fantastic! Now i could success through Accordian what i want through list. Thanks a lot digeri. Really thanks..

  5. #5
    Sencha User
    Join Date
    Jan 2013
    Posts
    13
    Vote Rating
    0
    mailmejanar is on a distinguished road

      0  

    Default


    hi dig

    If any possible to load the data from the json.

  6. #6
    Sencha User
    Join Date
    Aug 2011
    Location
    London
    Posts
    392
    Vote Rating
    16
    digeridoopoo will become famous soon enough

      0  

    Default Apparently not...

    Apparently not...


    Apparently it's not possible yet....maybe in a future version or you can ask the developer of the extension. I saw this in the code:

    Code:
    // XXX: AccordionList doesn't show when loaded from JSON
            // proxy: {
            //     type: 'ajax',
            //     url: 'resources/data/testData.json',
            //     reader: {
            //         type: 'json',
            //         rootProperty: 'items'
            //      }
            // }
    :-)

  7. #7
    Sencha User
    Join Date
    Jan 2013
    Posts
    13
    Vote Rating
    0
    mailmejanar is on a distinguished road

      0  

    Default


    thanks digeri. i looked that code in that sample but my bad time it must need to work in my app. So anyway if i will get the problem solved i will post the code here

  8. #8
    Sencha User
    Join Date
    Jan 2013
    Posts
    13
    Vote Rating
    0
    mailmejanar is on a distinguished road

      0  

    Default


    Hi

    Find out the code for loading data from json. Smooth work from my friend Premkumar and customize the code.
    we need to update the store onloadproxy function like below

    Ext.define('AccordionListExample.store.Task', {
    extend: 'Ext.data.TreeStore',
    requires: [
    'AccordionListExample.model.Task'
    ],


    onProxyLoad: function(operation) {
    var me = this,
    records = operation.getRecords(),
    successful = operation.wasSuccessful(),
    node = operation.getNode();


    node.beginEdit();
    node.set('loading', false);
    if (successful) {
    records = me.fillNode(node, records);
    }
    node.endEdit();
    this.updateNode(node);
    me.loading = false;
    me.loaded = true;


    node.fireEvent('load', node, records, successful);
    me.fireEvent('load', this, records, successful, operation);


    //this is a callback that would have been passed to the 'read' function and is optional
    Ext.callback(operation.getCallback(), operation.getScope() || me, [records, operation, successful]);
    },



    onNodeBeforeExpand: function(node, options, e) {

    },

    config: {
    defaultRootProperty: 'items',
    model: 'AccordionListExample.model.Task',
    autoLoad: true,


    // XXX: AccordionList Now show data from JSON
    proxy: {
    type: 'ajax',
    url: 'resources/data/testData.json'//,
    // reader: {
    // type: 'json',
    // rootProperty: 'items'
    // }
    },
    listeners: {
    load: function(store, records, successful, operation, eOpts) {
    alert(records.length);
    alert(store.getCount());
    }
    }
    }
    });

  9. #9
    Sencha User
    Join Date
    Jan 2012
    Posts
    14
    Vote Rating
    0
    indra00 is on a distinguished road

      0  

    Default Accordion

    Accordion


    Hey guyz one question to all !

    Accordion is working for you guyz on sencha 2.1 ?? as for me it is not !

  10. #10
    Sencha User
    Join Date
    Jan 2013
    Posts
    13
    Vote Rating
    0
    mailmejanar is on a distinguished road

      0  

    Default


    Hi indu

    Its working fine senchatouch 2.1. please check it and find what the error you get it