diff options
author | xue <> | 2005-12-07 00:37:05 +0000 |
---|---|---|
committer | xue <> | 2005-12-07 00:37:05 +0000 |
commit | 5a02da5172ed220a293a0cd6f586c900f9f94a00 (patch) | |
tree | c7a0662301e8b7dc71df99bc34dfb7b0d59e9f57 /framework/Web/UI/WebControls/TTextBox.php | |
parent | b4e9f6795206fab6b952f814ccf812677a34c635 (diff) |
Diffstat (limited to 'framework/Web/UI/WebControls/TTextBox.php')
-rw-r--r-- | framework/Web/UI/WebControls/TTextBox.php | 26 |
1 files changed, 3 insertions, 23 deletions
diff --git a/framework/Web/UI/WebControls/TTextBox.php b/framework/Web/UI/WebControls/TTextBox.php index bfd7c029..4d4fcff6 100644 --- a/framework/Web/UI/WebControls/TTextBox.php +++ b/framework/Web/UI/WebControls/TTextBox.php @@ -39,15 +39,6 @@ class TTextBox extends TWebControl implements IPostBackDataHandler, IValidatable
{
/**
- * @var array enumeration of the valid AutoCompleteType values.
- */
- public static $AUTO_COMPLETE_TYPE=array('BusinessCity','BusinessCountryRegion','BusinessFax','BusinessPhone','BusinessState','BusinessStreetAddress','BusinessUrl','BusinessZipCode','Cellular','Company','Department','Disabled','DisplayName','Email','FirstName','Gender','HomeCity','HomeCountryRegion','HomeFax','Homepage','HomePhone','HomeState','HomeStreetAddress','HomeZipCode','JobTitle','LastName','MiddleName','None','Notes','Office','Pager','Search');
- /**
- * @var array enumeration of the valid TextMode values.
- */
- public static $TEXT_MODE=array('SingleLine','MultiLine','Password');
-
- /**
* @return string tag name of the textbox
*/
protected function getTagName()
@@ -56,18 +47,6 @@ class TTextBox extends TWebControl implements IPostBackDataHandler, IValidatable }
/**
- * Processes an object that is created during parsing template.
- * This overrides the parent implementation by forbidding any body components.
- * @param mixed the newly created object in template
- * @throws TInvalidOperationException if a component is found within body
- */
- public function addParsedObject($object)
- {
- if(!is_string($object))
- throw new TInvalidOperationException('body_contents_not_allowed',get_class($this).':'.$this->getUniqueID());
- }
-
- /**
* Adds attribute name-value pairs to renderer.
* This overrides the parent implementation with additional textbox specific attributes.
* @param THtmlWriter the writer used for the rendering purpose
@@ -232,6 +211,7 @@ class TTextBox extends TWebControl implements IPostBackDataHandler, IValidatable }
$this->onTextChanged(new TEventParameter);
}
+
/**
* Renders the body content of the textbox when it is in MultiLine text mode.
* @param THtmlWriter the writer for rendering
@@ -263,7 +243,7 @@ class TTextBox extends TWebControl implements IPostBackDataHandler, IValidatable */
public function setAutoCompleteType($value)
{
- $this->setViewState('AutoCompleteType',TPropertyValue::ensureEnum($value,self::$AUTO_COMPLETE_TYPE),'None');
+ $this->setViewState('AutoCompleteType',TPropertyValue::ensureEnum($value,array('BusinessCity','BusinessCountryRegion','BusinessFax','BusinessPhone','BusinessState','BusinessStreetAddress','BusinessUrl','BusinessZipCode','Cellular','Company','Department','Disabled','DisplayName','Email','FirstName','Gender','HomeCity','HomeCountryRegion','HomeFax','Homepage','HomePhone','HomeState','HomeStreetAddress','HomeZipCode','JobTitle','LastName','MiddleName','None','Notes','Office','Pager','Search')),'None');
}
/**
@@ -403,7 +383,7 @@ class TTextBox extends TWebControl implements IPostBackDataHandler, IValidatable */
public function setTextMode($value)
{
- $this->setViewState('TextMode',TPropertyValue::ensureEnum($value,self::$TEXT_MODE),'SingleLine');
+ $this->setViewState('TextMode',TPropertyValue::ensureEnum($value,array('SingleLine','MultiLine','Password')),'SingleLine');
}
/**
|