--- nfo/php/libs/org.netfrag.app/WebExplorer/MVC.php 2003/06/25 23:45:05 1.17
+++ nfo/php/libs/org.netfrag.app/WebExplorer/MVC.php 2003/07/02 12:18:00 1.18
@@ -1,9 +1,12 @@
" : null;'),
+ // check right $_GET[ap] - depreciated
+ //create_function('&$_in, &$_out', 'return ($_in[ap] != "explorer") ? print "Wrong application value [ap]: $_in[ap], sure this is right here?
" : null;'),
// write components variables to out
create_function('&$_in, &$_out', '
@@ -318,6 +321,7 @@
if($_in[ecom_label]) {
foreach($vars as $key) {
if($_in[$key]) {
+ //print "var: " . $key . " value: " . $_in[$key] . "
";
$label = $_in[ecom_label];
$_out[options][ecoms][$label][$key] = $_in[$key];
}
@@ -375,8 +379,9 @@
if($ident) { array_push($tmp, $ident); }
}
if($cnt == 1) {
- //print "Single selection, ident : " . $tmp[0] . "
";
+ print "Single selection, ident : " . $tmp[0] . "
";
$_out[options][ecoms][$label][ecom_data_ident] = $tmp[0];
+ $_out[options][ecoms][$label][ecom_abstract_type] = "item";
} elseif($cnt > 1) {
// TODO: implement multi-selection actions on rows(items) here!!
print "Multi-Selection!! Current Ident(s) $tmp" . "
";
@@ -385,9 +390,10 @@
} else {
print "ident: " . Dumper($_out[options][ecoms][$label][ecom_data_ident]) . "
";
}
- //$_out[options][ecoms][$label][ecom_data_meta] = $_in[ecom_data_ident];
+ $_out[options][ecoms][$label][ecom_data_meta] = $_in[ecom_data_ident];
$_out[options][ecoms][$label][ecom_mode] = $_in[ecom_data_form_action];
- $_out[options][ecoms][$label][ecom_abstract_type] = "item";
+ //print "in: " . Dumper($_in) . "
";
+ //print "out: " . Dumper($_out) . "
";
}
'),
@@ -395,13 +401,20 @@
// handle data form buttons
create_function('&$_in, &$_out', '
$label = $_in[ecom_label];
- if($_in[ecom_data_action_edit]) { $_out[options][ecoms][$label][ecom_mode] = "edit"; }
- if($_in[ecom_data_action_cancel]) { $_out[options][ecoms][$label][ecom_mode] = "view"; }
+ if($_in[ecom_data_action_edit]) {
+ $_out[options][ecoms][$label][ecom_mode] = "edit";
+ $_out[options][ecoms][$label][ecom_abstract_type] = "item";
+ }
+ if($_in[ecom_data_action_cancel]) {
+ $_out[options][ecoms][$label][ecom_mode] = "view";
+ $_out[options][ecoms][$label][ecom_abstract_type] = "item";
+ }
// Action.Create
if($_in[ecom_data_action_create]) {
- print Dumper($_out[options][ecoms][$label]);
+ //print Dumper($_out[options][ecoms][$label]);
$_out[options][ecoms][$label][ecom_mode] = "create";
+ $_out[options][ecoms][$label][ecom_abstract_type] = "item";
}
// Action.Delete [new of 2003-04-09]
@@ -413,8 +426,8 @@
// could/should we do this for "edit" and/or "view" actions as well?
// look at ecom/FlexibleDataItem!
+ $_out[options][ecoms][$label][ecom_abstract_type] = "item";
}
-
'),
// propagate datasources to ecoms