diff options
author | wei <> | 2006-05-05 06:58:04 +0000 |
---|---|---|
committer | wei <> | 2006-05-05 06:58:04 +0000 |
commit | 47d05516b1d1c465217c59732bf8442ab0cfd497 (patch) | |
tree | c8c8fce4eb2c4ca9580b87a7c410fb7606ce1af4 /tests/FunctionalTests/features/protected | |
parent | f21d3433721308f5d0693f44bbfed56f7b2ecc2d (diff) |
Added prioritize callback and enabled viewstate update on callback return.
Diffstat (limited to 'tests/FunctionalTests/features/protected')
-rw-r--r-- | tests/FunctionalTests/features/protected/pages/ActiveControls/ActiveControl.page | 16 | ||||
-rw-r--r-- | tests/FunctionalTests/features/protected/pages/ActiveControls/ActiveControl.php | 3 |
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);
}
}
?>
|