Sophie

Sophie

distrib > Fedora > 14 > x86_64 > media > updates > by-pkgid > 71d40963b505df4524269198e237b3e3 > files > 957

virtuoso-opensource-doc-6.1.4-2.fc14.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
 <head profile="http://internetalchemy.org/2003/02/profile">
  <link rel="foaf" type="application/rdf+xml" title="FOAF" href="http://www.openlinksw.com/dataspace/uda/about.rdf" />
  <link rel="schema.dc" href="http://purl.org/dc/elements/1.1/" />
  <meta name="dc.title" content="OpenLink Virtuoso Universal Server: Documentation" />
  <meta name="dc.subject" content="OpenLink Virtuoso Universal Server: Documentation" />
  <meta name="dc.creator" content="OpenLink Software Documentation Team ;&#10;" />
  <meta name="dc.copyright" content="OpenLink Software, 1999 - 2009" />
  <link rel="top" href="index.html" title="OpenLink Virtuoso Universal Server: Documentation" />
  <link rel="search" href="/doc/adv_search.vspx" title="Search OpenLink Virtuoso Universal Server: Documentation" />
  <link rel="parent" href=".html" title="Chapter Contents" />
  <link rel="prev" href="index.html" title="Home" />
  <link rel="next" href="contents.html" title="Contents" />
  <link rel="shortcut icon" href="../images/misc/favicon.ico" type="image/x-icon" />
  <link rel="stylesheet" type="text/css" href="doc.css" />
  <link rel="stylesheet" type="text/css" href="/doc/translation.css" />
  <title>OpenLink Virtuoso Universal Server: Documentation</title>
  <meta http-equiv="Content-Type" content="text/xhtml; charset=UTF-8" />
  <meta name="author" content="OpenLink Software Documentation Team ;&#10;" />
  <meta name="copyright" content="OpenLink Software, 1999 - 2009" />
  <meta name="keywords" content="" />
  <meta name="GENERATOR" content="OpenLink XSLT Team" />
 </head>
 <body>
  <div id="header">
    <a name="vc_template" />
    <img src="../images/misc/logo.jpg" alt="" />
    <h1>OpenLink Virtuoso Universal Server: Documentation - template</h1>
  </div>
  <div id="navbartop">
   <div>
      <a class="link" href="functions.html">Chapter Contents</a> | <a class="link" href="index.html" title="Home">Prev</a> | <a class="link" href="contents.html" title="Contents">Next</a>
   </div>
  </div>
  <div id="currenttoc">
   <form method="post" action="/doc/adv_search.vspx">
    <div class="search">Keyword Search: <br />
        <input type="text" name="q" /> <input type="submit" name="go" value="Go" />
    </div>
   </form>
   <div>
      <a href="http://www.openlinksw.com/">www.openlinksw.com</a>
   </div>
   <div>
      <a href="http://docs.openlinksw.com/">docs.openlinksw.com</a>
   </div>
    <br />
   <div>
      <a href="index.html">Book Home</a>
   </div>
    <br />
   <div>
      <a href="contents.html">Contents</a>
   </div>
   <div>
      <a href="preface.html">Preface</a>
   </div>
    <br />
   <div>
      <a href="overview.html">Overview</a>
   </div>
   <div>
      <a href="installation.html">Installation Guide</a>
   </div>
   <div>
      <a href="quicktours.html">Quick Start &amp; Tours</a>
   </div>
   <div>
      <a href="sampleapps.html">Sample ODBC &amp; JDBC Applications</a>
   </div>
   <div>
      <a href="concepts.html">Conceptual Overview</a>
   </div>
   <div>
      <a href="server.html">Administration</a>
   </div>
   <div>
      <a href="accessinterfaces.html">Data Access Interfaces</a>
   </div>
   <div>
      <a href="sqlreference.html">SQL Reference</a>
   </div>
   <div>
      <a href="sqlprocedures.html">SQL Procedure Language Guide</a>
   </div>
   <div>
      <a href="hooks.html">Database Event Hooks</a>
   </div>
   <div>
      <a href="repl.html">Data Replication, Synchronization and Transformation Services</a>
   </div>
   <div>
      <a href="webappdevelopment.html">Web Application Development</a>
   </div>
   <div>
      <a href="webandxml.html">XML Support</a>
   </div>
   <div>
      <a href="rdfandsparql.html">RDF Data Access and Data Management</a>
   </div>
   <div>
      <a href="webservices.html">Web Services</a>
   </div>
   <div>
      <a href="runtimehosting.html">Runtime Hosting</a>
   </div>
   <div>
      <a href="internetservices.html">Internet Services</a>
   </div>
   <div>
      <a href="freetext.html">Free Text Search</a>
   </div>
   <div>
      <a href="tpcc.html">TPC C Benchmark Kit</a>
   </div>
   <div>
      <a href="xa.html">Using Virtuoso with Tuxedo</a>
   </div>
   <div>
      <a href="appendixa.html">Appendix</a>
   </div>
   <div>
      <a href="functions.html">Virtuoso Functions Guide</a>
   </div>
    <br />
  </div>
  <div id="text">
    <h2>template</h2>
    <div class="refpurpose">Container for a group of controls and/or HTML code.</div>
    <div class="funcsynopsis">
        <span class="funcdef">
            &lt;<a href="vc_template.html">
          <span class="function">template</span>
        </a> 
            name (required) 
          
            annotation (optional) 
          
            initial-enable (optional) 
          
            enabled (optional) 
          
            instantiate (optional) 
          
            control-udt (optional) 
          
            xsd-stub-xhtml (optional) 
          
            width (optional) 
          
            height (optional) 
          
            type (optional) 
          
            redirect (optional) 
          
            condition (optional) 
          
            name-to-remove (optional) 
          
            set-to-remove (optional) 
          
            title (optional) 
          
            debug-srcfile (optional) 
          
            debug-srcline (optional) 
          
            debug-log (optional) 
 /&gt;</span>
    </div>
  
  
  
  <div class="refsect1">
    <div class="refsect1title">Description</div>
    <p>The container for any optional, repeatable or otherwise grouped controls or code. The type modifier is used to specify special kind of templates (i.e. repeatable content or tree node representation)</p>
  </div>
  <div class="refsect1">
    <div class="refsect1title">Attributes</div>
  <div class="formalpara">
   <strong>name = <a href="vc_type_SqlName.html">SqlName</a>
   </strong>
      <p>A page level unique name identifying a control.</p>
  </div>
  <div class="formalpara">
      <strong>annotation</strong>
      <p>A human readable comment.</p>
  </div>
  <div class="formalpara">
   <strong>initial-enable = <a href="vc_type_CalculateableValue.html">CalculateableValue</a>
   </strong>
      <p>Determines  whether  a control is initially visible. True by default. Could be data-bound to an SQL expression.</p>
  </div>
  <div class="formalpara">
   <strong>enabled = <a href="vc_type_CalculateableValue.html">CalculateableValue</a>
   </strong>
      <p>Determines  whether  a control is visible. True by default. Could be data-bound to an SQL expression.</p>
  </div>
  <div class="formalpara">
   <strong>instantiate = <a href="vc_type_CalculateableValue.html">CalculateableValue</a>
   </strong>
      <p>Determines whether a control instantiate its children. It is true by default. It could be data-bound to an SQL expression. Unlike most of calcucateable attributes, the value of this attribute for a control is calcluated before calling &#39;on-init&#39; event handler of the control; other values are calculated before calling &#39;before-data-bind&#39; event handler.</p>
  </div>
  <div class="formalpara">
   <strong>control-udt = <a href="vc_type_SqlName.html">SqlName</a>
   </strong>
      <p>At run time every control is represented as an instance of some user-defined type (UDT). VSPX compiles selects the UDT to use depending on name of the XML element that represents the control and maybe some of its attributes. In some specific cases the application developer may instruct VSPX compiler to use some other UDT, e.g. an application-specific UDT that is derived from the preset one. If specified, the value of &#39;control-udt&#39; attribute should be equal to the name of the desired target UDT.</p>
  </div>
  <div class="formalpara">
      <strong>xsd-stub-xhtml</strong>
      <p>This attribute is for internal use only. It has no effect if added to the source VSPX file.</p>
  </div>
  <div class="formalpara">
      <strong>width</strong>
      <p>Visible width of the control when it is displayed in WYSIWYG tools when the source VSPX text is edited.
The value of this attribute will not be used when the resulting HTML is rendered.</p>
  </div>
  <div class="formalpara">
      <strong>height</strong>
      <p>Visible width of the control when it is displayed in WYSIWYG tools when the source VSPX text is edited.
The value of this attribute will not be used when the resulting HTML is rendered.</p>
  </div>
  <div class="formalpara">
      <strong>type</strong>
      <p>The behaviour of the template.</p>
   <table class="data">
        <caption>Table: 12.4.9.1. Allowed values of the &#39;type&#39; attribute</caption>
    
     
      <tr>
              <td class="data">simple</td>
       <td class="data">
                <p>The template contains an arbitrary number of controls and HTML tags and  groups them together to control their processing, e.g. to enable or disable them altogether depending on some condition.</p>
       </td>
      </tr>
      <tr>
              <td class="data">repeat</td>
       <td class="data">
                <p>A repeating row of v:data-set. The template of this type will be repeated for each row in the window of the data-set. It will be instantiated, data bound, rendered.  If the template contains forms and submits, they get the post method called as one would expect.
On data binding, the parent of the template has its dg_current_row data member set to an array representing the selected row from left to right.
</p>
       </td>
      </tr>
      <tr>
              <td class="data">row</td>
       <td class="data">
                <p>A repeating row of v:data-grid. The template of this type will be repeated for each row in the window of the v:data-grid. It will be instantiated, data bound, rendered.  If the template contains forms and submits, they get the post method called as one would expect.
On data binding, the parent of the template has its dg_current_row data member set to an array representing the selected row from left to right.
</p>
                <p>
The controls under this template (such as text, label, button etc.) can access data in current row in order as columns are given by referencing te_rowset member of row template.
</p>
       </td>
      </tr>
      <tr>
              <td class="data">frame</td>
       <td class="data">
                <p>
A non-repeating static content of v:data-grid.
Content of this template represents view in page when rows are selected,
position of scroll buttons, rowset and form for adding a record.
</p>
       </td>
      </tr>
      <tr>
              <td class="data">if-exists</td>
       <td class="data">
                <p>
Template that is enabled only if the resultset is not empty in v:data-set.
</p>
       </td>
      </tr>
      <tr>
              <td class="data">if-not-exists</td>
       <td class="data">
                <p>Template that is enabled only if the resultset is empty in v:data-set.</p>
       </td>
      </tr>
      <tr>
              <td class="data">add</td>
       <td class="data">
                <p>Template that is enabled when user adds new record in the resultset in v:data-set (if the resultset is not read-only).
Similarly to templates of type &#39;edit&#39;, the &#39;add&#39; template contains a vspx:form of type &#39;update&#39; that is used to allow adding of rows in table as specified.
Usually this form is a vspx_form + vspx_text constrained to columns and table selected in SQL expression of the parent vspx:data-set control with value of key attributes set to null. Please remember to set the &#39;if-not-exists&#39; attribute of the form to &#39;insert&#39;.</p>
       </td>
      </tr>
      <tr>
              <td class="data">browse</td>
       <td class="data">
                <p>This type is meaningful only for templates right inside templates of type &#39;repeat&#39;. When the template of type &#39;repeat&#39; is used multiple times to display every row of a data-set, the template of type &#39;browse&#39; expands only for those rows that are not currently editable.
</p>
       </td>
      </tr>
      <tr>
              <td class="data">edit</td>
       <td class="data">
                <p>Template that is enabled when user edits an existing record in the resultset in v:data-set (if the resultset isnot read-only and if the &#39;edit&#39; attribute of v:data-set is set to &#39;true&#39;).
The template of this type usually contains a vspx:form of type &#39;update&#39;;
the &#39;table&#39; attribute of the form is the name of the table from &#39;sql&#39; attribute of the v:data-set where the &#39;edit&#39; template is located; controls of the form are usually constrained to columns of the SQL expression of that &#39;sql&#39; attribute.</p>
       </td>
      </tr>
      <tr>
              <td class="data">if-login</td>
       <td class="data">
                <p>Template that is enabled when user is logged in (e.g. for use in v:login. If the login is valid, the contents of this child will be instantiated.  This can be for example a button with &#39;action&#39; attribute set to &#39;logout&#39;, a welcome message or such.  When using the vspx:login system, the user name is is obtained by connection_get (&#39;vspx_user&#39;).</p>
       </td>
      </tr>
      <tr>
              <td class="data">if-not-login</td>
       <td class="data">
                <p>Template that is enabled when user is not yet logged in or is already logged out (e.g. for use in v:login.
The template specifies what to do if there are no credentials with the page.
If the &#39;redirect&#39; attribute is given, then the entire page containing
this is not processed at all but instead the page specified in the url
is processed instead, with the context being that of the invocation of
this page.  The redirect page can thus ask for the login and having
checked it return to this page, since it knows the url for this.  In
this way it is possible to bookmark places of which the uri&#39;s may
expire, and accessing an expired place will just prompt for the login
before going to the page.


If the redirect is not specified, the content of the template is instantiated and shown. The content can be arbitrary, e.g. the vspx:login-form control can appear here, providing a standard login form that prompts for a user name and password and has a submit button.</p>
       </td>
      </tr>
      <tr>
              <td class="data">tree-node</td>
       <td class="data">
                <p>
Template for internal nodes of the tree in v:tree (i.e. for nodes with children).
</p>
       </td>
      </tr>
      <tr>
              <td class="data">tree-leaf</td>
       <td class="data">
                <p>Template for terminal nodes of the tree in v:tree (i.e. for nodes without children).</p>
       </td>
      </tr>
      <tr>
              <td class="data">input</td>
       <td class="data">
                <p>Template for input the SQL statement to execute it interactively in v:isql element.</p>
       </td>
      </tr>
      <tr>
              <td class="data">result</td>
       <td class="data">
                <p>Template to show if v:isql returns result without an error.</p>
       </td>
      </tr>
      <tr>
              <td class="data">error</td>
       <td class="data">
                <p>Template to be shown by v:isql if the user entered the SQL query and the execution of this query caused an error.</p>
       </td>
      </tr>
     
    
   </table>
        <br />
  </div>
  <div class="formalpara">
      <strong>redirect</strong>
      <p>The URL to which the user agent is redirected if not authenticated, applicable only when type is &#39;if-no-login&#39;.</p>
  </div>
  <div class="formalpara">
   <strong>condition = <a href="vc_type_SqlCode.html">SqlCode</a>
   </strong>
      <p>This is a SQL expression to be tested for rendering the template</p>
  </div>
  <div class="formalpara">
      <strong>name-to-remove</strong>
      <p>This works together with set-to-remove, see next.</p>
  </div>
  <div class="formalpara">
      <strong>set-to-remove</strong>
      <p>This combined with name-to-remove gives posibility to remove a HTML elements from output.</p>
   <table class="data">
        <caption>Table: 12.4.9.1. Allowed values of the &#39;set-to-remove&#39; attribute</caption>
    
     
      <tr>
              <td class="data">none</td>
       <td class="data">
                <p>The rendered output of the enclosing template will not be affected by the &#39;name-to-remove&#39; attribute of the template.</p>
       </td>
      </tr>
      <tr>
              <td class="data">top</td>
       <td class="data">
                <p>The rendered output of the enclosing template should not contain the first opening tag whose name is equal to the value of &#39;name-to-remove&#39; attribute of the template.</p>
       </td>
      </tr>
      <tr>
              <td class="data">bottom</td>
       <td class="data">
                <p>
The rendered output of the enclosing template should not contain the last closing tag whose name is equal to the value of &#39;name-to-remove&#39; attribute of the template.
</p>
       </td>
      </tr>
      <tr>
              <td class="data">both</td>
       <td class="data">
                <p>
The rendered output of the enclosing template should not contain the both the first opening tag and the last closing tag whose name is equal to the value of &#39;name-to-remove&#39; attribute of the template.
</p>
       </td>
      </tr>
     
    
   </table>
        <br />
  </div>
  <div class="formalpara">
      <strong>title</strong>
      <p>When used inside tab control, this is used to show as label of the selector</p>
  </div>
  <div class="formalpara">
      <strong>debug-srcfile</strong>
      <p>URI of the source document where the tag comes from.</p>
  </div>
  <div class="formalpara">
      <strong>debug-srcline</strong>
      <p>Line number in the source document where the tag comes from.</p>
  </div>
  <div class="formalpara">
      <strong>debug-log</strong>
      <p>This defines what sort of data are saved to the debugging log.
</p>
  </div>
  </div>
  <div class="refsect1">
    <div class="refsect1title">Declaration of type vspx_template</div>
    <p>
</p>
    <div>
        <pre class="screen">
create type vspx_template under vspx_control
  temporary self as ref
 constructor method vspx_template (name varchar, parent vspx_control)
</pre>
      </div>
  </div>
</div>
  <div id="footer">
    <div>Copyright© 1999 - 2009 OpenLink Software All rights reserved.</div>
   <div id="validation">
    <a href="http://validator.w3.org/check/referer">
        <img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" />
    </a>
    <a href="http://jigsaw.w3.org/css-validator/">
        <img src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!" height="31" width="88" />
    </a>
   </div>
  </div>
 </body>
</html>