summaryrefslogtreecommitdiff
path: root/framework/Web
diff options
context:
space:
mode:
authorxue <>2006-04-26 21:15:34 +0000
committerxue <>2006-04-26 21:15:34 +0000
commitf4437c190074be283d9297f8e2ad54bbb055bf2d (patch)
tree391812d18afb67918303d5f0b4e22bf4e77a6449 /framework/Web
parent8b0c8f0d0557d8ab88409cd9691cd1ee279321d5 (diff)
TLiteral will display body content if Text is empty.
Diffstat (limited to 'framework/Web')
-rw-r--r--framework/Web/UI/WebControls/TLiteral.php7
-rw-r--r--framework/Web/UI/WebControls/TTable.php2
2 files changed, 7 insertions, 2 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);
}
}
diff --git a/framework/Web/UI/WebControls/TTable.php b/framework/Web/UI/WebControls/TTable.php
index fe01649c..4fcbb6fb 100644
--- a/framework/Web/UI/WebControls/TTable.php
+++ b/framework/Web/UI/WebControls/TTable.php
@@ -45,7 +45,7 @@ Prado::using('System.Web.UI.WebControls.TTableRow');
* <com:TTableCell Text="content" />
* <com:TTableCell Text="content" />
* </com:TTableRow>
- * <com:TTable>
+ * </com:TTable>
* </code>
* The above can also be accomplished in code as follows,
* <code>