## Class TActiveListItemCollection

Description

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.

- since: 3.1
- version: $Id: TActiveListControlAdapter.php 2482 2008-07-30 02:07:13Z knut $
- author: Wei Zhuo <weizhuo[at]gmail[dot]com>

Located in /Web/UI/ActiveControls/TActiveListControlAdapter.php (line 154)

    TComponent
       |
       --TList
          |
          --TListItemCollection
             |
             --TActiveListItemCollection

Method Summary
boolean canUpdateClientSide ()
IActiveControl getControl ()
boolean getListHasChanged ()
void insertAt (integer $index, TListItem $value)
void removeAt (int $index)
void setControl (IActiveControl $control)
void updateClientSide ()
Methods
canUpdateClientSide (line 169)

- return: true if active controls can update client-side and the onLoad event has already been raised.
- access: protected

boolean canUpdateClientSide ()
getControl (line 186)

- return: active control using the collection.
- access: public

IActiveControl getControl ()
getListHasChanged (line 194)

- return: true if the list has changed after onLoad event.
- access: public

boolean getListHasChanged ()
insertAt (line 217)

Inserts an item into the collection.

The new option is added on the client-side during callback.

- access: public
- throws: TInvalidDataTypeException if the item being inserted is neither a string nor TListItem

void insertAt (integer $index, TListItem $value)

- 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.

Redefinition of:

TListItemCollection::insertAt()
  Inserts an item into the collection.

removeAt (line 228)

Removes an item from at specified index.

- access: public

void removeAt (int $index)

- int $index: zero based index.

Redefinition of:

TList::removeAt()
  Removes an item at the specified position.

setControl (line 178)

- access: public

void setControl (IActiveControl $control)

- IActiveControl $control: a active list control.

updateClientSide (line 202)

Update client-side list items.

- access: public

void updateClientSide ()

#### Inherited Methods

Inherited From TListItemCollection

> TListItemCollection::createListItem()
> TListItemCollection::createNewListItem()
> TListItemCollection::findIndexByText()
> TListItemCollection::findIndexByValue()
> TListItemCollection::findItemByText()
> TListItemCollection::findItemByValue()
> TListItemCollection::insertAt()
> TListItemCollection::loadState()
> TListItemCollection::saveState()

Inherited From TList

> TList::__construct()
> 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()

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()

Documentation generated on Mon, 22 Feb 2010 12:16:23 +0000 by phpDocumentor 1.3.0RC4