summaryrefslogtreecommitdiff
path: root/framework/Web/UI/WebControls/TLiteral.php
diff options
context:
space:
mode:
authorxue <>2006-04-26 21:18:01 +0000
committerxue <>2006-04-26 21:18:01 +0000
commit8ab196ce6c2d5de323bdd8ebcc11a73814c0cdca (patch)
treee77b1306648d03920439290bb8f3e27821410804 /framework/Web/UI/WebControls/TLiteral.php
parent5ba6cd4be568f686d890835a77586077cde1a943 (diff)
Merge from 3.0 branch till 971.
Diffstat (limited to 'framework/Web/UI/WebControls/TLiteral.php')
-rw-r--r--framework/Web/UI/WebControls/TLiteral.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/framework/Web/UI/WebControls/TLiteral.php b/framework/Web/UI/WebControls/TLiteral.php
index 35888676..f335499f 100644
--- a/framework/Web/UI/WebControls/TLiteral.php
+++ b/framework/Web/UI/WebControls/TLiteral.php
@@ -15,11 +15,14 @@
*
* TLiteral displays a static text on the Web page.
* TLiteral is similar to the TLabel control, except that the TLiteral
- * control does not allow child controls and do not have style properties (e.g. BackColor, Font, etc.)
+ * control does not have style properties (e.g. BackColor, Font, etc.)
* You can programmatically control the text displayed in the control by setting
* the {@link setText Text} property. The text displayed may be HTML-encoded
* if the {@link setEncode Encode} property is set true (defaults to false).
*
+ * TLiteral will render the contents enclosed within its component tag
+ * if {@link setText Text} is empty.
+ *
* Note, if {@link setEncode Encode} is false, make sure {@link setText Text}
* does not contain unwanted characters that may bring security vulnerabilities.
*
@@ -76,6 +79,8 @@ class TLiteral extends TControl
else
$writer->write($text);
}
+ else
+ parent::renderContents($writer);
}
}