summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/features/protected/pages
diff options
context:
space:
mode:
authorwei <>2006-05-04 02:02:43 +0000
committerwei <>2006-05-04 02:02:43 +0000
commit75a0a250cc6735d13b3b782daf0127298b37c2b9 (patch)
treefc9a1a0b28022d573097dcc7e71b29dfe6c5821f /tests/FunctionalTests/features/protected/pages
parentd255f4d0e332740b3984e21ce3f7a4a4f1968ba3 (diff)
Adding TCallback component.
Diffstat (limited to 'tests/FunctionalTests/features/protected/pages')
-rw-r--r--tests/FunctionalTests/features/protected/pages/ActiveControls/ActiveControl.page21
-rw-r--r--tests/FunctionalTests/features/protected/pages/ActiveControls/ActiveControl.php15
2 files changed, 30 insertions, 6 deletions
diff --git a/tests/FunctionalTests/features/protected/pages/ActiveControls/ActiveControl.page b/tests/FunctionalTests/features/protected/pages/ActiveControls/ActiveControl.page
index c20e810b..87522f72 100644
--- a/tests/FunctionalTests/features/protected/pages/ActiveControls/ActiveControl.page
+++ b/tests/FunctionalTests/features/protected/pages/ActiveControls/ActiveControl.page
@@ -1,22 +1,31 @@
<com:TContent ID="Content">
+ <h1>TCallback Demo</h1>
<com:TClientScript UsingPradoScripts="ajax" />
- <com:TActiveControl id="control1"
- ClientSide.CausesValidation="false"
- ClientSide.OnSuccess="Logger.info('result:'+result)" />
+ <com:TCallback id="control1"
+ OnCallback="control1onCallback">
+ <com:TButton id="button2" Text="Hello" Visible="false"/>
+ </com:TCallback>
<com:TTextBox id="text1" />
- <com:TRequiredFieldValidator
- ControlToValidate="text1"
- ErrorMessage="*" />
+
<com:TCheckBoxList>
<com:TListItem Text="One" />
<com:TListItem Text="Two" />
</com:TCheckBoxList>
+
+ <com:TPanel id="panel2" Visible="false">
+ asdad <com:TCheckBox id="checkbox1" />
+ </com:TPanel>
+
+ <input type="hidden" name="PRADO_CALLBACK_TARGET" value="<%= $this->control1->UniqueID %>" />
+
<com:TButton id="button1" Text="Submit" CausesValidation="false" />
<script>
Event.observe("<%= $this->button1->ClientID %>", "click", function(event)
{
<%= $this->control1->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
new file mode 100644
index 00000000..43d93d30
--- /dev/null
+++ b/tests/FunctionalTests/features/protected/pages/ActiveControls/ActiveControl.php
@@ -0,0 +1,15 @@
+<?php
+/*
+ * Created on 2/05/2006
+ */
+
+class ActiveControl extends TPage
+{
+ public function control1onCallback($sender, $param)
+ {
+ $this->button2->setVisible(true);
+ $this->button2->setText("Time is ".time());
+ $this->control1->render($param->getOutput());
+ }
+}
+?>