4 |
## $Id$ |
## $Id$ |
5 |
## ----------------------------------------------------------------------------- |
## ----------------------------------------------------------------------------- |
6 |
## $Log$ |
## $Log$ |
7 |
|
## Revision 1.21 2003/05/10 18:23:21 jonen |
8 |
|
## + added stuff relating to 'create/add new' links/buttons |
9 |
|
## |
10 |
|
## Revision 1.20 2003/04/19 16:24:49 jonen |
11 |
|
## + added two more GUI modules to default registry initiation, |
12 |
|
## relating to new navigation module 'NavigationTree' |
13 |
|
## + added prepartion of needed args for abstract navigation tree |
14 |
|
## and concret UserManagment 'UMnav' tree |
15 |
|
## |
16 |
|
## Revision 1.19 2003/04/18 16:21:37 joko |
17 |
|
## fixed commit comment - the last one caused a syntax error!!! |
18 |
|
## |
19 |
## Revision 1.18 2003/04/18 15:27:06 joko |
## Revision 1.18 2003/04/18 15:27:06 joko |
20 |
## NEW: XML Trees in data area |
## NEW: XML Trees in data area |
21 |
## new ecom module: DataTree |
## new ecom module: DataTree |
26 |
## ); |
## ); |
27 |
## A Data::Lift module translates this filter-query into a XPath-query ... |
## A Data::Lift module translates this filter-query into a XPath-query ... |
28 |
## $filter = array( |
## $filter = array( |
29 |
## xpq => '*/*[@name="cli"]', |
## xpq => '*\/*[@name="cli"]', |
30 |
## ); |
## ); |
31 |
## ... which finally is propagated to the backend. |
## ... which finally is propagated to the backend. |
32 |
## NEW: AbstractExplorer - standalone version |
## NEW: AbstractExplorer - standalone version |
239 |
// 2003-04-12 - Data.Tree |
// 2003-04-12 - Data.Tree |
240 |
$this->register_gui_module("content", "data", "tree", "WebExplorer::Module::DataTree" ); |
$this->register_gui_module("content", "data", "tree", "WebExplorer::Module::DataTree" ); |
241 |
|
|
242 |
|
// 2003-04-18 - Nav.Tree |
243 |
|
$this->register_gui_module("nav", "nav", "tree", "WebExplorer::Module::NavigationTree" ); |
244 |
|
|
245 |
|
// 2003-04-18 - UserManagment Nav.Tree (we need only a different 'label' as Nav.Tree yet..) |
246 |
|
$this->register_gui_module("UMnav", "nav", "tree", "WebExplorer::Module::NavigationTree" ); |
247 |
|
|
248 |
} |
} |
249 |
|
|
250 |
function register_source_module($label, $args) { |
function register_source_module($label, $args) { |
312 |
} |
} |
313 |
//print Dumper($ecom); |
//print Dumper($ecom); |
314 |
|
|
315 |
// NOW[2003-18-04] done at via args(prepare args!) to pass at constructor |
// NEW[2003-04-18] done via args(prepare args!) passed at constructor |
316 |
// (needed for non-real objects instanced at some child of AbstractGUIModule, eg. NavigationList) |
// (needed for non-real objects instanced at some child of AbstractGUIModule, eg. NavigationList) |
317 |
/* |
/* |
318 |
// add hidden vars, needed for explorer control |
// add hidden vars, needed for explorer control |
343 |
'ecl' => $label, |
'ecl' => $label, |
344 |
'ecat' => "item", |
'ecat' => "item", |
345 |
'ecmod' => "view", |
'ecmod' => "view", |
346 |
|
'ecdm' => $ecom_state['ecom_data_ident'], |
347 |
); |
); |
348 |
} |
} |
349 |
elseif($ecom_state['ecom_abstract_type'] == "item") { |
elseif($ecom_state['ecom_abstract_type'] == "item") { |
428 |
if($val['ecom_abstract_type'] == "list") { |
if($val['ecom_abstract_type'] == "list") { |
429 |
if($val['ecom_data_locator_key'] == "rpc") { |
if($val['ecom_data_locator_key'] == "rpc") { |
430 |
//$data_locator_meta = array( transport => 'rpc', metatype => 'data', vartype => 'objects', nodename => $val['ecom_data_ident']); |
//$data_locator_meta = array( transport => 'rpc', metatype => 'data', vartype => 'objects', nodename => $val['ecom_data_ident']); |
431 |
$data_locator_meta = array( transport => 'rpc', metatype => 'data', abstract_type => 'list', nodename => $val['ecom_data_ident']); |
$data_locator_meta = array( transport => 'rpc', metatype => 'data', abstract_type => 'list', nodename => $val['ecom_data_ident'], list_meta => $val['ecom_data_meta']); |
432 |
} else { |
} else { |
433 |
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] !"); |
434 |
} |
} |
448 |
"View" => 'view', |
"View" => 'view', |
449 |
"Edit" => 'edit', |
"Edit" => 'edit', |
450 |
"Delete" => 'delete', |
"Delete" => 'delete', |
|
"Add new" => 'add', |
|
451 |
), |
), |
452 |
|
'selected' => 'view', |
453 |
|
'create' => array( |
454 |
|
'name' => "ecdfcr", |
455 |
|
'value' => "Add new" |
456 |
|
), |
457 |
|
), |
458 |
|
'parent' => array( |
459 |
|
'class' => $val['ecom_data_ident'], |
460 |
), |
), |
461 |
), |
), |
462 |
); |
); |
502 |
'decode' => 1, |
'decode' => 1, |
503 |
'decode_args' => array( |
'decode_args' => array( |
504 |
'seperator' => "_", |
'seperator' => "_", |
505 |
|
), |
506 |
|
'parent' => array( |
507 |
|
'guid' => $val['ecom_data_ident'], |
508 |
|
'class' => $val['ecom_data_meta'], |
509 |
|
), |
510 |
), |
), |
|
), |
|
511 |
); |
); |
512 |
if ($val['ecom_mode'] == "edit") { $args['adapter'] = 'FormProcessor'; } |
if ($val['ecom_mode'] == "edit") { $args['adapter'] = 'FormProcessor'; } |
513 |
|
|
514 |
// FIXME: (see WebExplorer::Module::AbstractGUIModule) |
// FIXME: (see WebExplorer::Module::AbstractGUIModule) |
515 |
//if ($val['ecom_mode'] == "delete") { $args['adapter'] = 'GenericNegotiation'; } |
//if ($val['ecom_mode'] == "delete") { $args['adapter'] = 'GenericNegotiation'; } |
516 |
if ($val['ecom_mode'] == "delete") { $args['adapter'] = 'NonValidatingFormProcessor'; } |
if ($val['ecom_mode'] == "delete") { |
517 |
|
$args['adapter'] = 'NonValidatingFormProcessor'; |
518 |
|
} |
519 |
|
|
520 |
|
if ($val['ecom_mode'] == "create") { |
521 |
|
$args['adapter'] = 'FormProcessor'; |
522 |
|
$args['options']['caption'] = $val['ecom_data_ident']; |
523 |
|
$args['options']['data_locator_meta']['action'] = 'create'; |
524 |
|
print "debug 'create': " . Dumper($val); |
525 |
|
if($val['ecom_data_meta_x']) { |
526 |
|
unset($args['options']['data_locator_meta']['nodename']); |
527 |
|
$args['options']['data_locator_meta']['parent'][guid] = $val['ecom_data_meta']; |
528 |
|
$args['options']['data_locator_meta']['parent'][nodename] = $val['ecom_data_meta_x']; |
529 |
|
} |
530 |
|
} |
531 |
|
|
532 |
// switch abstract type |
// switch abstract type |
533 |
} elseif ($val['ecom_abstract_type'] == "tree") { |
} elseif ($val['ecom_abstract_type'] == "tree") { |
576 |
user_error("AbstractExplorer::_prepare_component_args - Cannot build schema query for data_locator_key $val[ecom_data_locator_key] !"); |
user_error("AbstractExplorer::_prepare_component_args - Cannot build schema query for data_locator_key $val[ecom_data_locator_key] !"); |
577 |
} |
} |
578 |
|
|
579 |
// tree |
// NEW [2003-04-18]: Abstract navigation tree |
580 |
} elseif ($val['ecom_abstract_type'] == "tree") { |
} elseif ($val['ecom_abstract_type'] == "tree") { |
581 |
$args = array(); |
$args = array(); |
582 |
print "TREE!<br/>"; |
if($label == "nav") { |
583 |
|
//$args[options][data_locator_meta] = array( transport => 'rpc', metatype => 'schema', abstract_type => 'tree', ident => $val['ecom_data_ident'], nodename => $val['ecom_data_meta']); |
584 |
|
$args[options][data_locator_meta] = array( transport => 'rpc', metatype => 'schema', filter => 'nodes.root:concrete' ); |
585 |
|
$args['caption'] = $val['ecom_data_source_key']; |
586 |
|
} elseif($label == "UMnav") { |
587 |
|
//$args[options][data_locator_meta] = array( transport => 'rpc', metatype => 'schema', abstract_type => 'tree', ident => $val['ecom_data_ident'], nodename => $val['ecom_data_meta']); |
588 |
|
$args[options][data_locator_meta] = array( transport => 'rpc', metatype => 'method', method => 'UserManagmentSchema' ); |
589 |
|
$args['caption'] = "Benutzerverwaltung"; |
590 |
|
} |
591 |
|
|
592 |
// NEW [2003-04-18]: transparent nav - argument pass-through mode |
// NEW [2003-04-18]: transparent nav - argument pass-through mode |
593 |
} elseif ($val['ecom_abstract_type'] == "transparent") { |
} elseif ($val['ecom_abstract_type'] == "transparent") { |
634 |
|
|
635 |
} |
} |
636 |
|
|
637 |
// add hidden items to args |
// NEW[2003-04-18]: add hidden items to args |
638 |
$args['hidden_elements'] = $this->_get_hidden_items($label); |
$args['hidden_elements'] = $this->_get_hidden_items($label); |
639 |
|
|
640 |
return $args; |
return $args; |