summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/tickets/protected/pages/Ticket528.php
diff options
context:
space:
mode:
authorwei <>2007-03-30 12:06:27 +0000
committerwei <>2007-03-30 12:06:27 +0000
commitfbfbdcb233e94b7fed6f8ae209eb90d79aa33f7e (patch)
tree4c684403050cf0633574547316ede7a4e56cb7bb /tests/FunctionalTests/tickets/protected/pages/Ticket528.php
parent63f771ad05eaf96c11053cb6e009f7b8633eb4fe (diff)
Add test case for #528
Diffstat (limited to 'tests/FunctionalTests/tickets/protected/pages/Ticket528.php')
-rw-r--r--tests/FunctionalTests/tickets/protected/pages/Ticket528.php35
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket528.php b/tests/FunctionalTests/tickets/protected/pages/Ticket528.php
new file mode 100644
index 00000000..c2d1fcbe
--- /dev/null
+++ b/tests/FunctionalTests/tickets/protected/pages/Ticket528.php
@@ -0,0 +1,35 @@
+<?php
+Prado::using('System.Web.UI.ActiveControls.*');
+class Ticket528 extends TPage
+{
+ public static $turnos = array(
+ 'M' => array('id_turno' => 'M', 'descricao' => 'Manhã'),
+ 'T' => array('id_turno' => 'T', 'descricao' => 'Tarde'),
+ 'N' => array('id_turno' => 'N', 'descricao' => 'Noite')
+ );
+
+
+ public function onLoad($param)
+ {
+ parent::onLoad($param);
+ if (!$this->IsPostBack) {
+ $this->DDropTurno->loadOptions();
+ $this->loadDadosTurno($this->DDropTurno->getSelectedValue());
+ }
+ }
+
+
+ protected function loadDadosTurno($id)
+ {
+ $this->Codigo->setText(self::$turnos[$id]['id_turno']);
+ $this->Descricao->setText(self::$turnos[$id]['descricao']);
+ }
+
+
+ public function trocaTurno($sender,$param)
+ {
+ $this->loadDadosTurno($sender->getSelectedValue());
+ }
+}
+
+?> \ No newline at end of file