4 |
## $Id$ |
## $Id$ |
5 |
## ----------------------------------------------------------------------------- |
## ----------------------------------------------------------------------------- |
6 |
## $Log$ |
## $Log$ |
7 |
|
## Revision 1.28 2004/08/31 14:15:49 jonen |
8 |
|
## + added function to clear 'ecom' state |
9 |
|
## (specially needed to refresh the 'content' block) |
10 |
|
## |
11 |
|
## Revision 1.27 2004/03/11 21:01:35 jonen |
12 |
|
## minor change |
13 |
|
## |
14 |
|
## Revision 1.26 2003/12/14 01:50:30 jonen |
15 |
|
## implemented 'SELECT' mode for selecting existing object-refereneces as child-nodes |
16 |
|
## |
17 |
## Revision 1.25 2003/11/22 18:47:49 udo |
## Revision 1.25 2003/11/22 18:47:49 udo |
18 |
## update for expand data item |
## update for expand data item |
19 |
## |
## |
219 |
function get_page_state() { |
function get_page_state() { |
220 |
$requestTracker = mkObject("Application::Request::Tracker"); |
$requestTracker = mkObject("Application::Request::Tracker"); |
221 |
$this->_state = $requestTracker->getPointer(); |
$this->_state = $requestTracker->getPointer(); |
222 |
|
//print "state: " . Dumper($this->_state) . "<br>"; |
223 |
|
} |
224 |
|
|
225 |
|
function clear_comp_state($comp = NULL) { |
226 |
|
if($comp) { |
227 |
|
$this->_e_state[ecoms][$comp] = array(); |
228 |
|
} |
229 |
} |
} |
230 |
|
|
231 |
function set_e_state($state = null) { |
function set_e_state($state = null) { |
489 |
} else { |
} else { |
490 |
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] !"); |
491 |
} |
} |
492 |
|
|
493 |
|
if($val['ecom_mode'] == 'select') { |
494 |
|
$actionbar = array( |
495 |
|
'buttons' => array( |
496 |
|
array( |
497 |
|
'name' => "ecdfsel", |
498 |
|
'value' => "Select" |
499 |
|
), |
500 |
|
), |
501 |
|
); |
502 |
|
} else { |
503 |
|
$actionbar = array( |
504 |
|
'name' => "ecdfa", |
505 |
|
'list' => array( |
506 |
|
"View" => 'view', |
507 |
|
"Edit" => 'edit', |
508 |
|
"Delete" => 'delete', |
509 |
|
"Expand" => 'expand', |
510 |
|
"Expandedit" => 'expandedit', |
511 |
|
), |
512 |
|
'selected' => 'view', |
513 |
|
'buttons' => array( |
514 |
|
array( |
515 |
|
'name' => "ecdfcr", |
516 |
|
'value' => "Add new" |
517 |
|
), |
518 |
|
), |
519 |
|
); |
520 |
|
} |
521 |
|
|
522 |
$args = array( |
$args = array( |
523 |
'caption' => $val['ecom_data_ident'], |
'caption' => $val['ecom_data_ident'], |
524 |
'orderby' => "Guid", |
'orderby' => "Guid", |
529 |
'seperator' => "_", |
'seperator' => "_", |
530 |
//'form' => 1, |
//'form' => 1, |
531 |
), |
), |
532 |
'actionbar' => array( |
'actionbar' => $actionbar, |
|
'name' => "ecdfa", |
|
|
'list' => array( |
|
|
"View" => 'view', |
|
|
"Edit" => 'edit', |
|
|
|
|
|
"Delete" => 'delete', |
|
|
"Expand" => 'expand', |
|
|
"Expandedit" => 'expandedit', |
|
|
|
|
|
), |
|
|
'selected' => 'view', |
|
|
'create' => array( |
|
|
'name' => "ecdfcr", |
|
|
'value' => "Add new" |
|
|
), |
|
|
), |
|
533 |
'parent' => array( |
'parent' => array( |
534 |
'class' => $val['ecom_data_ident'], |
'class' => $val['ecom_data_ident'], |
535 |
), |
), |
536 |
), |
), |
537 |
); |
); |
538 |
|
if($val['ecom_data_meta_x']) { |
539 |
|
//unset($args['options']['data_locator_meta']['nodename']); |
540 |
|
$args['options']['data_locator_meta']['parent'][guid] = $val['ecom_data_meta']; |
541 |
|
$args['options']['data_locator_meta']['parent'][nodename] = $val['ecom_data_meta_x']; |
542 |
|
} |
543 |
|
|
544 |
// switch abstract type |
// switch abstract type |
545 |
} elseif ($val['ecom_abstract_type'] == "item") { |
} elseif ($val['ecom_abstract_type'] == "item") { |
591 |
//if ($val['ecom_mode'] == "delete") { $args['adapter'] = 'GenericNegotiation'; } |
//if ($val['ecom_mode'] == "delete") { $args['adapter'] = 'GenericNegotiation'; } |
592 |
if ($val['ecom_mode'] == "delete") { |
if ($val['ecom_mode'] == "delete") { |
593 |
$args['adapter'] = 'NonValidatingFormProcessor'; |
$args['adapter'] = 'NonValidatingFormProcessor'; |
594 |
|
$args['options']['data_locator_meta']['action'] = 'delete'; |
595 |
} |
} |
596 |
|
|
597 |
if ($val['ecom_mode'] == "create") { |
if ($val['ecom_mode'] == "create") { |
598 |
$args['adapter'] = 'FormProcessor'; |
$args['adapter'] = 'FormProcessor'; |
599 |
$args['options']['caption'] = $val['ecom_data_ident']; |
$args['options']['caption'] = $val['ecom_data_ident']; |
600 |
$args['options']['data_locator_meta']['action'] = 'create'; |
$args['options']['data_locator_meta']['action'] = 'create'; |
601 |
print "debug 'create': " . Dumper($val); |
//print "debug 'create': " . Dumper($val); |
|
} |
|
|
|
|
602 |
if($val['ecom_data_meta_x']) { |
if($val['ecom_data_meta_x']) { |
603 |
unset($args['options']['data_locator_meta']['nodename']); |
unset($args['options']['data_locator_meta']['nodename']); |
604 |
$args['options']['data_locator_meta']['parent'][guid] = $val['ecom_data_meta']; |
$args['options']['data_locator_meta']['parent'][guid] = $val['ecom_data_meta']; |
605 |
$args['options']['data_locator_meta']['parent'][nodename] = $val['ecom_data_meta_x']; |
$args['options']['data_locator_meta']['parent'][nodename] = $val['ecom_data_meta_x']; |
606 |
} |
} |
607 |
|
} |
608 |
|
if ($val['ecom_mode'] == "select") { |
609 |
|
$args['adapter'] = 'FormProcessor'; |
610 |
|
$args['caption'] = $val['ecom_data_meta_xe'] . " {". $val['ecom_data_meta_x'] . ":}"; |
611 |
|
$args['options']['data_locator_meta']['action'] = 'select'; |
612 |
|
//print "debug 'select': " . Dumper($val); |
613 |
|
if($val['ecom_data_meta_x']) { |
614 |
|
$args['options']['data_locator_meta']['parent'][guid] = $val['ecom_data_meta_xe']; |
615 |
|
$args['options']['data_locator_meta']['parent'][nodename] = $val['ecom_data_meta_x']; |
616 |
|
} |
617 |
|
} |
618 |
|
|
619 |
|
//print "debug 'args' : " . Dumper($args); |
620 |
|
|
621 |
// switch abstract type |
// switch abstract type |
622 |
} elseif ($val['ecom_abstract_type'] == "tree") { |
} elseif ($val['ecom_abstract_type'] == "tree") { |