1. #1
    Sencha Premium Member
    Join Date
    Oct 2012
    Posts
    38
    Vote Rating
    0
    roboboot is on a distinguished road

      0  

    Default HIde/Show NestedList in a Flex component: how to refresh list data?

    HIde/Show NestedList in a Flex component: how to refresh list data?


    I'm trying to hide a NestedList Panel inside a Panel with Flex layout, but I don't know why the NestedList does not refresh its data after it has been hidden.

    This is the code in a Button's tap event:

    Code:
    var COMPRESS = 'Compress';
    var EXPAND = 'Expand';
    
    
    var nestedList = Ext.getCmp('idSemanticList');
    
    
    if (button.getText() === EXPAND)
    {
        nestedList.setFlex(0);
        button.setText(COMPRESS);
    }
    else if (button.getText() === COMPRESS)
    {
        nestedList.setFlex(1);
        button.setText(EXPAND);
        nestedList.getStore().load();
    }
    the "getStore().load()" show the wheel and nothing else. The server side does receive the call from the ST2, so I think it's only a problem of refresh or binding.

    thanks

  2. #2
    Sencha Premium Member
    Join Date
    Oct 2012
    Posts
    38
    Vote Rating
    0
    roboboot is on a distinguished road

      0  

    Default solved with a workaround

    solved with a workaround


    mhhh, not so good to answer to myself

    The problem was in the "setFlex(0)". For every number different from 0 it works well, but with 0, the NestedList content disappears...

    So instead of 0, I used 0.01, and....it works!!!

    I hope this post could help someone else. I don't know if it is a bug or not, but sure it's strange...