| 4 | 
  * $Id$ | 
  * $Id$ | 
| 5 | 
  * | 
  * | 
| 6 | 
  * $Log$ | 
  * $Log$ | 
| 7 | 
  | 
  * Revision 1.10  2003/04/10 06:03:26  joko | 
| 8 | 
  | 
  * ++ renamed keys: 'ecom_data_form_edit', 'ecom_data_form_cancel' through 'ecom_data_action_edit', 'ecom_data_action_cancel' | 
| 9 | 
  | 
  * + new key: 'ecom_data_action_delete' | 
| 10 | 
  | 
  * + Action.Delete: not really, since it's inside component in fact (self-contained ecom) | 
| 11 | 
  | 
  * | 
| 12 | 
  * Revision 1.9  2003/04/09 00:05:50  jonen | 
  * Revision 1.9  2003/04/09 00:05:50  jonen | 
| 13 | 
  * added request values and functions needed for extended form handling | 
  * added request values and functions needed for extended form handling | 
| 14 | 
  * | 
  * | 
| 101 | 
         'ecom_data_locator_key', | 
         'ecom_data_locator_key', | 
| 102 | 
         'ecom_data_ident',  | 
         'ecom_data_ident',  | 
| 103 | 
         'ecom_data_meta',  | 
         'ecom_data_meta',  | 
| 104 | 
         'ecom_data_form_edit', 'ecom_data_form_cancel',  | 
         'ecom_data_action_edit', 'ecom_data_action_cancel', 'ecom_data_action_delete',  | 
| 105 | 
         'ecom_data_form_checkbox', 'ecom_data_form_action', | 
         'ecom_data_form_checkbox', 'ecom_data_form_action', | 
| 106 | 
         'ecom_data_source_key' | 
         'ecom_data_source_key' | 
| 107 | 
       ), | 
       ), | 
| 114 | 
         'ecom_data_locator_key' => array( query_arg => 'ecdlk' ), | 
         'ecom_data_locator_key' => array( query_arg => 'ecdlk' ), | 
| 115 | 
         'ecom_data_ident' => array( query_arg => 'ecdid' ), | 
         'ecom_data_ident' => array( query_arg => 'ecdid' ), | 
| 116 | 
         'ecom_data_meta' => array( query_arg => 'ecdm' ), | 
         'ecom_data_meta' => array( query_arg => 'ecdm' ), | 
| 117 | 
         'ecom_data_form_edit' => array( query_arg => 'ecdfe' ), | 
         'ecom_data_action_edit' => array( query_arg => 'ecdfe' ), | 
| 118 | 
         'ecom_data_form_cancel' => array( query_arg => 'ecdfc' ), | 
         'ecom_data_action_cancel' => array( query_arg => 'ecdfc' ), | 
| 119 | 
  | 
         'ecom_data_action_delete' => array( query_arg => 'ecdfd' ), | 
| 120 | 
         'ecom_data_form_action' => array( query_arg => 'ecdfa' ), | 
         'ecom_data_form_action' => array( query_arg => 'ecdfa' ), | 
| 121 | 
         'ecom_data_form_checkbox' => array( query_arg => 'checkbox' ), | 
         'ecom_data_form_checkbox' => array( query_arg => 'checkbox' ), | 
| 122 | 
         'ecom_data_source_key' => array( query_arg => 'ecds' ), | 
         'ecom_data_source_key' => array( query_arg => 'ecds' ), | 
| 179 | 
  | 
  | 
| 180 | 
       rules => array( | 
       rules => array( | 
| 181 | 
          | 
          | 
 | 
  | 
  | 
| 182 | 
         // get last page state | 
         // get last page state | 
| 183 | 
         create_function('&$_in, &$_out', ' | 
         create_function('&$_in, &$_out', ' | 
| 184 | 
           $requestTracker = mkObject("Application::Request::Tracker"); | 
           $requestTracker = mkObject("Application::Request::Tracker"); | 
| 195 | 
           $_out = $pre_out; | 
           $_out = $pre_out; | 
| 196 | 
         '), | 
         '), | 
| 197 | 
  | 
  | 
| 198 | 
  | 
         // reset machine | 
| 199 | 
  | 
         create_function('&$_in, &$_out', ' | 
| 200 | 
  | 
             // HACK!!! | 
| 201 | 
  | 
             // FIXME: review and implement in a more clean way? | 
| 202 | 
  | 
             //print "RESET!<br/>"; | 
| 203 | 
  | 
              | 
| 204 | 
  | 
             $_out[options][ecoms][phase_startup] = "RESET"; | 
| 205 | 
  | 
         '), | 
| 206 | 
  | 
  | 
| 207 | 
         // rewrite idents | 
         // rewrite idents | 
| 208 | 
         create_function('&$_in, &$_out', ' | 
         create_function('&$_in, &$_out', ' | 
| 209 | 
           $idents = array ( ap, ); | 
           $idents = array ( ap, ); | 
| 217 | 
  | 
  | 
| 218 | 
         // write components variables to out | 
         // write components variables to out | 
| 219 | 
         create_function('&$_in, &$_out', ' | 
         create_function('&$_in, &$_out', ' | 
| 220 | 
           $vars = array( ecom_type, ecom_abstract_type, ecom_mode, ecom_data_locator_key, ecom_data_ident, ecom_data_meta ); | 
           $vars = array(  | 
| 221 | 
  | 
             ecom_type, ecom_abstract_type, ecom_mode, ecom_data_locator_key, ecom_data_ident, ecom_data_meta | 
| 222 | 
  | 
           ); | 
| 223 | 
  | 
           //  ecom_call_method, ecom_call_args | 
| 224 | 
           if($_in[ecom_label]) { | 
           if($_in[ecom_label]) { | 
| 225 | 
             foreach($vars as $key) { | 
             foreach($vars as $key) { | 
| 226 | 
               if($_in[$key]) { | 
               if($_in[$key]) { | 
| 278 | 
         // handle data form buttons | 
         // handle data form buttons | 
| 279 | 
         create_function('&$_in, &$_out', ' | 
         create_function('&$_in, &$_out', ' | 
| 280 | 
           $label = $_in[ecom_label]; | 
           $label = $_in[ecom_label]; | 
| 281 | 
           if($_in[ecom_data_form_edit]) { $_out[options][ecoms][$label][ecom_mode] = "edit"; } | 
           if($_in[ecom_data_action_edit]) { $_out[options][ecoms][$label][ecom_mode] = "edit"; } | 
| 282 | 
           if($_in[ecom_data_form_cancel]) { $_out[options][ecoms][$label][ecom_mode] = "view"; } | 
           if($_in[ecom_data_action_cancel]) { $_out[options][ecoms][$label][ecom_mode] = "view"; } | 
| 283 | 
  | 
            | 
| 284 | 
  | 
           // Action.Delete [new of 2003-04-09] | 
| 285 | 
  | 
           if ($_in[ecom_data_action_delete]) { | 
| 286 | 
  | 
              | 
| 287 | 
  | 
             // the code here vanished to the component itself! | 
| 288 | 
  | 
             // could/should we do this for "edit" and/or "view" actions as well? | 
| 289 | 
  | 
             // look at ecom/FlexibleDataItem! | 
| 290 | 
  | 
  | 
| 291 | 
  | 
           } | 
| 292 | 
  | 
          | 
| 293 | 
         '), | 
         '), | 
| 294 | 
  | 
  | 
| 295 | 
         // propagate datasources to ecoms | 
         // propagate datasources to ecoms | 
| 299 | 
         create_function('&$_in, &$_out', ' | 
         create_function('&$_in, &$_out', ' | 
| 300 | 
           if ($_in[ecom_data_source_key]) { | 
           if ($_in[ecom_data_source_key]) { | 
| 301 | 
              | 
              | 
| 302 | 
             //print "YAI<br/>"; | 
             print "YAI: ecom_data_source_key<br/>"; | 
| 303 | 
              | 
              | 
| 304 | 
             //print Dumper($_out[options][ecoms]); | 
             //print Dumper($_out[options][ecoms]); | 
| 305 | 
             //print "ds: " . $_in[ecom_data_source_key] . "<br/>"; | 
             //print "ds: " . $_in[ecom_data_source_key] . "<br/>"; | 
| 324 | 
               ecom_mode => "link", | 
               ecom_mode => "link", | 
| 325 | 
               ecom_data_locator_key => "rpc", | 
               ecom_data_locator_key => "rpc", | 
| 326 | 
               // new attributes/properties/arguments that control further / trigger different DataFlow: | 
               // new attributes/properties/arguments that control further / trigger different DataFlow: | 
| 327 | 
  | 
               // FIXME: add these to declaration at top! | 
| 328 | 
               ecom_call_method => "selectSource", | 
               ecom_call_method => "selectSource", | 
| 329 | 
               ecom_call_args => $_in[ecom_data_source_key] | 
               ecom_call_args => $_in[ecom_data_source_key] | 
| 330 | 
             ); | 
             ); |