summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/tickets/protected/pages/Ticket900.php
diff options
context:
space:
mode:
authormikl <>2008-10-13 19:54:32 +0000
committermikl <>2008-10-13 19:54:32 +0000
commit210f6d6d29be3c93251a515616408c0872d6da26 (patch)
tree4cb4ca944bf5d608e7e3a290acfb46aba1e3e275 /tests/FunctionalTests/tickets/protected/pages/Ticket900.php
parent7bc7bfe01d2dbf835130cbe579d15c0f5b647c55 (diff)
Added Testcase for #900
Diffstat (limited to 'tests/FunctionalTests/tickets/protected/pages/Ticket900.php')
-rw-r--r--tests/FunctionalTests/tickets/protected/pages/Ticket900.php58
1 files changed, 58 insertions, 0 deletions
diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket900.php b/tests/FunctionalTests/tickets/protected/pages/Ticket900.php
new file mode 100644
index 00000000..21e87f67
--- /dev/null
+++ b/tests/FunctionalTests/tickets/protected/pages/Ticket900.php
@@ -0,0 +1,58 @@
+<?php
+class Ticket900 extends TPage {
+
+ public function onLoad($param)
+ {
+ parent::onLoad($param);
+ if(!$this->IsPostBack)
+ {
+ $this->DataGrid->DataSource=$this->Data;
+ $this->DataGrid->dataBind();
+ }
+ }
+
+
+ protected function getData()
+ {
+ return array(
+ array( 'title' => 'Title A'),
+ array( 'title' => 'Title B'),
+ array( 'title' => 'Title C')
+ );
+ }
+
+
+ public function editItem($sender,$param)
+ {
+ $this->CommandName->Text='edit';
+ $this->DataGrid->EditItemIndex=$param->Item->ItemIndex;
+ $this->DataGrid->DataSource=$this->Data;
+ $this->DataGrid->dataBind();
+ }
+
+ public function saveItem($sender,$param)
+ {
+ $this->CommandName->Text='save';
+ $this->DataGrid->EditItemIndex=-1;
+ $this->DataGrid->DataSource=$this->Data;
+ $this->DataGrid->dataBind();
+ }
+
+ public function cancelItem($sender,$param)
+ {
+ $this->CommandName->Text='cancel';
+ $this->DataGrid->EditItemIndex=-1;
+ $this->DataGrid->DataSource=$this->Data;
+ $this->DataGrid->dataBind();
+ }
+
+ public function deleteItem($sender,$param)
+ {
+ $this->CommandName->Text='delete';
+ $this->DataGrid->EditItemIndex=-1;
+ $this->DataGrid->DataSource=$this->Data;
+ $this->DataGrid->dataBind();
+ }
+
+}
+?>