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.

  • author: Wei Zhuo <weizhuo[at]gmail[dot]com>
  • version: $Id: TActiveListControlAdapter.php 3052 2011-10-21 09:06:19Z ctrlaltca@gmail.com $
  • since: 3.1

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

TComponent
   |
   --TList
      |
      --TListItemCollection
         |
         --TActiveListItemCollection
Method Summary
boolean canUpdateClientSide ()
boolean getListHasChanged ()
void insertAt (integer $index, TListItem $value)
void removeAt (int $index)
void setControl ( $control)
Methods
canUpdateClientSide (line 192)
  • return: true if active controls can update client-side and the onLoad event has already been raised.
  • access: protected
boolean canUpdateClientSide ()
getControl (line 209)
  • return: active control using the collection.
  • access: public
IActiveControl getControl ()
getListHasChanged (line 217)
  • return: true if the list has changed after onLoad event.
  • access: public
boolean getListHasChanged ()
insertAt (line 240)

Inserts an item into the collection.

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

  • throws: TInvalidDataTypeException if the item being inserted is neither a string nor TListItem
  • access: public
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 251)

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 201)
  • access: public
void setControl ( $control)
updateClientSide (line 225)

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::insertAfter()
TList::insertAt()
TList::insertBefore()
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::__call()
TComponent::__get()
TComponent::__set()
TComponent::__sleep()
TComponent::__wakeup()

Documentation generated on Mon, 25 Jun 2012 14:37:05 +0200 by phpDocumentor 1.4.3