PDA

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



roboboot
5 Feb 2013, 5:03 AM
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:


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

roboboot
6 Feb 2013, 4:21 AM
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...