summaryrefslogtreecommitdiff
path: root/framework/Web/UI
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Web/UI')
-rw-r--r--framework/Web/UI/ActiveControls/TActiveHyperLink.php3
-rw-r--r--framework/Web/UI/TForm.php6
-rw-r--r--framework/Web/UI/WebControls/TOutputCache.php8
-rw-r--r--framework/Web/UI/WebControls/TSafeHtml.php6
-rw-r--r--framework/Web/UI/WebControls/TTextProcessor.php6
-rw-r--r--framework/Web/UI/WebControls/TXmlTransform.php6
6 files changed, 17 insertions, 18 deletions
diff --git a/framework/Web/UI/ActiveControls/TActiveHyperLink.php b/framework/Web/UI/ActiveControls/TActiveHyperLink.php
index 1a42e09c..9dbde235 100644
--- a/framework/Web/UI/ActiveControls/TActiveHyperLink.php
+++ b/framework/Web/UI/ActiveControls/TActiveHyperLink.php
@@ -66,8 +66,7 @@ class TActiveHyperLink extends THyperLink implements IActiveControl
parent::setImageUrl($value);
if($this->getActiveControl()->canUpdateClientSide() && $value !== '')
{
- $textWriter = new TTextWriter();
- $renderer = new THtmlWriter($textWriter);
+ $renderer = Prado::createComponent($this->GetResponse()->getHtmlWriterType(), new TTextWriter());
$this->createImage($value)->renderControl($renderer);
$this->getPage()->getCallbackClient()->update($this, $textWriter->flush());
}
diff --git a/framework/Web/UI/TForm.php b/framework/Web/UI/TForm.php
index 2356a733..ee845ed5 100644
--- a/framework/Web/UI/TForm.php
+++ b/framework/Web/UI/TForm.php
@@ -73,9 +73,9 @@ class TForm extends TControl
{
$page=$this->getPage();
$page->beginFormRender($writer);
- $textWriter=new TTextWriter;
- $this->renderChildren(new THtmlWriter($textWriter));
- $content=$textWriter->flush();
+ $htmlWriter = Prado::createComponent($this->GetResponse()->getHtmlWriterType(), new TTextWriter());
+ $this->renderChildren( $htmlWriter );
+ $content = $htmlWriter->flush();
$page->endFormRender($writer);
$this->addAttributesToRender($writer);
diff --git a/framework/Web/UI/WebControls/TOutputCache.php b/framework/Web/UI/WebControls/TOutputCache.php
index c0747a11..294519da 100644
--- a/framework/Web/UI/WebControls/TOutputCache.php
+++ b/framework/Web/UI/WebControls/TOutputCache.php
@@ -478,14 +478,14 @@ class TOutputCache extends TControl implements INamingContainer
$writer->write($this->_contents);
else if($this->_cacheAvailable)
{
- $textWriter=new TTextWriter;
-
+ $htmlWriter = Prado::createComponent($this->GetResponse()->getHtmlWriterType(), new TTextWriter());
+
$stack=$this->getPage()->getCachingStack();
$stack->push($this);
- parent::render(new THtmlWriter($textWriter));
+ parent::render($htmlWriter);
$stack->pop();
- $content=$textWriter->flush();
+ $content=$htmlWriter->flush();
$data=array($content,$this->_state,$this->_actions,time());
$this->_cache->set($this->getCacheKey(),$data,$this->getDuration(),$this->getCacheDependency());
$writer->write($content);
diff --git a/framework/Web/UI/WebControls/TSafeHtml.php b/framework/Web/UI/WebControls/TSafeHtml.php
index d6829f8b..dba513c5 100644
--- a/framework/Web/UI/WebControls/TSafeHtml.php
+++ b/framework/Web/UI/WebControls/TSafeHtml.php
@@ -45,9 +45,9 @@ class TSafeHtml extends TControl
*/
public function render($writer)
{
- $textWriter=new TTextWriter;
- parent::render(new THtmlWriter($textWriter));
- $writer->write($this->parseSafeHtml($textWriter->flush()));
+ $htmlWriter = Prado::createComponent($this->GetResponse()->getHtmlWriterType(), new TTextWriter());
+ parent::render($htmlWriter);
+ $writer->write($this->parseSafeHtml($htmlWriter->flush()));
}
/**
diff --git a/framework/Web/UI/WebControls/TTextProcessor.php b/framework/Web/UI/WebControls/TTextProcessor.php
index 26dab754..3d900054 100644
--- a/framework/Web/UI/WebControls/TTextProcessor.php
+++ b/framework/Web/UI/WebControls/TTextProcessor.php
@@ -75,9 +75,9 @@ abstract class TTextProcessor extends TWebControl
{
if(($text=$this->getText())==='' && $this->getHasControls())
{
- $textWriter=new TTextWriter;
- parent::renderContents(new THtmlWriter($textWriter));
- $text=$textWriter->flush();
+ $htmlWriter = Prado::createComponent($this->GetResponse()->getHtmlWriterType(), new TTextWriter());
+ parent::renderContents($htmlWriter);
+ $text=$htmlWriter->flush();
}
if($text!=='')
$writer->write($this->processText($text));
diff --git a/framework/Web/UI/WebControls/TXmlTransform.php b/framework/Web/UI/WebControls/TXmlTransform.php
index bb2c044f..d00ab974 100644
--- a/framework/Web/UI/WebControls/TXmlTransform.php
+++ b/framework/Web/UI/WebControls/TXmlTransform.php
@@ -169,10 +169,10 @@ class TXmlTransform extends TControl {
*/
public function render($writer) {
if(($document=$this->getSourceXmlDocument()) === null) {
- $textWriter = new TTextWriter();
- parent::render(new THtmlWriter($textWriter));
+ $htmlWriter = Prado::createComponent($this->GetResponse()->getHtmlWriterType(), new TTextWriter());
+ parent::render($htmlWriter);
$document = new DOMDocument();
- $document->loadXML($textWriter->flush());
+ $document->loadXML($htmlWriter->flush());
}
$stylesheet = $this->getTransformXmlDocument();