View Full Version : ItemSelector reset don't replaces values in 'fromBox'

30 Jul 2009, 2:07 AM

first of all sorry for my english.

I'm using an Itemselector with a external jsonstore but when I click on reset button, items are cleared from "toBox" but not replaced in "fromBox".
It works if use a static array with fromData.
I use RemoteComponents. Thats the reason why its written in PHP.

Any suggestions is welcome.


array('xtype' => "itemselector",
'width' => 'auto',
'name' => "itemselector",
'hideLabel' => true,
'dataFields'=> array("value", "text"),
//'fromData' => array(array(1,'Un'),array(2,'Deux')),
'fromStore' =>array('xtype'=>'jsonstore','autoLoad'=>true,'fields'=>array('value','text'),'url'=>'rights.php'),
'toData' => array(array(10,'Ten')),
'msWidth' => 300,
'msHeight' => 200,
'valueField' => "value",
'displayField' => "text",
'toLegend' => "Selected",
'fromLegend' => "Available",
'toTBar'=> array(array(
'text' => "Clear",
'handler'=>"function(){ var i = Ext.getCmp('itemselector');i.reset.call(i);}")