summaryrefslogtreecommitdiff
path: root/framework/Web/UI/ActiveControls
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
parent0ccf3763474a18b72b6a166399fc1cf569b867f8 (diff)
Fixed #383
Diffstat (limited to 'framework/Web/UI/ActiveControls')
-rw-r--r--framework/Web/UI/ActiveControls/TActiveCheckBoxList.php2
-rw-r--r--framework/Web/UI/ActiveControls/TActiveDropDownList.php2
-rw-r--r--framework/Web/UI/ActiveControls/TActiveListBox.php25
-rw-r--r--framework/Web/UI/ActiveControls/TActiveRadioButtonList.php2
4 files changed, 31 insertions, 0 deletions
diff --git a/framework/Web/UI/ActiveControls/TActiveCheckBoxList.php b/framework/Web/UI/ActiveControls/TActiveCheckBoxList.php
index 1cb2c442..f70a6407 100644
--- a/framework/Web/UI/ActiveControls/TActiveCheckBoxList.php
+++ b/framework/Web/UI/ActiveControls/TActiveCheckBoxList.php
@@ -27,6 +27,8 @@ Prado::using('System.Web.UI.ActiveControls.TActiveListControlAdapter');
* set to true (default is true), changes to the selection will be updated
* on the client side.
*
+ * List items can not be changed dynamically during a callback request.
+ *
* @author Wei Zhuo <weizhuo[at]gmail[dot]com>
* @version $Id$
* @package System.Web.UI.ActiveControls
diff --git a/framework/Web/UI/ActiveControls/TActiveDropDownList.php b/framework/Web/UI/ActiveControls/TActiveDropDownList.php
index 32f309c2..c628e98c 100644
--- a/framework/Web/UI/ActiveControls/TActiveDropDownList.php
+++ b/framework/Web/UI/ActiveControls/TActiveDropDownList.php
@@ -29,6 +29,8 @@ Prado::using('System.Web.UI.ActiveControls.TActiveListControlAdapter');
* been raised, will be updated.
* on the client side.
*
+ * List items can be changed dynamically during a callback request.
+ *
* @author Wei Zhuo <weizhuo[at]gmail[dot]com>
* @version $Id$
* @package System.Web.UI.ActiveControls
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
diff --git a/framework/Web/UI/ActiveControls/TActiveRadioButtonList.php b/framework/Web/UI/ActiveControls/TActiveRadioButtonList.php
index a3236e4d..3eb57ec7 100644
--- a/framework/Web/UI/ActiveControls/TActiveRadioButtonList.php
+++ b/framework/Web/UI/ActiveControls/TActiveRadioButtonList.php
@@ -22,6 +22,8 @@
* set to true (default is true), changes to the selection will be updated
* on the client side.
*
+ * List items can not be changed dynamically during a callback request.
+ *
* @author Wei Zhuo <weizhuo[at]gmail[dot]com>
* @version $Id$
* @package System.Web.UI.ActiveControls