| 15 |
* $Id$ |
* $Id$ |
| 16 |
* |
* |
| 17 |
* $Log$ |
* $Log$ |
| 18 |
|
* Revision 1.14 2003/04/04 21:19:21 joko |
| 19 |
|
* modified exception handling (enhanced, purged redundant code) |
| 20 |
|
* |
| 21 |
|
* Revision 1.13 2003/04/04 02:37:14 jonen |
| 22 |
|
* _query[action] == write |
| 23 |
|
* |
| 24 |
* Revision 1.12 2003/03/29 08:00:48 joko |
* Revision 1.12 2003/03/29 08:00:48 joko |
| 25 |
* modified ErrorBoxing |
* modified ErrorBoxing |
| 26 |
* |
* |
| 687 |
switch ($this->_query[metatype]) { |
switch ($this->_query[metatype]) { |
| 688 |
case 'data': |
case 'data': |
| 689 |
$command = 'queryData'; |
$command = 'queryData'; |
| 690 |
|
|
| 691 |
//$command = 'getObjects'; // FIXME!!! |
//$command = 'getObjects'; // FIXME!!! |
| 692 |
//$this->_locator->set_option('metadata.command', $command); |
//$this->_locator->set_option('metadata.command', $command); |
| 693 |
/* |
/* |
| 721 |
$query_args[classname] = $this->_query[classname]; |
$query_args[classname] = $this->_query[classname]; |
| 722 |
break; |
break; |
| 723 |
} |
} |
| 724 |
|
if($this->_query[action] == 'write') { |
| 725 |
|
$query_args[action] = $this->_query[action]; |
| 726 |
|
$query_args[data] = $this->_query[data]; |
| 727 |
|
} |
| 728 |
$args = array( |
$args = array( |
| 729 |
'data_type' => $this->_query[abstract_type], |
'data_type' => $this->_query[abstract_type], |
| 730 |
'query_args' => $query_args |
'query_args' => $query_args |
| 735 |
case 'schema': |
case 'schema': |
| 736 |
//print "Testing schema:" . "<br>"; |
//print "Testing schema:" . "<br>"; |
| 737 |
$command = 'querySchema'; |
$command = 'querySchema'; |
| 738 |
|
$args = array( $this->_query[filter] ); |
| 739 |
break; |
break; |
| 740 |
} |
} |
| 741 |
|
|
| 821 |
|
|
| 822 |
$box = container(); |
$box = container(); |
| 823 |
|
|
|
// box client code (javascript) |
|
|
$code_js = " |
|
|
<script language=\"javascript\"> |
|
|
function toggle_vis(id) { |
|
|
elem = eval('document.all.' + id); |
|
|
status = elem.style.getAttribute('display'); |
|
|
if (status == 'none') { |
|
|
elem.style.setAttribute('display', 'block'); |
|
|
} else { |
|
|
elem.style.setAttribute('display', 'none'); |
|
|
} |
|
|
} |
|
|
</script> |
|
|
"; |
|
|
//$script = html_script($code_js); |
|
|
//print $script->render(); |
|
|
$box->add( $code_js ); |
|
|
|
|
| 824 |
// box style |
// box style |
| 825 |
$style = container( |
$style = container( |
| 826 |
html_style("text/css", '.boxlabel_darkgreen { color: darkgreen; font-weight:bold; }'), |
html_style("text/css", '.boxlabel_darkgreen { color: darkgreen; font-weight:bold; }'), |
| 834 |
$locatorbox = html_div('box_dsg'); |
$locatorbox = html_div('box_dsg'); |
| 835 |
$locatorbox->set_id("locatorbox_$boxcount"); |
$locatorbox->set_id("locatorbox_$boxcount"); |
| 836 |
$locatorbox->add( Dumper($this->_locator) ); |
$locatorbox->add( Dumper($this->_locator) ); |
| 837 |
|
|
| 838 |
|
// FIXME: ie/mozilla? |
| 839 |
//$locatorbox->set_style('visibility:false;'); |
//$locatorbox->set_style('visibility:false;'); |
| 840 |
$locatorbox->set_style('display:none;'); |
$locatorbox->set_style('display:none;'); |
| 841 |
|
|
| 842 |
$statusbox->add( html_span('boxlabel_darkgreen', "Locator:"), html_a("javascript:toggle_vis('locatorbox_$boxcount');", '[show]'), $locatorbox, html_br() ); |
$statusbox->add( html_span('boxlabel_darkgreen', "Locator:"), jsAnchor( 'toggle_vis', array("locatorbox_$boxcount"), '[show]'), $locatorbox, html_br() ); |
| 843 |
$call = $this->_locator->get_call(); |
$call = $this->_locator->get_call(); |
| 844 |
$statusbox->add( html_span('boxlabel_darkgreen', "Method:"), $call[method], html_br() ); |
$statusbox->add( html_span('boxlabel_darkgreen', "Method:"), $call[method], html_br() ); |
| 845 |
if (sizeof($call[args])) { |
if (sizeof($call[args])) { |
| 848 |
$statusbox->add( html_span('boxlabel_darkgreen', "Count:"), $this->get_result_count(), html_br() ); |
$statusbox->add( html_span('boxlabel_darkgreen', "Count:"), $this->get_result_count(), html_br() ); |
| 849 |
$box->add( $statusbox ); |
$box->add( $statusbox ); |
| 850 |
|
|
| 851 |
print $box->render(); |
//print $box->render(); |
| 852 |
|
trace( $box ); |
| 853 |
|
|
| 854 |
} |
} |
| 855 |
|
|