Packages:
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 TListItemCollection

TComponent
   |
   --TList
      |
      --TListItemCollection

Direct Known Sub-classes:

TListItemCollection class.

TListItemCollection maintains a list of TListItem for TListControl.

Since: 3.0
Author: Qiang Xue <qiang.xue@gmail.com>

Method Summary
TListItem
createListItem ( integer $index)
Creates a list item object.
protected  TListItem
createNewListItem ( mixed $text)
integer
findIndexByText ( string $text, boolean $includeDisabled)
Finds the lowest cardinal index of the item whose text is the one being looked for.
integer
findIndexByValue ( string $value, boolean $includeDisabled)
Finds the lowest cardinal index of the item whose value is the one being looked for.
TListItem
findItemByText ( string $text, boolean $includeDisabled)
Finds the item whose text is the one being looked for.
TListItem
findItemByValue ( string $value, boolean $includeDisabled)
Finds the item whose value is the one being looked for.
void
insertAt ( integer $index, TListItem $item)
Inserts an item into the collection.
void
loadState ( array|null $state)
Loads state into every item in the collection.
array|null
Saves state of 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

createListItem

public TListItem createListItem (integer $index )

Creates a list item object.

This method may be overriden to provide a customized list item object.

Input
integer$indexindex where the newly created item is to be inserted at. If -1, the item will be appended to the end.
Output
TListItem list item object
Exception

createNewListItem

protected TListItem createNewListItem (mixed $text )

Input
mixed$text
Output
TListItem new item.
Exception

findIndexByText

public integer findIndexByText (string $text , boolean $includeDisabled )

Finds the lowest cardinal index of the item whose text is the one being looked for.

Input
string$textthe text to be looked for
boolean$includeDisabledwhether to look for disabled items also
Output
integer the index of the item found, -1 if not found.
Exception

findIndexByValue

public integer findIndexByValue (string $value , boolean $includeDisabled )

Finds the lowest cardinal index of the item whose value is the one being looked for.

Input
string$valuethe value to be looked for
boolean$includeDisabledwhether to look for disabled items also
Output
integer the index of the item found, -1 if not found.
Exception

findItemByText

public TListItem findItemByText (string $text , boolean $includeDisabled )

Finds the item whose text is the one being looked for.

Input
string$textthe text to be looked for
boolean$includeDisabledwhether to look for disabled items also
Output
TListItem the item found, null if not found.
Exception

findItemByValue

public TListItem findItemByValue (string $value , boolean $includeDisabled )

Finds the item whose value is the one being looked for.

Input
string$valuethe value to be looked for
boolean$includeDisabledwhether to look for disabled items also
Output
TListItem the item found, null if not found.
Exception

insertAt

public void insertAt (integer $index , TListItem $item )

Inserts an item into the collection.

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$itemthe item to be inserted.
Output
Exception
throwsTInvalidDataTypeException if the item being inserted is neither a string nor TListItem

loadState

public void loadState (array|null $state )

Loads state into every item in the collection.

This method should only be used by framework and control developers.

Input
array|null$statestate to be loaded.
Output
Exception

saveState

public array|null saveState ()

Saves state of items.

This method should only be used by framework and control developers.

Output
array|null the saved state
Exception