/[cvs]/nfo/php/libs/org.netfrag.patches/phphtmllib/widgets/GenericGUIDataList.php
ViewVC logotype

Diff of /nfo/php/libs/org.netfrag.patches/phphtmllib/widgets/GenericGUIDataList.php

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

revision 1.12 by jonen, Thu May 6 17:14:35 2004 UTC revision 1.14 by jonen, Mon Nov 15 16:51:48 2004 UTC
# Line 4  Line 4 
4  ##    $Id$  ##    $Id$
5  ## -------------------------------------------------------------------------  ## -------------------------------------------------------------------------
6  ##    $Log$  ##    $Log$
7    ##    Revision 1.14  2004/11/15 16:51:48  jonen
8    ##    + added var 'numrows' to constructor args
9    ##
10    ##    Revision 1.13  2004/10/07 14:17:50  jonen
11    ##    + pass filter-values to backend now! (page-control!)
12    ##
13  ##    Revision 1.12  2004/05/06 17:14:35  jonen  ##    Revision 1.12  2004/05/06 17:14:35  jonen
14  ##    updated  ##     updated
15  ##  ##
16  ##    Revision 1.11  2003/05/10 17:58:45  jonen  ##    Revision 1.11  2003/05/10 17:58:45  jonen
17  ##    + reworked to implement 'create/add new' item  ##    + reworked to implement 'create/add new' item
# Line 100  class GenericGUIDataList extends Default Line 106  class GenericGUIDataList extends Default
106    *    *
107    *    *
108    */    */
109    function GenericGUIDataList($title, $width = "100%", $default_orderby='', $default_reverseorder=FALSE, $options = array()) {    function GenericGUIDataList($title, $width = "100%", $default_orderby='', $default_reverseorder=FALSE, $num_rows=10, $options = array()) {
110      if ($options) { $this->_options = $options; }      if ($options) { $this->_options = $options; }
111    
112        $this->set_numrows($num_rows);
113    
114      // call parent constructor      // call parent constructor
115      $parent =  get_parent_class($this);      $parent =  get_parent_class($this);
116      $this->$parent($title, $width = "100%", $default_orderby='', $default_reverseorder=FALSE);          $this->$parent($title, $width = "100%", $default_orderby='', $default_reverseorder=FALSE);
117        
118    }    }
119    
120    
# Line 141  class GenericGUIDataList extends Default Line 150  class GenericGUIDataList extends Default
150        // V5:        // V5:
151        //print "options: " . Dumper($this->_options);        //print "options: " . Dumper($this->_options);
152                
153    
154              //HACK 2004-10-07: page-filter done by backend now,
155              //                 filter-values are passed to backend
156          $this->_options['data_locator_meta']['filter']['offset'] = $this->offset();
157          $this->_options['data_locator_meta']['filter']['numrows'] = $this->numrows();
158          $this->_options['data_locator_meta']['filter']['search_field'] = $this->search_field();
159          $this->_options['data_locator_meta']['filter']['search_value'] = $this->search_value();
160          $this->_options['data_locator_meta']['filter']['search_modifier'] = $this->simple_search_modifier_value();
161          
162          //$this->_set("offsetVar", 0);
163          
164        $initial_locator = php::mkComponent( 'DataSource::Locator', array( adapter_type => 'phpHtmlLib' ) );        $initial_locator = php::mkComponent( 'DataSource::Locator', array( adapter_type => 'phpHtmlLib' ) );
165        //print "1st locator: " . Dumper($initial_locator);        //print "1st locator: " . Dumper($initial_locator);
166                
# Line 182  class GenericGUIDataList extends Default Line 202  class GenericGUIDataList extends Default
202                        
203          //print Dumper($source);          //print Dumper($source);
204            $headers = $source->get_header();            $headers = $source->get_header();
205            //print Dumper($headers);            //print "headers: " . Dumper($headers);
206                        
207            $this->set_title( $this->get_title() . ' - ' . $source->get_total_rows() . ' Einträge' );            $this->set_title( $this->get_title() . ' - ' . $source->get_total_rows() . ' Einträge' );
208                        
209            foreach($headers as $val) {            foreach($headers as $val) {
210                  $this->add_header_item($val, "150", $val, SORTABLE, SEARCHABLE);                  $this->add_header_item($val, "150", $val, SORTABLE, SEARCHABLE);
211      }      }
212        
213    
214  /*  /*
215          $this->add_header_item("Uid", "200", "uid", SORTABLE, SEARCHABLE);          $this->add_header_item("Uid", "200", "uid", SORTABLE, SEARCHABLE);
# Line 212  class GenericGUIDataList extends Default Line 233  class GenericGUIDataList extends Default
233       * @return TDtag object       * @return TDtag object
234       */       */
235     function wrap_column_item($obj, $col_name, $row_data) {     function wrap_column_item($obj, $col_name, $row_data) {
236        
237            //print "item: " . Dumper($obj) . "<br>";
238    
239          //make sure its set to something.          //make sure its set to something.
240          if ($obj == '') {          if ($obj == '') {

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.14

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