/[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.7 by jonen, Wed Feb 26 21:41:26 2003 UTC revision 1.8 by jonen, Thu Mar 20 04:25:43 2003 UTC
# Line 72  class DefaultGUIDatalist extends DataLis Line 72  class DefaultGUIDatalist extends DataLis
72       *       *
73       */       */
74      var $_default_checked_items = array();      var $_default_checked_items = array();
75        
76        
77        /**
78         * This array holds the list of
79         * hidden items.
80         *
81         */
82         var $_hidden_items = array();
83    
84    
85      /**      /**
# Line 83  class DefaultGUIDatalist extends DataLis Line 91  class DefaultGUIDatalist extends DataLis
91      * This variable tells us whether to display select all checkbox      * This variable tells us whether to display select all checkbox
92      */      */
93      var $_allow_select_all = TRUE;      var $_allow_select_all = TRUE;
94    
   
95      /**      /**
96       * This function sets a prefix for all       * This function sets a prefix for all
97       * variables that are used in the item list       * variables that are used in the item list
# Line 317  class DefaultGUIDatalist extends DataLis Line 324  class DefaultGUIDatalist extends DataLis
324       */       */
325      function wrap_column_item($obj, $col_name) {      function wrap_column_item($obj, $col_name) {
326    
         $databrowser = new DataBrowser();  
   
327          //make sure its set to something.          //make sure its set to something.
328          if ($obj == '') {          if ($obj == '') {
329              $obj = " ";              $obj = " ";
330          }          }
         // if item is match by expression we will replace it with an link object    
         elseif($databrowser->decode_column_item_expr($obj)) {    
           $obj = $databrowser->decode_column_item_expr($obj);    
         }    
         // if item is an Array we will replace it with an selection form object    
         elseif($databrowser->decode_column_item_array($obj, array( 'form' => 1)) ) {  
           $obj = $databrowser->decode_column_item_array($obj, array( 'form' => 1));    
         }    
331    
332          //make sure we don't put a right border on the last          //make sure we don't put a right border on the last
333          //column we are working on.          //column we are working on.
# Line 452  class DefaultGUIDatalist extends DataLis Line 449  class DefaultGUIDatalist extends DataLis
449              $container->push(form_hidden($this->_vars["search_fieldVar"], $field));              $container->push(form_hidden($this->_vars["search_fieldVar"], $field));
450          }          }
451    
452          $hidden_fields = $this->get_hidden_fields();          if(is_array($this->hidden_items)) {  
453          if(is_array($hidden_fields)) {              foreach($this->hidden_items as $key => $value) {  
           foreach($hidden_fields as $key => $value) {    
454              $container->push(form_hidden($key, $value));                $container->push(form_hidden($key, $value));  
455            }            }
456          }          }
# Line 918  class DefaultGUIDatalist extends DataLis Line 914  class DefaultGUIDatalist extends DataLis
914          return $script;          return $script;
915      }      }
916    
917      function get_hidden_fields() {      function add_hidden_item($label, $value) {
918           user_error("DefaulGUIDataList::get_hidden_fields() - ".        $this->_hidden_items[$label] = $value;
                            "child class must override this method ".  
                            "this function should return a hash for hidden fields, if not needed just return" );  
     }  
   
     function _decode_column_item_array($obj) {  
          user_error("DefaulGUIDataList::_decode_column_item_array() - ".  
                            "child class must override this method ".  
                            "this function should decode the column_item if it is a (sub-) array,".  
                            "array should e.g. replaced by a select form." );  
     }  
     
     function _decode_column_item_expr($obj) {  
          user_error("DefaulGUIDataList::_decode_column_item_expr() - ".  
                            "child class must override this method ".  
                            "this function should decode the column_item, if it is encoded for e.g. objects" );  
919      }      }
920    
921  }  }
922    
923  /**  /**

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

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