--- nfo/php/libs/org.netfrag.patches/phphtmllib/widgets/DataItem.php 2003/05/13 16:24:30 1.6
+++ nfo/php/libs/org.netfrag.patches/phphtmllib/widgets/DataItem.php 2003/11/22 18:40:58 1.7
@@ -1,9 +1,12 @@
/*
## -----------------------------------------------------------------------------
-## $Id: DataItem.php,v 1.6 2003/05/13 16:24:30 joko Exp $
+## $Id: DataItem.php,v 1.7 2003/11/22 18:40:58 udo Exp $
## -----------------------------------------------------------------------------
## $Log: DataItem.php,v $
+## Revision 1.7 2003/11/22 18:40:58 udo
+## bug fix
+##
## Revision 1.6 2003/05/13 16:24:30 joko
## title addendum
## MetaBox - header style
@@ -50,11 +53,15 @@
$this->_options = $options;
//print "title: $title
";
- //print Dumper($options);
+ //print "options:" . Dumper($options) . "
";
$title .= $this->get_title_addendum();
- $parent = get_parent_class($this);
+ $parent = get_parent_class($this);
+ // debug (WARNNING!!! Sometime an recursive loop happens here
+ // if class $parent is eq current class!!)
+ //print "parent: " . Dumper($parent) . "
";
+
$this->$parent($title, $width="100%", "center");
// fetch data
@@ -104,6 +111,7 @@
}
function get_data_source() {
+
$initial_locator = php::mkComponent( 'DataSource::Locator', array( adapter_type => 'phpHtmlLib' ) );
$proxy = php::mkComponent('DataSource::Generic', $initial_locator, $this->_options['data_locator_meta']);
$source = $proxy->get_adapter();
@@ -135,7 +143,7 @@
if($this->_options['decode']) {
$utils = php::mkComponent('WebExplorer::utils');
$hidden = $this->_hidden_elements;
- $options = $this->_options['decode_args'];
+ $options = $this->_options['decode_args'];
$options[label] = $key;
$options[parent_guid] = $this->_options['parent']['guid'];
$options[parent_class] = $this->_options['parent']['class'];
@@ -143,6 +151,7 @@
$utils->decode_item_expr($value, $hidden, $options);
// if item is an Array we will replace it with an html-link object
$utils->decode_item_array($value, $hidden, $options);
+
$this->add_element($key, $value);
} else {
$this->add_element($key, $value);