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

Diff of /nfo/php/libs/org.netfrag.app/WebExplorer/AbstractExplorer.php

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

revision 1.12 by joko, Tue Apr 8 17:52:12 2003 UTC revision 1.16 by joko, Thu Apr 10 06:00:58 2003 UTC
# Line 4  Line 4 
4  ##    $Id$  ##    $Id$
5  ##    -----------------------------------------------------------------------------  ##    -----------------------------------------------------------------------------
6  ##    $Log$  ##    $Log$
7    ##    Revision 1.16  2003/04/10 06:00:58  joko
8    ##    ALPHA: Item.Delete
9    ##
10    ##    Revision 1.15  2003/04/09 02:08:20  joko
11    ##    CHANGE: renamed key 'classname' through 'nodename'
12    ##
13    ##    Revision 1.14  2003/04/09 00:31:27  jonen
14    ##    + added arguments for data list ecom
15    ##
16    ##    Revision 1.13  2003/04/09 00:03:11  jonen
17    ##    disabled form rendering for inheritanced items at 'list'
18    ##
19  ##    Revision 1.12  2003/04/08 17:52:12  joko  ##    Revision 1.12  2003/04/08 17:52:12  joko
20  ##    CHANGE: renamed property 'datasource' to 'transport'  ##    CHANGE: renamed property 'datasource' to 'transport'
21  ##    NEW: Module 'RemoteAction'  ##    NEW: Module 'RemoteAction'
# Line 162  class WebExplorer_AbstractExplorer { Line 174  class WebExplorer_AbstractExplorer {
174      $this->register_gui_module("content", "data", "list", "WebExplorer::Module::DataList" );      $this->register_gui_module("content", "data", "list", "WebExplorer::Module::DataList" );
175      $this->register_gui_module("content", "data", "item", "WebExplorer::Module::DataItem" );      $this->register_gui_module("content", "data", "item", "WebExplorer::Module::DataItem" );
176      // 2003-04-05 - Chooser      // 2003-04-05 - Chooser
177      $this->register_gui_module("chooser", "nav", "list", "WebExplorer::Module::Chooser");          $this->register_gui_module("chooser", "nav", "list", "WebExplorer::Module::Chooser");
178      // 2003-04-07 - RemoteAction      // 2003-04-07 - RemoteAction
179      $this->register_gui_module("phase_startup", "call", "auto", "WebExplorer::Module::RemoteAction");          $this->register_gui_module("phase_startup", "call", "auto", "WebExplorer::Module::RemoteAction");
180        // 2003-04-09 - Item.Delete
181        $this->register_gui_module("phase_startup", "data", "item", "WebExplorer::Module::DataItem");
182        //$this->register_gui_module("phase_startup", "data", "auto", "WebExplorer::Module::RemoteAction");
183        //$this->register_gui_module("phase_startup", "data", "auto", "WebExplorer::Module::DataItem");
184    }    }
185    
186    function register_source_module($label, $args) {    function register_source_module($label, $args) {
# Line 194  class WebExplorer_AbstractExplorer { Line 210  class WebExplorer_AbstractExplorer {
210    
211        
212    function _load_ecom($label) {    function _load_ecom($label) {
213        
214      // fetch values from state      // fetch values from state
215      $val = $this->_e_state['ecoms'][$label];      $val = $this->_e_state['ecoms'][$label];
216      debug::info("_load_ecom($label): " . Dumper($val) . "<br/>");      debug::info("_load_ecom($label): " . Dumper($val) . "<br/>");
217    
218        // NEW [2003-04-10]: ecom-RESET-condition
219        if (!is_array($val) && $val == 'RESET') {
220          debug::info("Resetting component: $label");
221          return;
222        }
223    
224      // find right ecom gui module      // find right ecom gui module
225      $ecom_type = $val['ecom_type'];      $ecom_type = $val['ecom_type'];
226      $abstract_type = $val['ecom_abstract_type'];      $abstract_type = $val['ecom_abstract_type'];
# Line 288  class WebExplorer_AbstractExplorer { Line 311  class WebExplorer_AbstractExplorer {
311        // switch abstract type        // switch abstract type
312        if($val['ecom_abstract_type'] == "list") {        if($val['ecom_abstract_type'] == "list") {
313          if($val['ecom_data_locator_key'] == "rpc") {          if($val['ecom_data_locator_key'] == "rpc") {
314            //$data_locator_meta = array( transport => 'rpc', metatype => 'data', vartype => 'objects', classname => $val['ecom_data_ident']);            //$data_locator_meta = array( transport => 'rpc', metatype => 'data', vartype => 'objects', nodename => $val['ecom_data_ident']);
315            $data_locator_meta = array( transport => 'rpc', metatype => 'data', abstract_type => 'list', classname => $val['ecom_data_ident']);            $data_locator_meta = array( transport => 'rpc', metatype => 'data', abstract_type => 'list', nodename => $val['ecom_data_ident']);
316          } else {          } else {
317            user_error("AbstractExplorer::_prepare_component_args - Cannot build query for data_locator_key $val[ecom_data_locator_key] !");            user_error("AbstractExplorer::_prepare_component_args - Cannot build query for data_locator_key $val[ecom_data_locator_key] !");
318          }          }
# Line 301  class WebExplorer_AbstractExplorer { Line 324  class WebExplorer_AbstractExplorer {
324                                            'decode' => 1,                                            'decode' => 1,
325                                            'decode_args' => array(                                            'decode_args' => array(
326                                                'seperator' => "_",                                                'seperator' => "_",
327                                                'form' => 1,                                                //'form' => 1,
328                                                  ),
329                                              'actionbar' => array(
330                                                  'name' => "ecdfa",
331                                                  'list' => array(
332                                                      "View" => 'view',
333                                                      "Edit" => 'edit',
334                                                      "Delete" => 'delete',
335                                                      "Add new" => 'add',
336                                                      ),
337                                                ),                                                ),
338                                            ),                                            ),
339                        );                        );
340        // switch abstract type        // switch abstract type
341        } elseif ($val['ecom_abstract_type'] == "item") {        } elseif ($val['ecom_abstract_type'] == "item") {
342          if($val['ecom_data_locator_key'] == "rpc") {          if($val['ecom_data_locator_key'] == "rpc") {
343            //$data_locator_meta = array( transport => 'rpc', metatype => 'data', vartype => 'objects', classname => $val['ecom_data_ident']);            //$data_locator_meta = array( transport => 'rpc', metatype => 'data', vartype => 'objects', nodename => $val['ecom_data_ident']);
344            $data_locator_meta = array( transport => 'rpc', metatype => 'data', abstract_type => 'item', ident => $val['ecom_data_ident'], classname => $val['ecom_data_meta']);            $data_locator_meta = array( transport => 'rpc', metatype => 'data', abstract_type => 'item', ident => $val['ecom_data_ident'], nodename => $val['ecom_data_meta']);
345          } else {          } else {
346            user_error("AbstractExplorer::_prepare_component_args - Cannot build query for data_locator_key $val[ecom_data_locator_key] !");            user_error("AbstractExplorer::_prepare_component_args - Cannot build query for data_locator_key $val[ecom_data_locator_key] !");
347          }          }
348            
349            // defaults
350          if(!$val['ecom_mode']) { $val['ecom_mode'] = "view"; }          if(!$val['ecom_mode']) { $val['ecom_mode'] = "view"; }
351            //$val['ecom_mode'] = "view";
352            
353            // debugging
354          print "Mode: $val[ecom_mode]<br>";          print "Mode: $val[ecom_mode]<br>";
355            
356            // prepare some arguments...
357          $args = array(          $args = array(
358                        'caption' => $val['ecom_data_meta'],                        'caption' => $val['ecom_data_meta'],
359                        'mode' => $val['ecom_mode'],                        'mode' => $val['ecom_mode'],
# Line 326  class WebExplorer_AbstractExplorer { Line 365  class WebExplorer_AbstractExplorer {
365                                                ),                                                ),
366                                            ),                                            ),
367                        );                        );
368           if($val['ecom_mode'] == "edit") { $args['adapter'] = 'FormProcessor'; }           if ($val['ecom_mode'] == "edit") { $args['adapter'] = 'FormProcessor'; }
369            
370             // FIXME: (see WebExplorer::Module::AbstractGUIModule)
371             //if ($val['ecom_mode'] == "delete") { $args['adapter'] = 'GenericNegotiation'; }
372             if ($val['ecom_mode'] == "delete") { $args['adapter'] = 'NonValidatingFormProcessor'; }
373            
374        }        }
375            
376      // switch component type      // switch component type

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.16

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