<?xml version="1.0"?>
<!--
 -  
 -  $Id: data_source_0.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
 -
 -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 -  project.
 -  
 -  Copyright (C) 1998-2006 OpenLink Software
 -  
 -  This project is free software; you can redistribute it and/or modify it
 -  under the terms of the GNU General Public License as published by the
 -  Free Software Foundation; only version 2 of the License, dated June 1991.
 -  
 -  This program is distributed in the hope that it will be useful, but
 -  WITHOUT ANY WARRANTY; without even the implied warranty of
 -  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 -  General Public License for more details.
 -  
 -  You should have received a copy of the GNU General Public License along
 -  with this program; if not, write to the Free Software Foundation, Inc.,
 -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 -  
 -  
-->
<!--! \brief Simple navigation form using invisible data-source control
This example will show a cell of customers table from Northwind demo database.
Allows to show different columns : name and phone.
-->
<v:page name="data_source__0" xmlns:v="http://www.openlinksw.com/vspx/">
<html>
<body>
<v:variable name="offset" default="0" type="int"/>
   <v:form name="f1" method="POST" type="simple">
   <div>There is a hidden data-source on "<?V self.datasource1.ds_sql ?>"</div>
   <v:data-source name="datasource1" expression-type="sql" nrows="10" initial-offset="--self.offset">
     <v:expression>
       select * from Demo.demo.Customers where CustomerID like ? order by CompanyName desc
     </v:expression>
     <v:param name="mask" value="--('L%')"/>
     <v:column name="CompanyName" label="Company Name" input-format="%s" output-format="%s"/>
     <v:column name="Phone" label="Telephone" input-format="%s" output-format="%s" />
   </v:data-source>
   <div>
   row #: <v:text name="r1" value="0" /><br />
   col #: <v:text name="c1" value="0" /><br />
   Seek : <v:button action="simple" name="b1" value="OK" />
   </div>
   <div>
   "<v:label name="l1" value="--self.datasource1.get_column_label (atoi(self.c1.ufl_value))" />" =
   <v:label name="l2" value="--self.datasource1.get_item_value (atoi(self.r1.ufl_value),atoi(self.c1.ufl_value))"/>
   </div>
    <v:on-post>
      self.l1.vc_data_bind (e);
      self.l2.vc_data_bind (e);
    </v:on-post>
   </v:form>
</body>
</html>
</v:page>
