/[cvs]/nfo/php/libs/org.netfrag.app/WebExplorer/Module/DataItem.php
ViewVC logotype

Contents of /nfo/php/libs/org.netfrag.app/WebExplorer/Module/DataItem.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations)
Fri Apr 4 00:50:44 2003 UTC (21 years, 4 months ago) by jonen
Branch: MAIN
+ initial commit

1 <?
2 /*
3 ## -----------------------------------------------------------------------------
4 ## $Id: ExplorerDataItem.inc,v 1.1 2003/03/01 22:57:23 cvsmax Exp $
5 ## -----------------------------------------------------------------------------
6 ## $Log: ExplorerDataItem.inc,v $
7 ## Revision 1.1 2003/03/01 22:57:23 cvsmax
8 ## + inital commit
9 ##
10 ##
11 ## -----------------------------------------------------------------------------
12 */
13
14 class WebExplorer_Module_DataItem extends WebExplorer_Module_AbstractGUIModule {
15
16
17 function set_gui_object() {
18 if($this->_args['mode'] == 'view') {
19 $this->_gui_object = new DataItem($this->_args['caption'], $this->_args['options']);
20 }
21 elseif($this->_args['mode'] == 'edit') {
22 $this->_gui_object = new EditDataItem($this->_args['caption'], $this->_args['options'] );
23 }
24 }
25
26 /*
27 function view_DataItem() {
28 $initial_locator = php::mkComponent( 'DataSource::Locator', array( adapter_type => 'phpHtmlLib' ) );
29 $proxy = php::mkComponent('DataSource::Generic', $initial_locator, $this->_args['options']['data_locator_meta']);
30 $source = $proxy->get_adapter();
31 $source->do_query();
32 $result = $source->_result;
33 //print Dumper($source->_result);
34
35 $table = new InfoTable($this->_args['caption'], $width="100%", "center");
36 if (is_array($result)) {
37 foreach($result as $key => $value) {
38 if(!$value) { $value = "&nbsp;"; }
39 $table->add_row(span_font10bold($key), $value);
40 }
41 }
42 // build submit form
43 $container = container(
44 form_open($this->_args['caption'], $_SERVER['PHP_SELF'], 'POST'),
45 form_submit('ecitem', "edit"),
46 form_close()
47 );
48 //$table->add_row(div_build_spacergif_tag(), $container);
49 $table->add_row("&nbsp;", $container);
50 return $table;
51 }
52 */
53
54
55 }
56
57 ?>

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