diff options
author | xue <> | 2005-12-15 04:03:34 +0000 |
---|---|---|
committer | xue <> | 2005-12-15 04:03:34 +0000 |
commit | 14e672d372fcde114114e97bdc894f14f34e37a3 (patch) | |
tree | 2ad0bc9d69e59e7fdf7352a640fbd2c8c269a5e8 | |
parent | 90e3aab1c0c819c3e0f0870cf133527af7705ea6 (diff) |
Test for new databinding feature.
-rw-r--r-- | demos/controls/protected/pages/HomePage.php | 9 | ||||
-rw-r--r-- | demos/controls/protected/pages/HomePage.tpl | 68 |
2 files changed, 51 insertions, 26 deletions
diff --git a/demos/controls/protected/pages/HomePage.php b/demos/controls/protected/pages/HomePage.php index d599dd95..50bdc9e7 100644 --- a/demos/controls/protected/pages/HomePage.php +++ b/demos/controls/protected/pages/HomePage.php @@ -9,6 +9,15 @@ class HomePage extends TPage $this->Theme='';
}
+ public function onLoad($param)
+ {
+ parent::onLoad($param);
+ if(!$this->IsPostBack)
+ {
+ $this->dataBind();
+ }
+ }
+
public function testClick($sender,$param)
{
if($sender->BackColor==='')
diff --git a/demos/controls/protected/pages/HomePage.tpl b/demos/controls/protected/pages/HomePage.tpl index ea5a182c..d1dd7724 100644 --- a/demos/controls/protected/pages/HomePage.tpl +++ b/demos/controls/protected/pages/HomePage.tpl @@ -9,52 +9,68 @@ <com:TLiteral Text="<literal>" Encode="true"/>
-<com:TTextBox
- ID="TextBox"
- Text="textbox"
- AutoPostBack="true"
+<com:TTextBox
+ ID="TextBox"
+ Text="textbox"
+ AutoPostBack="true"
CausesValidation="false" />
-<com:TLabel
- Text="test"
+<com:TLabel
+ Text="test"
AssociatedControlID="checkbox" /><br/>
-<com:System.Web.UI.WebControls.TButton
- text="Toggle Button"
- ForeColor="red"
- Font.size="18"
+<com:System.Web.UI.WebControls.TButton
+ text="Toggle Button"
+ ForeColor="red"
+ Font.size="18"
Click="testClick" /> (requires membership)<br/>
-<com:TCheckBox
- Text="Checkbox"
- ID="checkbox"
+<com:TCheckBox
+ Text="Checkbox"
+ ID="checkbox"
AutoPostBack="true" /><br/>
-<com:TRadioButton
- Text="Radiobutton"
- ID="radiobutton"
+<com:TRadioButton
+ Text="Radiobutton"
+ ID="radiobutton"
AutoPostBack="true" /><br/>
-<com:TImage
+<com:TImage
ImageUrl=<%~/fungii_logo.gif %> />
-<com:TImageButton
- ImageUrl=<%~/fungii_logo.gif %>
+<com:TImageButton
+ ImageUrl=<%~/fungii_logo.gif %>
Click="clickImage"/><br/>
-<com:THyperLink
- Text="Visit a 'classless' page"
+<com:THyperLink
+ Text="Visit a 'classless' page"
NavigateUrl="?sp=page.plain" /> |
-<com:THyperLink
- Text="Visit member only page"
+<com:THyperLink
+ Text="Visit member only page"
NavigateUrl="?sp=page.private.member" />
-<com:TLinkButton
- Text="Click Me"
- Click="linkClicked"
+<com:TLinkButton
+ Text="Click Me"
+ Click="linkClicked"
onclick="javascript:alert('you hit me')"/>
+<!
+<com:TListBox SelectionMode="Multiple">
+ <com:TListItem Text="a" Selected="true" />
+ <com:TListItem Text="b" />
+ <com:TListItem Text="c" />
+ <com:TListItem Text="d" Selected="true" />
+</com:TListBox>
+
+<com:TDropDownList>
+ <com:TListItem Text="a" />
+ <com:TListItem Text="b" />
+ <com:TListItem Text="c" Selected="true" />
+ <com:TListItem Text="d" />
+</com:TDropDownList>
+!>
+<%# $this->Page->TextBox->Text %>
</div>
</com:TForm>
</com:TContent>
\ No newline at end of file |