Re: Missing scroll bar [message #4624 is a reply to message #4623] |
Fri, 14 November 2014 04:02   |
AJM
Messages: 2382 Registered: April 2006 Location: Surrey, UK
|
Senior Member |
|
|
The _cm_changeConfig() method is supposed to be used only to change the configuration of that entity, such as the contents of the $fieldspec array. Adding extra values to $fieldarray should be done in the _cm_getExtraData() method.
It is possible to add extra values in the _cm_changeConfig() method, but as it is called several times a change to the contents of $fieldarray can have different results. The first time it is called in an UPD or ENQ task is before the call to getData(), so the $where string is not empty and $fieldarray shows the primary key of the first selection. If you make a change to $fieldarray at this point this will then replace the contents of the $where string, thus replacing the multiple selection with a single selection which causes the scroll bar to be removed as there are no other selections. When _cm_changeConfig() is called after getData() the $where string will be empty and $fieldarray will show the complete contents of the current record. Any changes you make to $fieldarray at this point will not affect the scroll bars.
If you wrap your code in the following condition it will work in the _cm_changeConfig() method:
if (empty($where) AND !empty($fieldarray)) {
if (!isset($fieldarray['abc'])) $fieldarray['abc'] = 'anything';
} // if
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
|
|
|