4 |
## $Id$ |
## $Id$ |
5 |
## ----------------------------------------------------------------------------- |
## ----------------------------------------------------------------------------- |
6 |
## $Log$ |
## $Log$ |
7 |
|
## Revision 1.5 2003/05/10 18:07:31 jonen |
8 |
|
## + added values needed for 'create/add new' links |
9 |
|
## - purged depreciated code |
10 |
|
## |
11 |
## Revision 1.4 2003/04/09 09:53:13 joko |
## Revision 1.4 2003/04/09 09:53:13 joko |
12 |
## fixes regarding modification of decode-function-behavior |
## fixes regarding modification of decode-function-behavior |
13 |
## |
## |
119 |
$result = $this->_datasource->_result; |
$result = $this->_datasource->_result; |
120 |
if (is_array($result)) { |
if (is_array($result)) { |
121 |
foreach($result as $key => $value) { |
foreach($result as $key => $value) { |
122 |
if(!$value) { $value = _HTML_SPACE; } |
// set empty values to 'html spacer' for render |
123 |
// if item is match by expression we will replace it with an link object |
// TODO: integer value '0' is interpretted as non-existing value! Hack this!! |
124 |
|
if(!$value && !is_array($value)) { $value = _HTML_SPACE; } |
125 |
|
// if decode options are true, trie to decode values(e.g. for inhiterance) |
126 |
if($this->_options['decode']) { |
if($this->_options['decode']) { |
127 |
$utils = php::mkComponent('WebExplorer::utils'); |
$utils = php::mkComponent('WebExplorer::utils'); |
128 |
$hidden = $this->_hidden_elements; |
$hidden = $this->_hidden_elements; |
129 |
$options = $this->_options['decode_args']; |
$options = $this->_options['decode_args']; |
130 |
|
$options[label] = $key; |
131 |
/* |
$options[parent_guid] = $this->_options['parent']['guid']; |
132 |
if($utils->decode_item_expr($value, $hidden, $options)) { |
$options[parent_class] = $this->_options['parent']['class']; |
133 |
$this->add_element($key, $utils->decode_item_expr($value, $hidden, $options)); |
// if item is matched by a special expression we will replace it with an html-link object |
|
} |
|
|
elseif($utils->decode_item_array($value, $hidden, $options) ) { |
|
|
$this->add_element($key, $utils->decode_item_array($value, $hidden, $options)); |
|
|
} else { |
|
|
$this->add_element($key, $value); |
|
|
} |
|
|
*/ |
|
|
|
|
134 |
$utils->decode_item_expr($value, $hidden, $options); |
$utils->decode_item_expr($value, $hidden, $options); |
135 |
// if item is an Array we will replace it with an selection form object |
// if item is an Array we will replace it with an html-link object |
136 |
$utils->decode_item_array($value, $hidden, $options); |
$utils->decode_item_array($value, $hidden, $options); |
137 |
$this->add_element($key, $value); |
$this->add_element($key, $value); |
|
|
|
138 |
} else { |
} else { |
139 |
$this->add_element($key, $value); |
$this->add_element($key, $value); |
140 |
} |
} |
|
|
|
|
|
|
141 |
} |
} |
142 |
} |
} |
143 |
} |
} |