From c2981557f2112fbf93267058ad7f9c361bf2f180 Mon Sep 17 00:00:00 2001
From: xue <>
Date: Wed, 11 Jan 2006 05:35:34 +0000
Subject: Fixed many issues with DataBoundControls. Added Prado Composer Demo
(not done yet).
---
demos/composer/protected/pages/Home.page | 75 +++++++++++++++++++
demos/composer/protected/pages/Home.php | 120 ++++++++++++++++++++++++++++++
demos/composer/protected/pages/Layout.php | 15 ++++
demos/composer/protected/pages/Layout.tpl | 24 ++++++
4 files changed, 234 insertions(+)
create mode 100644 demos/composer/protected/pages/Home.page
create mode 100644 demos/composer/protected/pages/Home.php
create mode 100644 demos/composer/protected/pages/Layout.php
create mode 100644 demos/composer/protected/pages/Layout.tpl
(limited to 'demos/composer/protected')
diff --git a/demos/composer/protected/pages/Home.page b/demos/composer/protected/pages/Home.page
new file mode 100644
index 00000000..648bec21
--- /dev/null
+++ b/demos/composer/protected/pages/Home.page
@@ -0,0 +1,75 @@
+<%@ MasterClass="Application.pages.Layout" Theme="Simple" %>
+
+
+
+class
+extends
+implements
+
+Author Name:
+Author Email:
+
+Comments:
+
+
+
+
+
+ Accessibility |
+ Name |
+ Type |
+ Default Value |
+ Storage Mode |
+ Comments |
+ Actions |
+
+
+
+
+
+ Parent->DataItem->IsProtected %> />
+ Parent->DataItem->ReadOnly %> />
+ |
+
+ Parent->DataItem->Name %> CssClass="slTextBox"/>
+ |
+
+ Parent->DataItem->Type %> >
+
+
+
+
+
+
+ |
+
+ Parent->DataItem->DefaultValue %> CssClass="slTextBox"/>
+ |
+
+ Parent->DataItem->Storage %> >
+
+
+
+
+ |
+
+ |
+
+
+
+ |
+
+
+
+
+
+
+Event Definitions:
+
+
+
+
+
+
+
diff --git a/demos/composer/protected/pages/Home.php b/demos/composer/protected/pages/Home.php
new file mode 100644
index 00000000..a2281828
--- /dev/null
+++ b/demos/composer/protected/pages/Home.php
@@ -0,0 +1,120 @@
+IsPostBack)
+ {
+ $this->Repeater->setDataSource($this->getInitialProperties());
+ $this->Repeater->dataBind();
+ }
+ else
+ $this->Repeater->ensureChildControls();
+ }
+
+ protected function getInitialProperties()
+ {
+ return array(
+ new PropertyDefinition,
+ new PropertyDefinition,
+ new PropertyDefinition,
+ new PropertyDefinition,
+ );
+ }
+
+ public function generateCode($sender,$param)
+ {
+ $code="ClassName->Text." extends ".$this->ParentClass->Text."implements ".$this->Interfaces->Text;
+ $code.="\n";
+ $code.="{\n";
+ $code.="}\n";
+ $code.="?>";
+ $this->SourceCode->Text=htmlentities($code);
+ }
+}
+
+class PropertyDefinition extends TComponent
+{
+ private $_name='';
+ private $_type='string';
+ private $_default='';
+ private $_readOnly=false;
+ private $_protected=false;
+ private $_storage='ViewState';
+ private $_comments='';
+
+ public function getName()
+ {
+ return $this->_name;
+ }
+
+ public function setName($value)
+ {
+ $this->_name=$value;
+ }
+
+ public function getType()
+ {
+ return $this->_type;
+ }
+
+ public function setType($value)
+ {
+ $this->_type=$value;
+ }
+
+ public function getDefaultValue()
+ {
+ return $this->_default;
+ }
+
+ public function setDefaultValue($value)
+ {
+ $this->_default=$value;
+ }
+
+ public function getReadOnly()
+ {
+ return $this->_readOnly;
+ }
+
+ public function setReadOnly($value)
+ {
+ $this->_readOnly=TPropertyValue::ensureBoolean($value);
+ }
+
+ public function getIsProtected()
+ {
+ return $this->_protected;
+ }
+
+ public function setIsProtected($value)
+ {
+ $this->_protected=TPropertyValue::ensureBoolean($value);
+ }
+
+ public function getStorage()
+ {
+ return $this->_storage;
+ }
+
+ public function setStorage($value)
+ {
+ $this->_storage=$value;
+ }
+
+ public function getComments()
+ {
+ return $this->_comments;
+ }
+
+ public function setComments($value)
+ {
+ $this->_comments=$value;
+ }
+}
+
+?>
\ No newline at end of file
diff --git a/demos/composer/protected/pages/Layout.php b/demos/composer/protected/pages/Layout.php
new file mode 100644
index 00000000..a82d2fff
--- /dev/null
+++ b/demos/composer/protected/pages/Layout.php
@@ -0,0 +1,15 @@
+TopicPanel->Visible=!$this->TopicPanel->Visible;
+ if($this->TopicPanel->Visible)
+ $sender->Text="Hide TOC";
+ else
+ $sender->Text="Show TOC";
+ }
+}
+
+?>
\ No newline at end of file
diff --git a/demos/composer/protected/pages/Layout.tpl b/demos/composer/protected/pages/Layout.tpl
new file mode 100644
index 00000000..b72e8959
--- /dev/null
+++ b/demos/composer/protected/pages/Layout.tpl
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
--
cgit v1.2.3