summaryrefslogtreecommitdiff
path: root/framework/Web/UI/WebControls/TListControl.php
diff options
context:
space:
mode:
authorxue <>2007-09-28 02:01:43 +0000
committerxue <>2007-09-28 02:01:43 +0000
commit0d682e512ad1d07434320ace888c88511fb8426b (patch)
tree6ad3e897796c3aa5eb63b557f9eefeff67f3129a /framework/Web/UI/WebControls/TListControl.php
parent95cc364ff7afdf2b70c1332e6980141a9645b304 (diff)
Fix prompt selection behavior.
Diffstat (limited to 'framework/Web/UI/WebControls/TListControl.php')
-rw-r--r--framework/Web/UI/WebControls/TListControl.php10
1 files changed, 4 insertions, 6 deletions
diff --git a/framework/Web/UI/WebControls/TListControl.php b/framework/Web/UI/WebControls/TListControl.php
index 6e478550..785bd194 100644
--- a/framework/Web/UI/WebControls/TListControl.php
+++ b/framework/Web/UI/WebControls/TListControl.php
@@ -704,7 +704,7 @@ abstract class TListControl extends TDataBoundControl implements IDataRenderer
}
/**
- * @return string the prompt text which is to be displayed as the first list item. Defaults to empty, meaning no prompt.
+ * @return string the prompt text which is to be displayed as the first list item.
* @since 3.1.1
*/
public function getPromptText()
@@ -713,7 +713,7 @@ abstract class TListControl extends TDataBoundControl implements IDataRenderer
}
/**
- * @param string the prompt text which is to be displayed as the first list item. If empty, {@link getPromptValue PromptValue} will be displayed.
+ * @param string the prompt text which is to be displayed as the first list item.
* @since 3.1.1
*/
public function setPromptText($value)
@@ -722,7 +722,7 @@ abstract class TListControl extends TDataBoundControl implements IDataRenderer
}
/**
- * @return string the prompt selection value. Defaults to empty, meaning no prompt.
+ * @return string the prompt selection value.
* @see getPromptText
* @since 3.1.1
*/
@@ -773,11 +773,9 @@ abstract class TListControl extends TDataBoundControl implements IDataRenderer
{
$text=$this->getPromptText();
$value=$this->getPromptValue();
- if($text==='')
- $text=$value;
if($value==='')
$value=$text;
- if($text!=='')
+ if($value!=='')
{
$writer->addAttribute('value',$value);
$writer->renderBeginTag('option');