/[cvs]/nfo/php/libs/com.newsblob.phphtmllib/widgets/data_list/DefaultGUIDataList.inc
ViewVC logotype

Diff of /nfo/php/libs/com.newsblob.phphtmllib/widgets/data_list/DefaultGUIDataList.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by jonen, Fri Feb 21 03:23:43 2003 UTC revision 1.4 by jonen, Sat Feb 22 18:02:18 2003 UTC
# Line 162  class DefaultGUIDatalist extends DataLis Line 162  class DefaultGUIDatalist extends DataLis
162          //make sure its set to something.          //make sure its set to something.
163          if ($obj == '') {          if ($obj == '') {
164              $obj = " ";              $obj = " ";
165          }          }        
166          // if item is an Array we will replace it with an link or contained form object          // if item is match by expression we will replace it with an link object
167          elseif( is_array($obj) ) {          elseif($this->_decode_column_item_expr($obj)) {
168            $cur_row_index = $this->_datasource->get_cur_data_index();            $obj = $this->_decode_column_item_expr($obj);
169            $parent_guid = $this->_datasource->_data[$cur_row_index]['guid'];          }
170            foreach($obj as $key => $value) {          // if item is an Array we will replace it with an selection form object
171              if(is_numeric($key)) {          elseif($this->_decode_column_item_array($obj)) {
172                  $guid = $value['guid'];            $obj = $this->_decode_column_item_array($obj);
                 $list[$key] = $guid;  
             }  
                 }  
                 if(is_array($list) ) {  
               $container = container(  
                   form_open($obj[guid], $_SERVER["PHP_SELF"] ),  
                   form_select("guid", $list),  
                   form_hidden("ap", "oedit"),  
                   form_hidden("guid", $obj['guid']),  
                   form_hidden("class", $col_name),  
                   form_submit("submit","view" ),  
                   form_close()  
                   );  
               $obj = $container;  
             } else {  
                   $obj = html_a($_SERVER["PHP_SELF"] . "?ap=oedit&guid=" . $obj['guid'] . "&class=" . $col_name, "view");  
                 }  
173          }          }
174                    
175    
# Line 328  class DefaultGUIDatalist extends DataLis Line 311  class DefaultGUIDatalist extends DataLis
311                                     "this function should return a hash for hidden fields, if not needed just return" );                                     "this function should return a hash for hidden fields, if not needed just return" );
312      }      }
313    
314        
315        function _decode_column_item_array($obj) {
316            user_error("DefaulGUIDataList::_decode_column_item_array() - ".
317                                       "child class must override this method ".
318                                       "this function should decode the column_item if it is a (sub-) array,".
319                                        "array should e.g. replaced by a select form." );
320        }
321    
322        function _decode_column_item_expr($obj) {
323            user_error("DefaulGUIDataList::_decode_column_item_expr() - ".
324                                       "child class must override this method ".
325                                       "this function should decode the column_item, if it is encoded for e.g. objects" );
326        }
327  }  }
328    
329  /**  /**

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed