Packages:
default
System
System.Caching
System.Collections
System.Data
System.Data.ActiveRecord
System.Data.ActiveRecord.Relations
System.Data.ActiveRecord.Scaffold
System.Data.ActiveReecord.Scaffold.InputBuilder
System.Data.Commom.Sqlite
System.Data.Common
System.Data.Common.Mssql
System.Data.Common.Mysql
System.Data.Common.Oracle
System.Data.Common.Pgsql
System.Data.Common.Sqlite
System.Data.DataGateway
System.Data.SqlMap
System.Data.SqlMap.Configuration
System.Data.SqlMap.Statements
System.Exceptions
System.I18N
System.IO
System.Security
System.Util
System.Web
System.Web.Services
System.Web.UI
System.Web.UI.ActiveControls
System.Web.UI.WebControls
System.Web.UI.WebControls.assets
System.Xml


Classes:
Keyword

Class TActiveListItemCollection

TComponent
   |
   --TList
      |
      --TListItemCollection
         |
         --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.

Since: 3.1
Author: Wei Zhuo <weizhuo[at]gmail[dot]com>

Method Summary
protected  boolean
IActiveControl
boolean
void
insertAt ( integer $index, TListItem $value)
Inserts an item into the collection.
void
removeAt ( int $index)
Removes an item from at specified index.
void
setControl ( IActiveControl $control)
void
Update client-side list items.
Methods Inherited From TListItemCollection
TListItemCollection::createListItem(), TListItemCollection::createNewListItem(), TListItemCollection::findIndexByText(), TListItemCollection::findIndexByValue(), TListItemCollection::findItemByText(), TListItemCollection::findItemByValue(), TListItemCollection::insertAt(), TListItemCollection::loadState(), TListItemCollection::saveState()
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

public IActiveControl getControl ()

Output
IActiveControl active control using the collection.
Exception

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$indexthe location where the item will be inserted. The current item at the place and the following ones will be moved backward.
TListItem$valuethe item to be inserted.
Output
Exception
throwsTInvalidDataTypeException 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$indexzero based index.
Output
Exception

setControl

public void setControl (IActiveControl $control )

Input
IActiveControl$controla active list control.
Output
Exception

updateClientSide

public void updateClientSide ()

Update client-side list items.

Output
Exception