summaryrefslogtreecommitdiff
path: root/demos/quickstart/protected/pages/Controls/Samples
diff options
context:
space:
mode:
authorxue <>2006-04-07 03:32:11 +0000
committerxue <>2006-04-07 03:32:11 +0000
commit370c682479edb2fd3f40ee701f7bb4ef088e8283 (patch)
treed5fee37ac2b40a3a984bf860bce09562a8532040 /demos/quickstart/protected/pages/Controls/Samples
parent8b7717c06b86262d188827fb26a4bfb2e480c256 (diff)
Breaking change!! Optimized the representation and evaluation of template expression, statements and databind tags.
Diffstat (limited to 'demos/quickstart/protected/pages/Controls/Samples')
-rw-r--r--demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample2.page2
-rw-r--r--demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample2.php2
-rw-r--r--demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample6.page1
-rw-r--r--demos/quickstart/protected/pages/Controls/Samples/TDataList/Sample1.page10
-rw-r--r--demos/quickstart/protected/pages/Controls/Samples/TDataList/Sample2.page12
-rw-r--r--demos/quickstart/protected/pages/Controls/Samples/TExpression/Home.page6
-rw-r--r--demos/quickstart/protected/pages/Controls/Samples/TRepeater/Sample1.page20
-rw-r--r--demos/quickstart/protected/pages/Controls/Samples/TRepeater/Sample2.page8
-rw-r--r--demos/quickstart/protected/pages/Controls/Samples/TRepeater/Sample3.page12
-rw-r--r--demos/quickstart/protected/pages/Controls/Samples/TStatements/Home.page9
10 files changed, 35 insertions, 47 deletions
diff --git a/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample2.page b/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample2.page
index 6de3063a..79c1890c 100644
--- a/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample2.page
+++ b/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample2.page
@@ -42,7 +42,7 @@
<com:TTemplateColumn>
<prop:HeaderTemplate>Rating</prop:HeaderTemplate>
<prop:ItemTemplate>
- <img src="images/star<%#$this->NamingContainer->DataItem['rating']%>.gif" alt="" />
+ <img src="images/star<%#$this->Parent->DataItem['rating']%>.gif" alt="" />
</prop:ItemTemplate>
</com:TTemplateColumn>
</com:TDataGrid>
diff --git a/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample2.php b/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample2.php
index d40e3be3..a49077b5 100644
--- a/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample2.php
+++ b/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample2.php
@@ -78,6 +78,8 @@ class Sample2 extends TPage
{
foreach($this->DataGrid->Columns as $index=>$column)
$column->Visible=$sender->Items[$index]->Selected;
+ $this->DataGrid->DataSource=$this->Data;
+ $this->DataGrid->dataBind();
}
}
diff --git a/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample6.page b/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample6.page
index d2277bc5..3d1a33a8 100644
--- a/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample6.page
+++ b/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample6.page
@@ -6,6 +6,7 @@
<div style="width:500px">
<com:TDataGrid
ID="DataGrid"
+ Width="100%"
AllowPaging="true"
AllowCustomPaging="true"
VirtualItemCount="19"
diff --git a/demos/quickstart/protected/pages/Controls/Samples/TDataList/Sample1.page b/demos/quickstart/protected/pages/Controls/Samples/TDataList/Sample1.page
index dee3a41c..25b7db81 100644
--- a/demos/quickstart/protected/pages/Controls/Samples/TDataList/Sample1.page
+++ b/demos/quickstart/protected/pages/Controls/Samples/TDataList/Sample1.page
@@ -26,7 +26,7 @@ Since the page is mainly for display and does not require user interactions, the
<prop:FooterTemplate>
<div style="font-weight:bold; text-align:center;">
-Total <%# $this->Parent->Parent->ItemCount %> products.
+Total <%# $this->Parent->ItemCount %> products.
</div>
</prop:FooterTemplate>
@@ -36,10 +36,10 @@ Total <%# $this->Parent->Parent->ItemCount %> products.
<th>ID</th><th>Name</th><th>Quantity</th><th>Price</th>
</tr>
<tr>
- <td align="right"><%#$this->Parent->DataItem['id'] %></td>
- <td align="right"><%#$this->Parent->DataItem['name'] %></td>
- <td align="right"><%#$this->Parent->DataItem['quantity'] %></td>
- <td align="right">$<%#$this->Parent->DataItem['price'] %></td>
+ <td align="right"><%#$this->DataItem['id'] %></td>
+ <td align="right"><%#$this->DataItem['name'] %></td>
+ <td align="right"><%#$this->DataItem['quantity'] %></td>
+ <td align="right">$<%#$this->DataItem['price'] %></td>
</tr>
</table>
</prop:ItemTemplate>
diff --git a/demos/quickstart/protected/pages/Controls/Samples/TDataList/Sample2.page b/demos/quickstart/protected/pages/Controls/Samples/TDataList/Sample2.page
index 07980c49..4b484b21 100644
--- a/demos/quickstart/protected/pages/Controls/Samples/TDataList/Sample2.page
+++ b/demos/quickstart/protected/pages/Controls/Samples/TDataList/Sample2.page
@@ -29,7 +29,7 @@
Text=<%#$this->Parent->DataItem['id']%>
CommandName="select"
/>
- <%#$this->Parent->DataItem['name']%>
+ <%#$this->DataItem['name']%>
</td>
<td align="right">
<com:TLinkButton
@@ -52,10 +52,10 @@
<th>ID</th><th>Name</th><th>Quantity</th><th>Price</th>
</tr>
<tr>
- <td align="right"><%#$this->Parent->DataItem['id'] %></td>
- <td align="right"><%#$this->Parent->DataItem['name'] %></td>
- <td align="right"><%#$this->Parent->DataItem['quantity'] %></td>
- <td align="right">$<%#$this->Parent->DataItem['price'] %></td>
+ <td align="right"><%#$this->DataItem['id'] %></td>
+ <td align="right"><%#$this->DataItem['name'] %></td>
+ <td align="right"><%#$this->DataItem['quantity'] %></td>
+ <td align="right">$<%#$this->DataItem['price'] %></td>
</tr>
<tr>
<td colspan="4" align="right">
@@ -77,7 +77,7 @@
<table border="0" width="100%">
<tr>
<td align="right">ID</td>
- <td><b><%#$this->Parent->DataItem['id']%></b></td>
+ <td><b><%#$this->DataItem['id']%></b></td>
</tr>
<tr>
<td align="right">Name</td>
diff --git a/demos/quickstart/protected/pages/Controls/Samples/TExpression/Home.page b/demos/quickstart/protected/pages/Controls/Samples/TExpression/Home.page
index 2273f3c1..8c736ca9 100644
--- a/demos/quickstart/protected/pages/Controls/Samples/TExpression/Home.page
+++ b/demos/quickstart/protected/pages/Controls/Samples/TExpression/Home.page
@@ -10,12 +10,6 @@ Using expression component tag:
<com:TExpression Expression="$this->Page->Head->Title" />
</td></tr>
-<tr><td class="samplenote">
-Using shortcut expression tag:
-</td><td class="sampleaction">
-<%= $this->Page->PagePath %>
-</td></tr>
-
</table>
</com:TContent> \ No newline at end of file
diff --git a/demos/quickstart/protected/pages/Controls/Samples/TRepeater/Sample1.page b/demos/quickstart/protected/pages/Controls/Samples/TRepeater/Sample1.page
index e28ef6fb..f519342d 100644
--- a/demos/quickstart/protected/pages/Controls/Samples/TRepeater/Sample1.page
+++ b/demos/quickstart/protected/pages/Controls/Samples/TRepeater/Sample1.page
@@ -17,21 +17,21 @@
<prop:ItemTemplate>
<tr style="background-color:#BFCFFF">
-<td><%#$this->Parent->DataItem['id']%></td>
-<td><%#$this->Parent->DataItem['name']%></td>
-<td><%#$this->Parent->DataItem['quantity']%></td>
-<td><%#$this->Parent->DataItem['price']%></td>
-<td><%#$this->Parent->DataItem['imported']?'Yes':'No'%></td>
+<td><%#$this->DataItem['id']%></td>
+<td><%#$this->DataItem['name']%></td>
+<td><%#$this->DataItem['quantity']%></td>
+<td><%#$this->DataItem['price']%></td>
+<td><%#$this->DataItem['imported']?'Yes':'No'%></td>
</tr>
</prop:ItemTemplate>
<prop:AlternatingItemTemplate>
<tr style="background-color:#E6ECFF">
-<td><%#$this->Parent->DataItem['id']%></td>
-<td><%#$this->Parent->DataItem['name']%></td>
-<td><%#$this->Parent->DataItem['quantity']%></td>
-<td><%#$this->Parent->DataItem['price']%></td>
-<td><%#$this->Parent->DataItem['imported']?'Yes':'No'%></td>
+<td><%#$this->DataItem['id']%></td>
+<td><%#$this->DataItem['name']%></td>
+<td><%#$this->DataItem['quantity']%></td>
+<td><%#$this->DataItem['price']%></td>
+<td><%#$this->DataItem['imported']?'Yes':'No'%></td>
</tr>
</prop:AlternatingItemTemplate>
diff --git a/demos/quickstart/protected/pages/Controls/Samples/TRepeater/Sample2.page b/demos/quickstart/protected/pages/Controls/Samples/TRepeater/Sample2.page
index b939c586..ce0942c3 100644
--- a/demos/quickstart/protected/pages/Controls/Samples/TRepeater/Sample2.page
+++ b/demos/quickstart/protected/pages/Controls/Samples/TRepeater/Sample2.page
@@ -14,7 +14,7 @@
<prop:ItemTemplate>
<tr>
<com:TTableCell ID="Cell">
- <%#$this->NamingContainer->DataItem %>
+ <%#$this->DataItem %>
</com:TTableCell>
<td>
<com:TRepeater
@@ -29,13 +29,13 @@
<prop:ItemTemplate>
<com:TTableRow ID="Row">
<com:TTableCell Width="70px">
- <%#$this->NamingContainer->DataItem['name'] %>
+ <%#$this->DataItem['name'] %>
</com:TTableCell>
<com:TTableCell Width="20">
- <%#$this->NamingContainer->DataItem['age'] %>
+ <%#$this->DataItem['age'] %>
</com:TTableCell>
<com:TTableCell Width="150px">
- <%#$this->NamingContainer->DataItem['position'] %>
+ <%#$this->DataItem['position'] %>
</com:TTableCell>
</com:TTableRow>
</prop:ItemTemplate>
diff --git a/demos/quickstart/protected/pages/Controls/Samples/TRepeater/Sample3.page b/demos/quickstart/protected/pages/Controls/Samples/TRepeater/Sample3.page
index fde06a36..38636962 100644
--- a/demos/quickstart/protected/pages/Controls/Samples/TRepeater/Sample3.page
+++ b/demos/quickstart/protected/pages/Controls/Samples/TRepeater/Sample3.page
@@ -69,12 +69,12 @@ The following example allows users to modify the existing tabular data using a <
</prop:HeaderTemplate>
<prop:ItemTemplate>
-<tr style="<%# 'background-color:' . ($this->Parent->ItemIndex%2 ? '#BFCFFF' : '#E6ECFF') %>">
-<td><%#$this->Parent->DataItem['id']%></td>
-<td><%#$this->Parent->DataItem['name']%></td>
-<td><%#$this->Parent->DataItem['category']%></td>
-<td><%#$this->Parent->DataItem['price']%></td>
-<td><%#$this->Parent->DataItem['imported']?'Yes':'No'%></td>
+<tr style="<%# 'background-color:' . ($this->ItemIndex%2 ? '#BFCFFF' : '#E6ECFF') %>">
+<td><%#$this->DataItem['id']%></td>
+<td><%#$this->DataItem['name']%></td>
+<td><%#$this->DataItem['category']%></td>
+<td><%#$this->DataItem['price']%></td>
+<td><%#$this->DataItem['imported']?'Yes':'No'%></td>
</tr>
</prop:ItemTemplate>
diff --git a/demos/quickstart/protected/pages/Controls/Samples/TStatements/Home.page b/demos/quickstart/protected/pages/Controls/Samples/TStatements/Home.page
index 66734ce0..d07bf159 100644
--- a/demos/quickstart/protected/pages/Controls/Samples/TStatements/Home.page
+++ b/demos/quickstart/protected/pages/Controls/Samples/TStatements/Home.page
@@ -15,15 +15,6 @@ Using TStatements component tag:
</com:TStatements>
</td></tr>
-<tr><td class="samplenote">
-Using shortcut statements tag:
-</td><td class="sampleaction">
-<%%
- $uid=$this->UniqueID;
- echo "UniqueID is '$uid'.";
-%>
-</td></tr>
-
</table>
</com:TContent> \ No newline at end of file