summaryrefslogtreecommitdiff
path: root/framework/Web/UI/ActiveControls/TActiveListBox.php
diff options
context:
space:
mode:
authorwei <>2006-09-23 01:08:19 +0000
committerwei <>2006-09-23 01:08:19 +0000
commit9af56fd93ed071d86f14296cec618073f6c0941a (patch)
tree439b2ba2a89b79bbbd0ce95ad904bd5335c7a700 /framework/Web/UI/ActiveControls/TActiveListBox.php
parent0ccf3763474a18b72b6a166399fc1cf569b867f8 (diff)
Fixed #383
Diffstat (limited to 'framework/Web/UI/ActiveControls/TActiveListBox.php')
-rw-r--r--framework/Web/UI/ActiveControls/TActiveListBox.php25
1 files changed, 25 insertions, 0 deletions
diff --git a/framework/Web/UI/ActiveControls/TActiveListBox.php b/framework/Web/UI/ActiveControls/TActiveListBox.php
index 0620e734..e433fa09 100644
--- a/framework/Web/UI/ActiveControls/TActiveListBox.php
+++ b/framework/Web/UI/ActiveControls/TActiveListBox.php
@@ -13,6 +13,8 @@
/**
* TActiveListBox class.
*
+ * List items can be added dynamically during a callback request.
+ *
* @author Wei Zhuo <weizhuo[at]gmail[dot]com>
* @version $Id$
* @package System.Web.UI.ActiveControls
@@ -41,6 +43,20 @@ class TActiveListBox extends TListBox implements IActiveControl, ICallbackEventH
}
/**
+ * Creates a collection object to hold list items. A specialized
+ * TActiveListItemCollection is created to allow the drop down list options
+ * to be added.
+ * This method may be overriden to create a customized collection.
+ * @return TActiveListItemCollection the collection object
+ */
+ protected function createListItemCollection()
+ {
+ $collection = new TActiveListItemCollection;
+ $collection->setControl($this);
+ return $collection;
+ }
+
+ /**
* Javascript client class for this control.
* This method overrides the parent implementation.
* @return null no javascript class name.
@@ -95,6 +111,15 @@ class TActiveListBox extends TListBox implements IActiveControl, ICallbackEventH
{
$this->raiseEvent('OnCallback', $this, $param);
}
+
+ /**
+ * Updates the client-side options if the item list has changed after the OnLoad event.
+ */
+ public function onPreRender($param)
+ {
+ parent::onPreRender($param);
+ $this->getAdapter()->updateListItems();
+ }
}
?> \ No newline at end of file