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

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

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

revision 1.12 by jonen, Fri Apr 18 13:40:54 2003 UTC revision 1.13 by joko, Fri Apr 18 15:30:24 2003 UTC
# Line 4  Line 4 
4   * $Id$   * $Id$
5   *   *
6   * $Log$   * $Log$
7     * Revision 1.13  2003/04/18 15:30:24  joko
8     * NEW: parameter 'ecom_data_filter' - used for 'items'
9     *   (introduced to filter xml-payload at backend side via xpath queries)
10     * documented global state parameters
11     * some comments
12     *
13   * Revision 1.12  2003/04/18 13:40:54  jonen   * Revision 1.12  2003/04/18 13:40:54  jonen
14   * + added 'topic' to requested vars which will currently be merged with the 'ap' var   * + added 'topic' to requested vars which will currently be merged with the 'ap' var
15   *   *
# Line 111  class WebExplorer_MVC extends Site_WebAp Line 117  class WebExplorer_MVC extends Site_WebAp
117          'ecom_data_meta',          'ecom_data_meta',
118          'ecom_data_action_edit', 'ecom_data_action_cancel', 'ecom_data_action_delete',          'ecom_data_action_edit', 'ecom_data_action_cancel', 'ecom_data_action_delete',
119          'ecom_data_form_checkbox', 'ecom_data_form_action',          'ecom_data_form_checkbox', 'ecom_data_form_action',
120          'ecom_data_source_key'          'ecom_data_source_key',
121            'ecom_data_filter',
122        ),        ),
123        request_arg => array(        request_arg => array(
124          'topic' => array( query_arg => 't' ),          
125          'ap' => array( query_arg => 'ap' ),          // a key identifying the current topic
126          'ecom_label' => array( query_arg => 'ecl' ),            'topic' => array( query_arg => 't' ),
127          'ecom_type' => array( query_arg => 'ect' ),  
128          'ecom_abstract_type' => array( query_arg => 'ecat' ),          // a key identifying the current page
129          'ecom_mode' => array( query_arg => 'ecmod' ),            'ap' => array( query_arg => 'ap' ),
130          'ecom_data_locator_key' => array( query_arg => 'ecdlk' ),          
131          'ecom_data_ident' => array( query_arg => 'ecdid' ),          // ecom, ecom, ecom
132          'ecom_data_meta' => array( query_arg => 'ecdm' ),            
133          'ecom_data_action_edit' => array( query_arg => 'ecdfe' ),            // component specific arguments (important for the main dispatcher, etc.)
134          'ecom_data_action_cancel' => array( query_arg => 'ecdfc' ),            // a label identifying a component
135          'ecom_data_action_delete' => array( query_arg => 'ecdfd' ),            'ecom_label' => array( query_arg => 'ecl' ),
136          'ecom_data_form_action' => array( query_arg => 'ecdfa' ),            // data or schema
137          'ecom_data_form_checkbox' => array( query_arg => 'checkbox' ),            'ecom_type' => array( query_arg => 'ect' ),
138          'ecom_data_source_key' => array( query_arg => 'ecds' ),            // item, list or tree
139              'ecom_abstract_type' => array( query_arg => 'ecat' ),
140    
141    
142            // data, data, data
143              
144              // e.g. view, edit
145              'ecom_mode' => array( query_arg => 'ecmod' ),
146              // This should be renamed to 'ecom_data_transport_key'.
147              'ecom_data_locator_key' => array( query_arg => 'ecdlk' ),
148              
149              // This should be enough to identify data Xyz.
150              // e.g. an OID, a GUID, a filename or similar stuff
151              'ecom_data_ident' => array( query_arg => 'ecdid' ),
152              // e.g. a classname or a filename
153              'ecom_data_meta' => array( query_arg => 'ecdm' ),
154              // filter the data: e.g.
155              //    - an xpath-query (xpq),
156              //    - an abstract/custom filter string or
157              //    - a parent node identifier (maybe revamp as 'ecdpnid')?
158              'ecom_data_filter' => array( query_arg => 'ecdf' ),
159              
160              // Some actions ...
161              // ... required for data items.
162              'ecom_data_action_edit' => array( query_arg => 'ecdfe' ),
163              'ecom_data_action_cancel' => array( query_arg => 'ecdfc' ),
164              'ecom_data_action_delete' => array( query_arg => 'ecdfd' ),
165              // ... required for data lists.
166              'ecom_data_form_action' => array( query_arg => 'ecdfa' ),
167              'ecom_data_form_checkbox' => array( query_arg => 'checkbox' ),
168              
169              // Special argument (should become a non-data-action).
170              // Triggers 'selectSource' at backend api (remote api) which causes a database handle switch.
171              'ecom_data_source_key' => array( query_arg => 'ecds' ),
172    
173        ),        ),
174    
175  /*  /*
176      // block model (what is used for each block)      // block model (what is used for each block)
177        // is this deprecated???
178        block => array(        block => array(
179          'ident' => array( query_arg => 'ident' ),          'ident' => array( query_arg => 'ident' ),
180          'meta' => array( query_arg => 'meta' ),          'meta' => array( query_arg => 'meta' ),
# Line 145  class WebExplorer_MVC extends Site_WebAp Line 187  class WebExplorer_MVC extends Site_WebAp
187    
188      ));      ));
189    
190        
191        // TODO: activate MVC-Views!!!
192        // - Here: Picture a ecom-component as a MVC-View.
193        // - Assign a GUID to each ecom-component!
194        // - Build WebExplorer-Introspection-Module to show stuff like this...    (->WebExplorer::Designer)
195        
196        
197      //$this->setup_views( &$this->_registry );      //$this->setup_views( &$this->_registry );
198    
199      // associate behaviour with "View"-components      // associate behaviour with "View"-components
# Line 194  class WebExplorer_MVC extends Site_WebAp Line 243  class WebExplorer_MVC extends Site_WebAp
243            $page_state = $requestTracker->getPointer();            $page_state = $requestTracker->getPointer();
244            $pre_out = $page_state[options];            $pre_out = $page_state[options];
245            //print Dumper($pre_out);            //print Dumper($pre_out);
246              
247            // clean-up unwanted variables            // clean-up unwanted variables
248            $label = $_in[ecom_label];            $label = $_in[ecom_label];
249            switch ($_in[ecom_abstract_type]) {            switch ($_in[ecom_abstract_type]) {
250              case "list":              case "list":
251                if($pre_out[options][ecoms][$label][ecom_data_meta]) { unset($pre_out[options][ecoms][$label][ecom_data_meta]); }                if ($pre_out[options][ecoms][$label][ecom_data_meta]) { unset($pre_out[options][ecoms][$label][ecom_data_meta]); }
252                  break;
253                // 2003-04-16: required for xmltree-to-item transition
254                // if we dont do this the "dotted" filter expression would persist across views
255                case "item":
256                  if ($pre_out[options][ecoms][$label][ecom_data_filter]) { unset($pre_out[options][ecoms][$label][ecom_data_filter]); }
257                break;                break;
258            }            }
259            $_out = $pre_out;            $_out = $pre_out;
# Line 209  class WebExplorer_MVC extends Site_WebAp Line 264  class WebExplorer_MVC extends Site_WebAp
264              // HACK!!!              // HACK!!!
265              // FIXME: review and implement in a more clean way?              // FIXME: review and implement in a more clean way?
266              //print "RESET!<br/>";              //print "RESET!<br/>";
               
267              $_out[options][ecoms][phase_startup] = "RESET";              $_out[options][ecoms][phase_startup] = "RESET";
268          '),          '),
269    
# Line 226  class WebExplorer_MVC extends Site_WebAp Line 280  class WebExplorer_MVC extends Site_WebAp
280          '),          '),
281                    
282          // check right $_GET[ap]          // check right $_GET[ap]
283          create_function('&$_in, &$_out', 'return ($_in[ap] != "explorer") ? print "Wrong application value: $_in[ap], sure this is right here?<br>" : null;'),          create_function('&$_in, &$_out', 'return ($_in[ap] != "explorer") ? print "Wrong application value [ap]: $_in[ap], sure this is right here?<br>" : null;'),
284    
285          // write components variables to out          // write components variables to out
286          create_function('&$_in, &$_out', '          create_function('&$_in, &$_out', '
287            $vars = array(            $vars = array(
288              ecom_type, ecom_abstract_type, ecom_mode, ecom_data_locator_key, ecom_data_ident, ecom_data_meta              ecom_type, ecom_abstract_type, ecom_mode, ecom_data_locator_key,
289                ecom_data_ident, ecom_data_meta, ecom_data_filter
290            );            );
291            //  ecom_call_method, ecom_call_args            //  ecom_call_method, ecom_call_args
292            if($_in[ecom_label]) {            if($_in[ecom_label]) {

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

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