diff options
author | wei <> | 2007-03-30 12:06:27 +0000 |
---|---|---|
committer | wei <> | 2007-03-30 12:06:27 +0000 |
commit | fbfbdcb233e94b7fed6f8ae209eb90d79aa33f7e (patch) | |
tree | 4c684403050cf0633574547316ede7a4e56cb7bb /tests/FunctionalTests/tickets/protected/pages/DActiveDropDownList2.php | |
parent | 63f771ad05eaf96c11053cb6e009f7b8633eb4fe (diff) |
Add test case for #528
Diffstat (limited to 'tests/FunctionalTests/tickets/protected/pages/DActiveDropDownList2.php')
-rw-r--r-- | tests/FunctionalTests/tickets/protected/pages/DActiveDropDownList2.php | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/tests/FunctionalTests/tickets/protected/pages/DActiveDropDownList2.php b/tests/FunctionalTests/tickets/protected/pages/DActiveDropDownList2.php new file mode 100644 index 00000000..81fdfea7 --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/pages/DActiveDropDownList2.php @@ -0,0 +1,34 @@ +<?php
+Prado::using('System.Web.UI.ActiveControls.*');
+class DActiveDropDownList2 extends TActiveDropDownList
+{
+ public function setOpcoes($val)
+ {
+ $this->setViewState('Opcoes', $val);
+ }
+
+ public function loadOptions()
+ {
+ $opcao = $this->getViewState('Opcoes');
+
+ switch ($opcao) {
+ case "turnos":
+ $this->DataTextField="descricao";
+ $this->DataValueField="id_turno";
+ $opts = array(
+ array('id_turno' => 'M', 'descricao' => 'Manhã'),
+ array('id_turno' => 'T', 'descricao' => 'Tarde'),
+ array('id_turno' => 'N', 'descricao' => 'Noite')
+ );
+ break;
+
+ default:
+ throw new TConfigurationException('Falta argumento OPCOES no DActiveDropDownList');
+ break;
+ }
+ $this->setDataSource($opts);
+ $this->dataBind();
+ }
+}
+
+?>
\ No newline at end of file |