1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>Wt: Wt::Ext::DataStore Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.6 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="pages.html"><span>Related Pages</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="annotated.html"><span>Class List</span></a></li>
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class Members</span></a></li>
</ul>
</div>
<div class="navpath"><a class="el" href="namespaceWt.html">Wt</a>::<a class="el" href="namespaceWt_1_1Ext.html">Ext</a>::<a class="el" href="classWt_1_1Ext_1_1DataStore.html">DataStore</a>
</div>
</div>
<div class="contents">
<h1>Wt::Ext::DataStore Class Reference<br>
<small>
[<a class="el" href="group__ext.html">Ext widgets</a>]</small>
</h1><!-- doxytag: class="Wt::Ext::DataStore" --><!-- doxytag: inherits="Wt::WResource" -->A resource that serializes data from a data model.
<a href="#_details">More...</a>
<p>
<code>#include <Wt/Ext/DataStore></code>
<p>
<div class="dynheader">
Inheritance diagram for Wt::Ext::DataStore:</div>
<div class="dynsection">
<p><center><img src="classWt_1_1Ext_1_1DataStore__inherit__graph.png" border="0" usemap="#Wt_1_1Ext_1_1DataStore__inherit__map" alt="Inheritance graph"></center>
<map name="Wt_1_1Ext_1_1DataStore__inherit__map">
<area shape="rect" href="classWt_1_1WResource.html" title="An object which can be rendered in the HTTP protocol." alt="" coords="15,80,127,107"><area shape="rect" href="classWt_1_1WObject.html" title="A base class for objects that participate in the signal/slot system." alt="" coords="23,5,119,32"></map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div>
<p>
<a href="classWt_1_1Ext_1_1DataStore-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1DataStore.html#9d88086e22ca1f48b8378494fe9222f9">DataStore</a> (<a class="el" href="classWt_1_1WAbstractItemModel.html">WAbstractItemModel</a> *model, <a class="el" href="group__ext.html#g5bc908c6e6aa90646cca1276d68cb2b2">DataLocation</a> dataLocation, <a class="el" href="classWt_1_1WObject.html">WObject</a> *parent=0)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Create a new data store. <a href="#9d88086e22ca1f48b8378494fe9222f9"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4b2c3c030c6557aa6e3beadb50bf1643"></a><!-- doxytag: member="Wt::Ext::DataStore::~DataStore" ref="4b2c3c030c6557aa6e3beadb50bf1643" args="()" -->
</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1DataStore.html#4b2c3c030c6557aa6e3beadb50bf1643">~DataStore</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1DataStore.html#6fbd9be0f07bc864bc2921769d64a51e">addColumn</a> (int columnIndex, const std::string &jsonName)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Add a column to the list of columns to be serialized. <a href="#6fbd9be0f07bc864bc2921769d64a51e"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1DataStore.html#d4e923221657f57281d76c02b3a4d803">setFilterColumn</a> (int columnIndex)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Set the column which is used to handle filter requests. <a href="#d4e923221657f57281d76c02b3a4d803"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1DataStore.html#95828fc3362ef58ff821790180bf9834">handleRequest</a> (const <a class="el" href="classWt_1_1Http_1_1Request.html">Http::Request</a> &request, <a class="el" href="classWt_1_1Http_1_1Response.html">Http::Response</a> &response)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Handles a request. <a href="#95828fc3362ef58ff821790180bf9834"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
A resource that serializes data from a data model.
<p>
An instance of this class is used by <a class="el" href="classWt_1_1Ext_1_1ComboBox.html" title="A widget that provides a drop-down combo-box control.">ComboBox</a> and <a class="el" href="classWt_1_1Ext_1_1TableView.html" title="A widget that displays data in a table.">TableView</a> widgets to serialize data from a <a class="el" href="classWt_1_1WAbstractItemModel.html" title="An abstract model for use with Wt's view classes.">WAbstractItemModel</a>. The data store can serialize data both for a ClientSide or ServerSide location of the data. When the location is ServerSide, the model supports transmission of certain data pages, and filtering of the model.<p>
To use the data store, you need to specify which columns from the model need to be serialized. <hr><h2>Constructor & Destructor Documentation</h2>
<a class="anchor" name="9d88086e22ca1f48b8378494fe9222f9"></a><!-- doxytag: member="Wt::Ext::DataStore::DataStore" ref="9d88086e22ca1f48b8378494fe9222f9" args="(WAbstractItemModel *model, DataLocation dataLocation, WObject *parent=0)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">Wt::Ext::DataStore::DataStore </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classWt_1_1WAbstractItemModel.html">WAbstractItemModel</a> * </td>
<td class="paramname"> <em>model</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__ext.html#g5bc908c6e6aa90646cca1276d68cb2b2">DataLocation</a> </td>
<td class="paramname"> <em>dataLocation</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classWt_1_1WObject.html">WObject</a> * </td>
<td class="paramname"> <em>parent</em> = <code>0</code></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Create a new data store.
<p>
Data will be fecthed from <em>model</em>.
</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="6fbd9be0f07bc864bc2921769d64a51e"></a><!-- doxytag: member="Wt::Ext::DataStore::addColumn" ref="6fbd9be0f07bc864bc2921769d64a51e" args="(int columnIndex, const std::string &jsonName)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Wt::Ext::DataStore::addColumn </td>
<td>(</td>
<td class="paramtype">int </td>
<td class="paramname"> <em>columnIndex</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const std::string & </td>
<td class="paramname"> <em>jsonName</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Add a column to the list of columns to be serialized.
<p>
The column <em>columnIndex</em> of the model is added to the current list of columns that are serialized. The <em>jsonName</em> provides the column label that is transmitted.
</div>
</div><p>
<a class="anchor" name="d4e923221657f57281d76c02b3a4d803"></a><!-- doxytag: member="Wt::Ext::DataStore::setFilterColumn" ref="d4e923221657f57281d76c02b3a4d803" args="(int columnIndex)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Wt::Ext::DataStore::setFilterColumn </td>
<td>(</td>
<td class="paramtype">int </td>
<td class="paramname"> <em>columnIndex</em> </td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Set the column which is used to handle filter requests.
<p>
A request for filtering data will be done by matching the given filter against data in the model at column <em>columnIndex</em>.
</div>
</div><p>
<a class="anchor" name="95828fc3362ef58ff821790180bf9834"></a><!-- doxytag: member="Wt::Ext::DataStore::handleRequest" ref="95828fc3362ef58ff821790180bf9834" args="(const Http::Request &request, Http::Response &response)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Wt::Ext::DataStore::handleRequest </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classWt_1_1Http_1_1Request.html">Http::Request</a> & </td>
<td class="paramname"> <em>request</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classWt_1_1Http_1_1Response.html">Http::Response</a> & </td>
<td class="paramname"> <em>response</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [protected, virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Handles a request.
<p>
Reimplement this method so that a proper response is generated for the given request. From the <code>request</code> object you can access request parameters and whether the request is a continuation request. In the <code>response</code> object, you should set the mime type and stream the output data.<p>
A request may also concern a continuation, indicated in <a class="el" href="classWt_1_1Http_1_1Request.html#2d4f88961a222be846460a8238823ae0" title="Returns a continuation object.">Http::Request::continuation()</a>, in which case the next part for a previously created continuation should be served.<p>
While handling a request, which may happen at any time together with event handling, the library makes sure that the resource is not being concurrently deleted, but multiple requests may happend simultaneously for a single resource.
<p>Implements <a class="el" href="classWt_1_1WResource.html#3a740f8cc29e2e6e4e58defc9c88b8b6">Wt::WResource</a>.</p>
</div>
</div><p>
</div>
<hr size="1"><address style="align: right;"><small>
Generated on Fri Mar 26 17:12:08 2010 for <a href="http://www.webtoolkit.eu/wt/">Wt</a> by <a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6</small></address>
</body>
</html>
|