summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/active-controls/protected/pages/PostLoadingTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/FunctionalTests/active-controls/protected/pages/PostLoadingTest.php')
-rw-r--r--tests/FunctionalTests/active-controls/protected/pages/PostLoadingTest.php44
1 files changed, 44 insertions, 0 deletions
diff --git a/tests/FunctionalTests/active-controls/protected/pages/PostLoadingTest.php b/tests/FunctionalTests/active-controls/protected/pages/PostLoadingTest.php
new file mode 100644
index 00000000..a8c409e7
--- /dev/null
+++ b/tests/FunctionalTests/active-controls/protected/pages/PostLoadingTest.php
@@ -0,0 +1,44 @@
+<?php
+
+class PostLoadingTest extends TPage
+{
+ public function onInit($param)
+ {
+ parent::onInit($param);
+
+ // Text Box
+ $textBox=new TTextBox();
+ $textBox->setVisible(false);
+ $textBox->setID("MyTextBox");
+ $this->panel1->getControls()->add($textBox);
+ $this->registerObject("MyTextBox", $textBox);
+
+
+ // Submit button
+ $button=new TActiveButton();
+ $button->setVisible(false);
+ $button->setID("MyButton");
+ $button->setText("Submit");
+ $button->attachEventHandler("OnCallback", array($this, "clickedButton"));
+ $this->panel1->getControls()->add($button);
+ $this->registerObject("MyButton", $button);
+
+ }
+
+
+ function callback1_requested($sender, $param)
+ {
+ $this->MyTextBox->visible = true;
+ $this->MyButton->ActiveControl->EnableUpdate=false;
+ $this->MyButton->visible = true;
+ $this->panel1->render($param->NewWriter);
+ }
+
+ function clickedButton($sender, $param)
+ {
+ $this->panel1->getControls()->add('Result is '.$this->MyTextBox->getText());
+ $this->panel1->render($param->NewWriter);
+ }
+}
+
+?> \ No newline at end of file