ListBox ItemIndex not serialized
Brought to you by:
ttm
The value ItemIndex in the component ListBox will not by serialized (other list components not tested).
Is this behavior as accurate ?
If not, the problem it seems to be that the serialize function only search to "set..." methods (controls.inc.php). However used for "ItemIndex" the "writeItemIndex" method (stdctrls.inc.php, controls.inc.php). I think this is the causing for this problem.
I have testet the ComboBox and here is the serialized of the ItemIndex correctly.
If the following changes inserted (equal to ComboBox), then works the ListBox also correctly:
(stdctrls.inc.php)
insert this lines in class ListBox (line 3415, SVN 257):
function getItemIndex()
{
return $this->readItemIndex();
}
function setItemIndex($value)
{
$this->writeItemIndex($value);
}