/[cvs]/nfo/php/libs/org.netfrag.app/WebExplorer/Module/DataItem.php
ViewVC logotype

Diff of /nfo/php/libs/org.netfrag.app/WebExplorer/Module/DataItem.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

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

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.5

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed