1 |
jonen |
1.1 |
<? |
2 |
|
|
/* |
3 |
|
|
## ----------------------------------------------------------------------------- |
4 |
joko |
1.3 |
## $Id: DataItem.php,v 1.2 2003/04/06 01:33:45 jonen Exp $ |
5 |
jonen |
1.1 |
## ----------------------------------------------------------------------------- |
6 |
jonen |
1.2 |
## $Log: DataItem.php,v $ |
7 |
joko |
1.3 |
## Revision 1.2 2003/04/06 01:33:45 jonen |
8 |
|
|
## + purged code |
9 |
|
|
## |
10 |
jonen |
1.2 |
## Revision 1.1 2003/04/04 00:50:44 jonen |
11 |
|
|
## + initial commit |
12 |
|
|
## |
13 |
jonen |
1.1 |
## Revision 1.1 2003/03/01 22:57:23 cvsmax |
14 |
|
|
## + inital commit |
15 |
|
|
## |
16 |
|
|
## |
17 |
|
|
## ----------------------------------------------------------------------------- |
18 |
|
|
*/ |
19 |
|
|
|
20 |
joko |
1.3 |
|
21 |
|
|
loadModule('WebExplorer::Module::AbstractGUIModule'); |
22 |
|
|
|
23 |
jonen |
1.1 |
class WebExplorer_Module_DataItem extends WebExplorer_Module_AbstractGUIModule { |
24 |
|
|
|
25 |
|
|
|
26 |
|
|
function set_gui_object() { |
27 |
joko |
1.3 |
//print Dumper($this->_args); |
28 |
jonen |
1.1 |
if($this->_args['mode'] == 'view') { |
29 |
|
|
$this->_gui_object = new DataItem($this->_args['caption'], $this->_args['options']); |
30 |
|
|
} |
31 |
|
|
elseif($this->_args['mode'] == 'edit') { |
32 |
|
|
$this->_gui_object = new EditDataItem($this->_args['caption'], $this->_args['options'] ); |
33 |
joko |
1.3 |
} |
34 |
|
|
elseif($this->_args['mode'] == 'delete') { |
35 |
|
|
// 'EditDataItem' already has an infrastructure to do "Confirm"ations, |
36 |
|
|
// so we just try to use it here to let the user confirm the new "delete"-action. |
37 |
|
|
|
38 |
|
|
// TODO: |
39 |
|
|
// Try to implement this aspect of the required infrastructure independent of |
40 |
|
|
// an 'EditDataItem'. Maybe it should become a 'GenericNegotiation'-ecom-component?! |
41 |
|
|
// Aim: Abstract way of handling 'Confirm', 'Cancel' actions on arbitrary "question"??? |
42 |
|
|
$this->_gui_object = new FlexibleDataItem($this->_args['caption'], $this->_args['options'] ); |
43 |
jonen |
1.1 |
} |
44 |
|
|
} |
45 |
|
|
|
46 |
|
|
|
47 |
|
|
} |
48 |
|
|
|
49 |
|
|
?> |