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
|
<!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::WValidationStatus 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="classWt_1_1WValidationStatus.html">WValidationStatus</a>
</div>
</div>
<div class="contents">
<h1>Wt::WValidationStatus Class Reference</h1><!-- doxytag: class="Wt::WValidationStatus" --><!-- doxytag: inherits="Wt::WCompositeWidget" -->A widget that keeps track of the validation status of a form widget.
<a href="#_details">More...</a>
<p>
<code>#include <Wt/WValidationStatus></code>
<p>
<div class="dynheader">
Inheritance diagram for Wt::WValidationStatus:</div>
<div class="dynsection">
<p><center><img src="classWt_1_1WValidationStatus__inherit__graph.png" border="0" usemap="#Wt_1_1WValidationStatus__inherit__map" alt="Inheritance graph"></center>
<map name="Wt_1_1WValidationStatus__inherit__map">
<area shape="rect" href="classWt_1_1WCompositeWidget.html" title="A widget that hides the implementation of composite widgets." alt="" coords="5,155,165,181"><area shape="rect" href="classWt_1_1WWidget.html" title="The abstract base class for a user-interface component." alt="" coords="37,80,133,107"><area shape="rect" href="classWt_1_1WObject.html" title="A base class for objects that participate in the signal/slot system." alt="" coords="37,5,133,32"></map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div>
<p>
<a href="classWt_1_1WValidationStatus-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_1WValidationStatus.html#a40ae47e0987dc7e1f0261372ca43ca5">WValidationStatus</a> (<a class="el" href="classWt_1_1WFormWidget.html">WFormWidget</a> *field, <a class="el" href="classWt_1_1WWidget.html">WWidget</a> *validStateWidget=0, <a class="el" href="classWt_1_1WWidget.html">WWidget</a> *invalidStateWidget=0, <a class="el" href="classWt_1_1WWidget.html">WWidget</a> *invalidEmptyStateWidget=0, <a class="el" href="classWt_1_1WContainerWidget.html">WContainerWidget</a> *parent=0)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Construct a <a class="el" href="classWt_1_1WValidationStatus.html" title="A widget that keeps track of the validation status of a form widget.">WValidationStatus</a> widget for another widget. <a href="#a40ae47e0987dc7e1f0261372ca43ca5"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="66ee198ccdd2eb5d0de620fc6326c2e2"></a><!-- doxytag: member="Wt::WValidationStatus::valid" ref="66ee198ccdd2eb5d0de620fc6326c2e2" args="() const " -->
bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WValidationStatus.html#66ee198ccdd2eb5d0de620fc6326c2e2">valid</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Is the field currently considered valid? <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classWt_1_1Signal.html">Signal</a>< bool > & </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WValidationStatus.html#463b399e7c6d20d7bed88d60290d1fd0">validated</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight"><a class="el" href="classWt_1_1Signal.html" title="A signal that propagates events to listeners.">Signal</a> emitted when the validation state changed. <a href="#463b399e7c6d20d7bed88d60290d1fd0"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
A widget that keeps track of the validation status of a form widget.
<p>
<em>Since Wt 2.1.3, all standard validators provide client-side validation and this is reflected in the form widget using the style class "Wt-invalid" when the validator returns not <a class="el" href="classWt_1_1WValidator.html#638a1feefca259ea2f806a8add2d18a31bc2acb7589ab9e3050867ebfc32dda3" title="The input is valid.">WValidator::Valid</a>. Therefore, it is unlikely you will need this class anymore.</em><p>
Use a WValidationStatus widget to act to changes in validation of a <a class="el" href="classWt_1_1WFormWidget.html" title="An abstract widget that corresponds to an HTML form element.">WFormWidget</a>. The widget may show visual feed-back of the validation state of the input.<p>
Visual feed-back may be given by showing an invalidStateWidget when input is invalid, an invalidEmptyStateWidget when the input is invalid because mandatory and empty, or a validStateWidget when input is valid. All of these widgets may be 0, indicating that no widget will be shown for the corresponding state.<p>
When validation state changes from invalid to valid, or from valid to invalid, the widget emits the validated signal. This may be used to for example enable or disable a button.<p>
<dl compact><dt><b><a class="el" href="deprecated.html#_deprecated000025">Deprecated:</a></b></dt><dd>Since Wt 3.1.1, validation is handled directly on <a class="el" href="classWt_1_1WFormWidget.html" title="An abstract widget that corresponds to an HTML form element.">WFormWidget</a> subclasses. </dd></dl>
<hr><h2>Constructor & Destructor Documentation</h2>
<a class="anchor" name="a40ae47e0987dc7e1f0261372ca43ca5"></a><!-- doxytag: member="Wt::WValidationStatus::WValidationStatus" ref="a40ae47e0987dc7e1f0261372ca43ca5" args="(WFormWidget *field, WWidget *validStateWidget=0, WWidget *invalidStateWidget=0, WWidget *invalidEmptyStateWidget=0, WContainerWidget *parent=0)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">Wt::WValidationStatus::WValidationStatus </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classWt_1_1WFormWidget.html">WFormWidget</a> * </td>
<td class="paramname"> <em>field</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classWt_1_1WWidget.html">WWidget</a> * </td>
<td class="paramname"> <em>validStateWidget</em> = <code>0</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classWt_1_1WWidget.html">WWidget</a> * </td>
<td class="paramname"> <em>invalidStateWidget</em> = <code>0</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classWt_1_1WWidget.html">WWidget</a> * </td>
<td class="paramname"> <em>invalidEmptyStateWidget</em> = <code>0</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classWt_1_1WContainerWidget.html">WContainerWidget</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>
Construct a <a class="el" href="classWt_1_1WValidationStatus.html" title="A widget that keeps track of the validation status of a form widget.">WValidationStatus</a> widget for another widget.
<p>
Constructs a validation status widget for the given field.<p>
The validation stateWidgets (if not <code>0</code>) will be managed by this widget, and shown and hidden to reflect the current validation state.
</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="463b399e7c6d20d7bed88d60290d1fd0"></a><!-- doxytag: member="Wt::WValidationStatus::validated" ref="463b399e7c6d20d7bed88d60290d1fd0" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classWt_1_1Signal.html">Signal</a><bool>& Wt::WValidationStatus::validated </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
<a class="el" href="classWt_1_1Signal.html" title="A signal that propagates events to listeners.">Signal</a> emitted when the validation state changed.
<p>
The new state of the validation (valid or invalid) is given as argument. This signal gets emitted when the state changes from <a class="el" href="classWt_1_1WValidator.html#638a1feefca259ea2f806a8add2d18a31bc2acb7589ab9e3050867ebfc32dda3" title="The input is valid.">WValidator::Valid</a> to <a class="el" href="classWt_1_1WValidator.html#638a1feefca259ea2f806a8add2d18a3a5bf750faac5f1ca6fb58c8de97bac51" title="The input is invalid.">WValidator::Invalid</a>, or from <a class="el" href="classWt_1_1WValidator.html#638a1feefca259ea2f806a8add2d18a3a5bf750faac5f1ca6fb58c8de97bac51" title="The input is invalid.">WValidator::Invalid</a> to <a class="el" href="classWt_1_1WValidator.html#638a1feefca259ea2f806a8add2d18a31bc2acb7589ab9e3050867ebfc32dda3" title="The input is valid.">WValidator::Valid</a>.
</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>
|