Class TActiveListItemCollection
TActiveListItemCollection class.
Allows TActiveDropDownList and TActiveListBox to add new options during callback response. New options can only be added after the TControl::onLoad event. The ListHasChanged property is true when the list items has changed. The control responsible for the list needs to repopulate the client-side options.
| Method Summary |
|
protected
boolean
|
|
|
IActiveControl
|
|
|
boolean
|
|
|
void
|
Inserts an item into the collection.
|
|
void
|
Removes an item from at specified index.
|
|
void
|
|
|
void
|
Update client-side list items.
|
| Methods Inherited From TList |
|
TList::add(), TList::clear(), TList::contains(), TList::copyFrom(), TList::count(), TList::getCount(), TList::getIterator(), TList::getReadOnly(), TList::indexOf(), TList::insertAt(), TList::itemAt(), TList::mergeWith(), TList::offsetExists(), TList::offsetGet(), TList::offsetSet(), TList::offsetUnset(), TList::remove(), TList::removeAt(), TList::setReadOnly(), TList::toArray()
|
| Methods Inherited From TComponent |
|
TComponent::addParsedObject(), TComponent::attachEventHandler(), TComponent::canGetProperty(), TComponent::canSetProperty(), TComponent::createdOnTemplate(), TComponent::detachEventHandler(), TComponent::evaluateExpression(), TComponent::evaluateStatements(), TComponent::getEventHandlers(), TComponent::getSubProperty(), TComponent::hasEvent(), TComponent::hasEventHandler(), TComponent::hasProperty(), TComponent::raiseEvent(), TComponent::setSubProperty(), TComponent::__get(), TComponent::__set()
|
| Method Details |
canUpdateClientSide
| protected boolean canUpdateClientSide |
() |
| Output |
|
boolean
| true if active controls can update client-side and the onLoad event has already been raised. |
| Exception |
|
getControl
|
getListHasChanged
| public boolean getListHasChanged |
() |
| Output |
|
boolean
| true if the list has changed after onLoad event. |
| Exception |
|
insertAt
| public void insertAt |
(integer $index , TListItem $value ) |
Inserts an item into the collection.
The new option is added on the client-side during callback.
| Input |
| integer | $index | the location where the item will be inserted. The current item at the place and the following ones will be moved backward. |
| TListItem | $value | the item to be inserted. |
| Output |
| Exception |
| throws | TInvalidDataTypeException if the item being inserted is neither a string nor TListItem |
|
removeAt
| public void removeAt |
(int $index ) |
Removes an item from at specified index.
| Input |
| int | $index | zero based index. |
| Output |
| Exception |
|
setControl
| public void setControl |
(IActiveControl $control ) |
| Input |
| IActiveControl | $control | a active list control. |
| Output |
| Exception |
|
updateClientSide
| public void updateClientSide |
() |
Update client-side list items.
|
|