summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/features/protected/pages/ActiveControls
diff options
context:
space:
mode:
Diffstat (limited to 'tests/FunctionalTests/features/protected/pages/ActiveControls')
-rw-r--r--tests/FunctionalTests/features/protected/pages/ActiveControls/ActiveControl.page16
-rw-r--r--tests/FunctionalTests/features/protected/pages/ActiveControls/ActiveControl.php3
2 files changed, 15 insertions, 4 deletions
diff --git a/tests/FunctionalTests/features/protected/pages/ActiveControls/ActiveControl.page b/tests/FunctionalTests/features/protected/pages/ActiveControls/ActiveControl.page
index 2d43bb82..b33e9000 100644
--- a/tests/FunctionalTests/features/protected/pages/ActiveControls/ActiveControl.page
+++ b/tests/FunctionalTests/features/protected/pages/ActiveControls/ActiveControl.page
@@ -2,6 +2,11 @@
<h1>TCallback Demo</h1>
<com:TClientScript UsingPradoScripts="ajax" />
<com:TCallback id="control1"
+ ClientSide.EnablePageStateUpdate="false"
+ OnCallback="control1onCallback" />
+
+ <com:TCallback id="control2"
+ ClientSide.HasPriority="false"
OnCallback="control1onCallback" />
<com:TActiveLabel id="label1" Text="Name:" />
@@ -12,9 +17,8 @@
<com:TListItem Text="Two" />
</com:TCheckBoxList>
- <input type="hidden" name="PRADO_CALLBACK_TARGET" value="<%= $this->control1->UniqueID %>" />
-
- <com:TButton id="button1" Text="Submit" CausesValidation="false" />
+ <com:TButton id="button1" Text="Submit 1" CausesValidation="false" />
+ <com:TButton id="button2" Text="Submit 2" CausesValidation="false" />
<script>
Event.observe("<%= $this->button1->ClientID %>", "click", function(event)
{
@@ -22,6 +26,12 @@
Event.stop(event);
});
+ Event.observe("<%= $this->button2->ClientID %>", "click", function(event)
+ {
+ <%= $this->control2->CallbackReference %>
+
+ Event.stop(event);
+ });
</script>
</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/features/protected/pages/ActiveControls/ActiveControl.php b/tests/FunctionalTests/features/protected/pages/ActiveControls/ActiveControl.php
index 8323667a..e9a6226a 100644
--- a/tests/FunctionalTests/features/protected/pages/ActiveControls/ActiveControl.php
+++ b/tests/FunctionalTests/features/protected/pages/ActiveControls/ActiveControl.php
@@ -7,7 +7,8 @@ class ActiveControl extends TPage
{
public function control1onCallback($sender, $param)
{
- $this->label1->setText("The time is ".time());
+ sleep(5);
+ $this->label1->setText("The time is ".time()." from ".$sender->ID);
}
}
?>