From f4437c190074be283d9297f8e2ad54bbb055bf2d Mon Sep 17 00:00:00 2001 From: xue <> Date: Wed, 26 Apr 2006 21:15:34 +0000 Subject: TLiteral will display body content if Text is empty. --- framework/Web/UI/WebControls/TLiteral.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'framework/Web/UI/WebControls/TLiteral.php') 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); } } -- cgit v1.2.3