| 4 |
* $Id$ |
* $Id$ |
| 5 |
* |
* |
| 6 |
* $Log$ |
* $Log$ |
| 7 |
|
* Revision 1.9 2003/04/09 00:05:50 jonen |
| 8 |
|
* added request values and functions needed for extended form handling |
| 9 |
|
* |
| 10 |
|
* Revision 1.8 2003/04/08 17:53:08 joko |
| 11 |
|
* NEW: Module 'RemoteAction' in 'phase_startup' |
| 12 |
|
* |
| 13 |
* Revision 1.7 2003/04/07 22:32:27 jonen |
* Revision 1.7 2003/04/07 22:32:27 jonen |
| 14 |
* + minor changes related to new ecom 'chooser' |
* + minor changes related to new ecom 'chooser' |
| 15 |
* |
* |
| 96 |
'ecom_data_locator_key', |
'ecom_data_locator_key', |
| 97 |
'ecom_data_ident', |
'ecom_data_ident', |
| 98 |
'ecom_data_meta', |
'ecom_data_meta', |
| 99 |
'ecom_data_form_edit', 'ecom_data_form_cancel', |
'ecom_data_form_edit', 'ecom_data_form_cancel', |
| 100 |
|
'ecom_data_form_checkbox', 'ecom_data_form_action', |
| 101 |
'ecom_data_source_key' |
'ecom_data_source_key' |
| 102 |
), |
), |
| 103 |
request_arg => array( |
request_arg => array( |
| 111 |
'ecom_data_meta' => array( query_arg => 'ecdm' ), |
'ecom_data_meta' => array( query_arg => 'ecdm' ), |
| 112 |
'ecom_data_form_edit' => array( query_arg => 'ecdfe' ), |
'ecom_data_form_edit' => array( query_arg => 'ecdfe' ), |
| 113 |
'ecom_data_form_cancel' => array( query_arg => 'ecdfc' ), |
'ecom_data_form_cancel' => array( query_arg => 'ecdfc' ), |
| 114 |
|
'ecom_data_form_action' => array( query_arg => 'ecdfa' ), |
| 115 |
|
'ecom_data_form_checkbox' => array( query_arg => 'checkbox' ), |
| 116 |
'ecom_data_source_key' => array( query_arg => 'ecds' ), |
'ecom_data_source_key' => array( query_arg => 'ecds' ), |
| 117 |
), |
), |
| 118 |
|
|
| 238 |
return; |
return; |
| 239 |
'), |
'), |
| 240 |
|
|
| 241 |
|
|
| 242 |
|
// handle data form action(button) |
| 243 |
|
create_function('&$_in, &$_out', ' |
| 244 |
|
$label = $_in[ecom_label]; |
| 245 |
|
if($_in[ecom_data_form_action] && is_array($_in[ecom_data_form_checkbox])) { |
| 246 |
|
$cnt = sizeof($_in[ecom_data_form_checkbox]); |
| 247 |
|
if($cnt == 1) { |
| 248 |
|
foreach($_in[ecom_data_form_checkbox] as $ident) { |
| 249 |
|
$_out[options][ecoms][$label][ecom_data_ident] = $ident; |
| 250 |
|
} |
| 251 |
|
$_out[options][ecoms][$label][ecom_data_meta] = $_in[ecom_data_ident]; |
| 252 |
|
$_out[options][ecoms][$label][ecom_mode] = $_in[ecom_data_form_action]; |
| 253 |
|
$_out[options][ecoms][$label][ecom_abstract_type] = "item"; |
| 254 |
|
} else { |
| 255 |
|
// TODO: implement multi-selection actions on rows(items) here!! |
| 256 |
|
} |
| 257 |
|
} |
| 258 |
|
'), |
| 259 |
|
|
| 260 |
|
|
| 261 |
// handle data form buttons |
// handle data form buttons |
| 262 |
create_function('&$_in, &$_out', ' |
create_function('&$_in, &$_out', ' |
| 263 |
$label = $_in[ecom_label]; |
$label = $_in[ecom_label]; |
| 271 |
// datasource if requested - otherwise everything will fall back to defaults |
// datasource if requested - otherwise everything will fall back to defaults |
| 272 |
create_function('&$_in, &$_out', ' |
create_function('&$_in, &$_out', ' |
| 273 |
if ($_in[ecom_data_source_key]) { |
if ($_in[ecom_data_source_key]) { |
| 274 |
|
|
| 275 |
|
//print "YAI<br/>"; |
| 276 |
|
|
| 277 |
//print Dumper($_out[options][ecoms]); |
//print Dumper($_out[options][ecoms]); |
| 278 |
//print "ds: " . $_in[ecom_data_source_key] . "<br/>"; |
//print "ds: " . $_in[ecom_data_source_key] . "<br/>"; |
| 279 |
/* |
/* |
| 284 |
} |
} |
| 285 |
*/ |
*/ |
| 286 |
$_out[options][main][ecom_data_source_key] = $_in[ecom_data_source_key]; |
$_out[options][main][ecom_data_source_key] = $_in[ecom_data_source_key]; |
| 287 |
|
|
| 288 |
|
|
| 289 |
|
// 2003-04-07 - enhanced |
| 290 |
|
// now activates a special ecom-component - a "RemoteAction" - replacing |
| 291 |
|
// the "content"-ecom instead of displaying an empty page / overriding any |
| 292 |
|
// view reached by "normal dispatching" |
| 293 |
|
|
| 294 |
|
$_out[options][ecoms][phase_startup] = array( |
| 295 |
|
ecom_type => "call", |
| 296 |
|
ecom_abstract_type => "auto", |
| 297 |
|
ecom_mode => "link", |
| 298 |
|
ecom_data_locator_key => "rpc", |
| 299 |
|
// new attributes/properties/arguments that control further / trigger different DataFlow: |
| 300 |
|
ecom_call_method => "selectSource", |
| 301 |
|
ecom_call_args => $_in[ecom_data_source_key] |
| 302 |
|
); |
| 303 |
|
|
| 304 |
} |
} |
| 305 |
'), |
'), |
| 306 |
|
|