--- nfo/php/libs/org.netfrag.patches/phphtmllib/widgets/GenericGUIDataList.php 2004/05/06 17:14:35 1.12
+++ nfo/php/libs/org.netfrag.patches/phphtmllib/widgets/GenericGUIDataList.php 2004/10/07 14:17:50 1.13
@@ -1,11 +1,14 @@
/*
## -------------------------------------------------------------------------
-## $Id: GenericGUIDataList.php,v 1.12 2004/05/06 17:14:35 jonen Exp $
+## $Id: GenericGUIDataList.php,v 1.13 2004/10/07 14:17:50 jonen Exp $
## -------------------------------------------------------------------------
## $Log: GenericGUIDataList.php,v $
+## Revision 1.13 2004/10/07 14:17:50 jonen
+## + pass filter-values to backend now! (page-control!)
+##
## Revision 1.12 2004/05/06 17:14:35 jonen
-## updated
+## updated
##
## Revision 1.11 2003/05/10 17:58:45 jonen
## + reworked to implement 'create/add new' item
@@ -105,7 +108,7 @@
// call parent constructor
$parent = get_parent_class($this);
- $this->$parent($title, $width = "100%", $default_orderby='', $default_reverseorder=FALSE);
+ $this->$parent($title, $width = "100%", $default_orderby='', $default_reverseorder=FALSE);
}
@@ -141,6 +144,17 @@
// V5:
//print "options: " . Dumper($this->_options);
+
+ //HACK 2004-10-07: page-filter done by backend now,
+ // filter-values are passed to backend
+ $this->_options['data_locator_meta']['filter']['offset'] = $this->offset();
+ $this->_options['data_locator_meta']['filter']['numrows'] = $this->numrows();
+ $this->_options['data_locator_meta']['filter']['search_field'] = $this->search_field();
+ $this->_options['data_locator_meta']['filter']['search_value'] = $this->search_value();
+ $this->_options['data_locator_meta']['filter']['search_modifier'] = $this->simple_search_modifier_value();
+
+ //$this->_set("offsetVar", 0);
+
$initial_locator = php::mkComponent( 'DataSource::Locator', array( adapter_type => 'phpHtmlLib' ) );
//print "1st locator: " . Dumper($initial_locator);
@@ -182,13 +196,14 @@
//print Dumper($source);
$headers = $source->get_header();
- //print Dumper($headers);
+ //print "headers: " . Dumper($headers);
$this->set_title( $this->get_title() . ' - ' . $source->get_total_rows() . ' Einträge' );
foreach($headers as $val) {
$this->add_header_item($val, "150", $val, SORTABLE, SEARCHABLE);
}
+
/*
$this->add_header_item("Uid", "200", "uid", SORTABLE, SEARCHABLE);
@@ -212,6 +227,8 @@
* @return TDtag object
*/
function wrap_column_item($obj, $col_name, $row_data) {
+
+ //print "item: " . Dumper($obj) . "
";
//make sure its set to something.
if ($obj == '') {