| 4 |
* $Id$ |
* $Id$ |
| 5 |
* |
* |
| 6 |
* $Log$ |
* $Log$ |
| 7 |
|
* Revision 1.11 2003/04/11 00:51:10 joko |
| 8 |
|
* minor update: just testing stuff... |
| 9 |
|
* |
| 10 |
|
* Revision 1.10 2003/04/10 06:03:26 joko |
| 11 |
|
* ++ renamed keys: 'ecom_data_form_edit', 'ecom_data_form_cancel' through 'ecom_data_action_edit', 'ecom_data_action_cancel' |
| 12 |
|
* + new key: 'ecom_data_action_delete' |
| 13 |
|
* + Action.Delete: not really, since it's inside component in fact (self-contained ecom) |
| 14 |
|
* |
| 15 |
* Revision 1.9 2003/04/09 00:05:50 jonen |
* Revision 1.9 2003/04/09 00:05:50 jonen |
| 16 |
* added request values and functions needed for extended form handling |
* added request values and functions needed for extended form handling |
| 17 |
* |
* |
| 104 |
'ecom_data_locator_key', |
'ecom_data_locator_key', |
| 105 |
'ecom_data_ident', |
'ecom_data_ident', |
| 106 |
'ecom_data_meta', |
'ecom_data_meta', |
| 107 |
'ecom_data_form_edit', 'ecom_data_form_cancel', |
'ecom_data_action_edit', 'ecom_data_action_cancel', 'ecom_data_action_delete', |
| 108 |
'ecom_data_form_checkbox', 'ecom_data_form_action', |
'ecom_data_form_checkbox', 'ecom_data_form_action', |
| 109 |
'ecom_data_source_key' |
'ecom_data_source_key' |
| 110 |
), |
), |
| 117 |
'ecom_data_locator_key' => array( query_arg => 'ecdlk' ), |
'ecom_data_locator_key' => array( query_arg => 'ecdlk' ), |
| 118 |
'ecom_data_ident' => array( query_arg => 'ecdid' ), |
'ecom_data_ident' => array( query_arg => 'ecdid' ), |
| 119 |
'ecom_data_meta' => array( query_arg => 'ecdm' ), |
'ecom_data_meta' => array( query_arg => 'ecdm' ), |
| 120 |
'ecom_data_form_edit' => array( query_arg => 'ecdfe' ), |
'ecom_data_action_edit' => array( query_arg => 'ecdfe' ), |
| 121 |
'ecom_data_form_cancel' => array( query_arg => 'ecdfc' ), |
'ecom_data_action_cancel' => array( query_arg => 'ecdfc' ), |
| 122 |
|
'ecom_data_action_delete' => array( query_arg => 'ecdfd' ), |
| 123 |
'ecom_data_form_action' => array( query_arg => 'ecdfa' ), |
'ecom_data_form_action' => array( query_arg => 'ecdfa' ), |
| 124 |
'ecom_data_form_checkbox' => array( query_arg => 'checkbox' ), |
'ecom_data_form_checkbox' => array( query_arg => 'checkbox' ), |
| 125 |
'ecom_data_source_key' => array( query_arg => 'ecds' ), |
'ecom_data_source_key' => array( query_arg => 'ecds' ), |
| 182 |
|
|
| 183 |
rules => array( |
rules => array( |
| 184 |
|
|
|
|
|
| 185 |
// get last page state |
// get last page state |
| 186 |
create_function('&$_in, &$_out', ' |
create_function('&$_in, &$_out', ' |
| 187 |
$requestTracker = mkObject("Application::Request::Tracker"); |
$requestTracker = mkObject("Application::Request::Tracker"); |
| 198 |
$_out = $pre_out; |
$_out = $pre_out; |
| 199 |
'), |
'), |
| 200 |
|
|
| 201 |
|
// reset machine |
| 202 |
|
create_function('&$_in, &$_out', ' |
| 203 |
|
// HACK!!! |
| 204 |
|
// FIXME: review and implement in a more clean way? |
| 205 |
|
//print "RESET!<br/>"; |
| 206 |
|
|
| 207 |
|
$_out[options][ecoms][phase_startup] = "RESET"; |
| 208 |
|
'), |
| 209 |
|
|
| 210 |
// rewrite idents |
// rewrite idents |
| 211 |
create_function('&$_in, &$_out', ' |
create_function('&$_in, &$_out', ' |
| 212 |
$idents = array ( ap, ); |
$idents = array ( ap, ); |
| 220 |
|
|
| 221 |
// write components variables to out |
// write components variables to out |
| 222 |
create_function('&$_in, &$_out', ' |
create_function('&$_in, &$_out', ' |
| 223 |
$vars = array( ecom_type, ecom_abstract_type, ecom_mode, ecom_data_locator_key, ecom_data_ident, ecom_data_meta ); |
$vars = array( |
| 224 |
|
ecom_type, ecom_abstract_type, ecom_mode, ecom_data_locator_key, ecom_data_ident, ecom_data_meta |
| 225 |
|
); |
| 226 |
|
// ecom_call_method, ecom_call_args |
| 227 |
if($_in[ecom_label]) { |
if($_in[ecom_label]) { |
| 228 |
foreach($vars as $key) { |
foreach($vars as $key) { |
| 229 |
if($_in[$key]) { |
if($_in[$key]) { |
| 281 |
// handle data form buttons |
// handle data form buttons |
| 282 |
create_function('&$_in, &$_out', ' |
create_function('&$_in, &$_out', ' |
| 283 |
$label = $_in[ecom_label]; |
$label = $_in[ecom_label]; |
| 284 |
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"; } |
| 285 |
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"; } |
| 286 |
|
|
| 287 |
|
// Action.Delete [new of 2003-04-09] |
| 288 |
|
if ($_in[ecom_data_action_delete]) { |
| 289 |
|
|
| 290 |
|
//$_out[options][ecoms][content][ecom_mode] = "view"; |
| 291 |
|
|
| 292 |
|
// the code here vanished to the component itself! |
| 293 |
|
// could/should we do this for "edit" and/or "view" actions as well? |
| 294 |
|
// look at ecom/FlexibleDataItem! |
| 295 |
|
|
| 296 |
|
} |
| 297 |
|
|
| 298 |
'), |
'), |
| 299 |
|
|
| 300 |
// propagate datasources to ecoms |
// propagate datasources to ecoms |
| 304 |
create_function('&$_in, &$_out', ' |
create_function('&$_in, &$_out', ' |
| 305 |
if ($_in[ecom_data_source_key]) { |
if ($_in[ecom_data_source_key]) { |
| 306 |
|
|
| 307 |
//print "YAI<br/>"; |
print "YAI: ecom_data_source_key<br/>"; |
| 308 |
|
|
| 309 |
//print Dumper($_out[options][ecoms]); |
//print Dumper($_out[options][ecoms]); |
| 310 |
//print "ds: " . $_in[ecom_data_source_key] . "<br/>"; |
//print "ds: " . $_in[ecom_data_source_key] . "<br/>"; |
| 329 |
ecom_mode => "link", |
ecom_mode => "link", |
| 330 |
ecom_data_locator_key => "rpc", |
ecom_data_locator_key => "rpc", |
| 331 |
// new attributes/properties/arguments that control further / trigger different DataFlow: |
// new attributes/properties/arguments that control further / trigger different DataFlow: |
| 332 |
|
// FIXME: add these to declaration at top! |
| 333 |
ecom_call_method => "selectSource", |
ecom_call_method => "selectSource", |
| 334 |
ecom_call_args => $_in[ecom_data_source_key] |
ecom_call_args => $_in[ecom_data_source_key] |
| 335 |
); |
); |