41 lines
1.8 KiB
HTML
41 lines
1.8 KiB
HTML
|
|
<html>
|
||
|
|
<head>
|
||
|
|
<link rel="stylesheet" type="text/css" href="..\styles.css">
|
||
|
|
</head>
|
||
|
|
<body>
|
||
|
|
<img src="..\..\da.png" alt="" align="right">
|
||
|
|
|
||
|
|
<!-------------------------------------------------------------------------->
|
||
|
|
|
||
|
|
<p class="h1">Dynamic Where Sample</p>
|
||
|
|
|
||
|
|
<p>
|
||
|
|
This sample illustrates the use of <b>Dynamic Where</b> to submit secure where clauses to the server in order to
|
||
|
|
filter records fecthed to the client. The sample provides a range of pre-defined Where clauses to choose from,
|
||
|
|
as well as a text field that allows the user to manually enter own where clause (in real life, Where clauses will of course
|
||
|
|
seldomly be hand-written in XML, but the appropriate APIs would be used to create the XML in code).<br/>
|
||
|
|
The grid at the bottom can be filled with the data fetched using the <b>Where Clause</b>.
|
||
|
|
</p>
|
||
|
|
|
||
|
|
<p class="h2">Examine the code</p>
|
||
|
|
<ul>
|
||
|
|
<li>
|
||
|
|
Look at <b>TClientForm.GetTemplateWhereExpression</b>. This method uses the <b>DynamicWhere</b> API to create
|
||
|
|
different <b>WhereExpression</b> objects that encapsulate different data conditions.
|
||
|
|
</li>
|
||
|
|
<li><b>TClientForm.ShowXML</b> method extracts the Xml representation of an existing <b>WhereExpression</b> object.</li>
|
||
|
|
<li>Take a look at the <b>TClientForm.btLoadClick</b> event handler to see how conditions are applied and the resulting dataset is retrieved.</li>
|
||
|
|
</ul>
|
||
|
|
|
||
|
|
<p class="h2">Getting started</p>
|
||
|
|
<ul>
|
||
|
|
<li>Run the Sample Server.</li>
|
||
|
|
<li>Run the Dynamic Where Sample.</li>
|
||
|
|
<li>Select one of the predefined conditions.</li>
|
||
|
|
<li>Examine the XML corresponding to th choosen condition.</li>
|
||
|
|
<li>Press the Load button tp load data.</li>
|
||
|
|
<li>Try to change the XML, to validate changed XML and press the Load button again.</li>
|
||
|
|
<li>Select the last condition (marked as wrong) and try to load data.</li>
|
||
|
|
</ul>
|
||
|
|
</body>
|
||
|
|
</html>
|