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