summaryrefslogtreecommitdiff
path: root/framework/Web/UI/WebControls
diff options
context:
space:
mode:
authorwei <>2006-01-25 11:34:58 +0000
committerwei <>2006-01-25 11:34:58 +0000
commitbf66ad7bb36e881f53437491333940d74d77139e (patch)
tree0f9e58402f45a1e6df8081fe5a000c711737f10d /framework/Web/UI/WebControls
parentd9ad36825c803cb356ef690e1fbb6bc61c1b2e44 (diff)
Changed AssociatedControlID to ForControl
Diffstat (limited to 'framework/Web/UI/WebControls')
-rw-r--r--framework/Web/UI/WebControls/TBaseValidator.php6
-rw-r--r--framework/Web/UI/WebControls/TLabel.php14
2 files changed, 10 insertions, 10 deletions
diff --git a/framework/Web/UI/WebControls/TBaseValidator.php b/framework/Web/UI/WebControls/TBaseValidator.php
index 5110230b..eeb5d0e8 100644
--- a/framework/Web/UI/WebControls/TBaseValidator.php
+++ b/framework/Web/UI/WebControls/TBaseValidator.php
@@ -180,13 +180,13 @@ abstract class TBaseValidator extends TLabel implements IValidator
}
/**
- * This method overrides the parent implementation to forbid setting AssociatedControlID.
+ * This method overrides the parent implementation to forbid setting ForControl.
* @param string the associated control ID
* @throws TNotSupportedException whenever this method is called
*/
- public function setAssociatedControlID($value)
+ public function setForControl($value)
{
- throw new TNotSupportedException('basevalidator_associatedcontrolid_unsupported',get_class($this));
+ throw new TNotSupportedException('basevalidator_forcontrol_unsupported',get_class($this));
}
/**
diff --git a/framework/Web/UI/WebControls/TLabel.php b/framework/Web/UI/WebControls/TLabel.php
index 5a53def4..89783bd5 100644
--- a/framework/Web/UI/WebControls/TLabel.php
+++ b/framework/Web/UI/WebControls/TLabel.php
@@ -18,7 +18,7 @@
* TLabel will render the contents enclosed within its component tag
* if {@link setText Text} is empty.
* To use TLabel as a form label, associate it with a control by setting the
- * {@link setAssociatedControlID AssociatedControlID} property.
+ * {@link setForControl ForControl} property.
* The associated control must be locatable within the label's naming container.
*
* Note, {@link setText Text} will NOT be encoded for rendering.
@@ -36,7 +36,7 @@ class TLabel extends TWebControl
*/
protected function getTagName()
{
- return ($this->getAssociatedControlID()==='')?'span':'label';
+ return ($this->getForControl()==='')?'span':'label';
}
/**
@@ -46,7 +46,7 @@ class TLabel extends TWebControl
*/
protected function addAttributesToRender($writer)
{
- if(($aid=$this->getAssociatedControlID())!=='')
+ if(($aid=$this->getForControl())!=='')
{
if($control=$this->findControl($aid))
$writer->addAttribute('for',$control->getClientID());
@@ -87,9 +87,9 @@ class TLabel extends TWebControl
/**
* @return string the associated control ID
*/
- public function getAssociatedControlID()
+ public function getForControl()
{
- return $this->getViewState('AssociatedControlID','');
+ return $this->getViewState('ForControl','');
}
/**
@@ -97,9 +97,9 @@ class TLabel extends TWebControl
* The control must be locatable via {@link TControl::findControl} using the ID.
* @param string the associated control ID
*/
- public function setAssociatedControlID($value)
+ public function setForControl($value)
{
- $this->setViewState('AssociatedControlID',$value,'');
+ $this->setViewState('ForControl',$value,'');
}
}