summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/tickets/protected/pages
diff options
context:
space:
mode:
Diffstat (limited to 'tests/FunctionalTests/tickets/protected/pages')
-rw-r--r--tests/FunctionalTests/tickets/protected/pages/Ticket191.page19
-rw-r--r--tests/FunctionalTests/tickets/protected/pages/Ticket191.php22
2 files changed, 41 insertions, 0 deletions
diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket191.page b/tests/FunctionalTests/tickets/protected/pages/Ticket191.page
new file mode 100644
index 00000000..2d673b8d
--- /dev/null
+++ b/tests/FunctionalTests/tickets/protected/pages/Ticket191.page
@@ -0,0 +1,19 @@
+<com:TContent ID="Content">
+
+Global state:
+<com:TTextBox ID="TextBox2" />
+<com:TButton Text="Submit" OnClick="updateGlobal" />
+
+<br/>
+
+Your input:
+<com:TTextBox ID="TextBox" />
+<com:TButton Text="Submit" ValidationGroup="Foo" OnClick="buttonClicked" />
+<com:TCustomValidator
+ ValidationGroup="Foo"
+ ControlToValidate="TextBox"
+ Text="Your input must match the global state."
+ OnServerValidate="customValidation" />
+<br/>
+
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket191.php b/tests/FunctionalTests/tickets/protected/pages/Ticket191.php
new file mode 100644
index 00000000..61c2a253
--- /dev/null
+++ b/tests/FunctionalTests/tickets/protected/pages/Ticket191.php
@@ -0,0 +1,22 @@
+<?php
+
+class Ticket191 extends TPage
+{
+ public function buttonClicked($sender,$param)
+ {
+ if($this->IsValid)
+ $this->Application->clearGlobalState('ticket190');
+ }
+
+ public function customValidation($sender,$param)
+ {
+ $param->IsValid=$this->Application->getGlobalState('ticket190')===$this->TextBox->Text;
+ }
+
+ public function updateGlobal($sender,$param)
+ {
+ $this->Application->setGlobalState('ticket190',$this->TextBox2->Text);
+ }
+}
+
+?> \ No newline at end of file