summaryrefslogtreecommitdiff
path: root/framework/Web/UI/TForm.php
diff options
context:
space:
mode:
authorctrlaltca@gmail.com <>2011-06-24 22:12:36 +0000
committerctrlaltca@gmail.com <>2011-06-24 22:12:36 +0000
commit15f6747485b5912f657c2c0fce8f41c01c70d2ad (patch)
treed2621fd086e8da91313b8880a5ad524f8518aac3 /framework/Web/UI/TForm.php
parenta0d269954534e09c0b9c0f73c927b6eb764c21d9 (diff)
merged in the patch for progressive rendering from #235; unit tests doesn't evidence any regression, but of course more proper testing is needed
Diffstat (limited to 'framework/Web/UI/TForm.php')
-rw-r--r--framework/Web/UI/TForm.php28
1 files changed, 16 insertions, 12 deletions
diff --git a/framework/Web/UI/TForm.php b/framework/Web/UI/TForm.php
index 561b59cb..f1e8df5a 100644
--- a/framework/Web/UI/TForm.php
+++ b/framework/Web/UI/TForm.php
@@ -4,7 +4,7 @@
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @link http://www.pradosoft.com/
- * @copyright Copyright &copy; 2005-2011 PradoSoft
+ * @copyright Copyright &copy; 2005-2011 PradoSoft
* @license http://www.pradosoft.com/license/
* @version $Id$
* @package System.Web.UI
@@ -72,11 +72,6 @@ class TForm extends TControl
public function render($writer)
{
$page=$this->getPage();
- $page->beginFormRender($writer);
- $htmlWriter = Prado::createComponent($this->GetResponse()->getHtmlWriterType(), new TTextWriter());
- $this->renderChildren( $htmlWriter );
- $content = $htmlWriter->flush();
- $page->endFormRender($writer);
$this->addAttributesToRender($writer);
$writer->renderBeginTag('form');
@@ -84,18 +79,27 @@ class TForm extends TControl
$cs=$page->getClientScript();
if($page->getClientSupportsJavaScript())
{
- $cs->renderHiddenFields($writer);
- $cs->renderScriptFiles($writer);
+ $cs->renderHiddenFieldsBegin($writer);
+ $cs->renderScriptFilesBegin($writer);
$cs->renderBeginScripts($writer);
- $writer->write($content);
-
+ $page->beginFormRender($writer);
+ $this->renderChildren($writer);
+ $cs->renderHiddenFieldsEnd($writer);
+ $page->endFormRender($writer);
+
+ $cs->renderScriptFilesEnd($writer);
$cs->renderEndScripts($writer);
}
else
{
- $cs->renderHiddenFields($writer);
- $writer->write($content);
+ $cs->renderHiddenFieldsBegin($writer);
+
+ $page->beginFormRender($writer);
+ $this->renderChildren($writer);
+ $page->endFormRender($writer);
+
+ $cs->renderHiddenFieldsEnd($writer);
}
$writer->renderEndTag();