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 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Wt: Wt::WFormModel Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
</head>
<body>
<div id="top"><!-- do not remove this div! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">Wt
 <span id="projectnumber">3.2.1</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- Generated by Doxygen 1.7.5.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<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>
<li><a href="files.html"><span>Files</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class List</span></a></li>
<li><a href="inherits.html"><span>Class Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class Members</span></a></li>
</ul>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="namespaceWt.html">Wt</a> </li>
<li class="navelem"><a class="el" href="classWt_1_1WFormModel.html">WFormModel</a> </li>
</ul>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#pub-types">Public Types</a> |
<a href="#pub-methods">Public Member Functions</a> </div>
<div class="headertitle">
<div class="title">Wt::WFormModel Class Reference</div> </div>
</div>
<div class="contents">
<!-- doxytag: class="Wt::WFormModel" --><!-- doxytag: inherits="Wt::WObject" -->
<p>A basic model class for forms.
<a href="classWt_1_1WFormModel.html#details">More...</a></p>
<p><code>#include <Wt/WFormModel></code></p>
<div class="dynheader">
Inheritance diagram for Wt::WFormModel:</div>
<div class="dyncontent">
<div class="center"><img src="classWt_1_1WFormModel__inherit__graph.png" border="0" usemap="#Wt_1_1WFormModel_inherit__map" alt="Inheritance graph"/></div>
<map name="Wt_1_1WFormModel_inherit__map" id="Wt_1_1WFormModel_inherit__map">
<area shape="rect" href="classWt_1_1Auth_1_1FormBaseModel.html" title="A base model class for authentication-related forms." alt="" coords="83,155,259,181"/><area shape="rect" href="classWt_1_1WObject.html" title="A base class for objects that participate in the signal/slot system." alt="" coords="123,5,219,32"/><area shape="rect" href="classWt_1_1Auth_1_1AuthModel.html" title="Model for implementing an authentication view." alt="" coords="5,229,149,256"/><area shape="rect" href="classWt_1_1Auth_1_1RegistrationModel.html" title="Model for implementing a registration view." alt="" coords="173,229,357,256"/></map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<p><a href="classWt_1_1WFormModel-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WFormModel.html#a33c90b8c637bc83bbc57717175a5aa52">Field</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">A type to identify a field. <a href="#a33c90b8c637bc83bbc57717175a5aa52"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WFormModel.html#aaec37618fd6ecb1a5c7be0bad771010e">WFormModel</a> (<a class="el" href="classWt_1_1WObject.html">WObject</a> *parent=0)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Constructor. <a href="#aaec37618fd6ecb1a5c7be0bad771010e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WFormModel.html#a0d570781cb3aaa44a1bd09254dd54c9e">addField</a> (<a class="el" href="classWt_1_1WFormModel.html#a33c90b8c637bc83bbc57717175a5aa52">Field</a> field, const <a class="el" href="classWt_1_1WString.html">WString</a> &info=<a class="el" href="classWt_1_1WString.html#a511a12bce677dc733bd7b6b9415bff73">WString::Empty</a>)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Adds a field. <a href="#a0d570781cb3aaa44a1bd09254dd54c9e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WFormModel.html#abca319cc5a0ab159d55adba68882f424">removeField</a> (<a class="el" href="classWt_1_1WFormModel.html#a33c90b8c637bc83bbc57717175a5aa52">Field</a> field)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Removes a field. <a href="#abca319cc5a0ab159d55adba68882f424"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">std::vector< <a class="el" href="classWt_1_1WFormModel.html#a33c90b8c637bc83bbc57717175a5aa52">Field</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WFormModel.html#aa0291a84a835f1398b39fe8d1e8bd08c">fields</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the fields. <a href="#aa0291a84a835f1398b39fe8d1e8bd08c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WFormModel.html#a32f3c9ff0302d54462939b71029d2c54">reset</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Resets the model. <a href="#a32f3c9ff0302d54462939b71029d2c54"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WFormModel.html#ab616d3fc40e0f90f9221500f72421cd0">validate</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Validates the current input. <a href="#ab616d3fc40e0f90f9221500f72421cd0"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WFormModel.html#aee2cb70d6b2fa6fd449be8e2ddc3faff">valid</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the current overall validation state. <a href="#aee2cb70d6b2fa6fd449be8e2ddc3faff"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WFormModel.html#aa3bea05b625310f549eb6ec736a2701c">setVisible</a> (<a class="el" href="classWt_1_1WFormModel.html#a33c90b8c637bc83bbc57717175a5aa52">Field</a> field, bool readOnly)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Sets whether a field is visible. <a href="#aa3bea05b625310f549eb6ec736a2701c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WFormModel.html#ac15d7ceee410635121a6338ca6b9df93">isVisible</a> (<a class="el" href="classWt_1_1WFormModel.html#a33c90b8c637bc83bbc57717175a5aa52">Field</a> field) const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns whether a field is visible. <a href="#ac15d7ceee410635121a6338ca6b9df93"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WFormModel.html#adfa51b8bcebd7a75db93b8e1293114e7">setReadOnly</a> (<a class="el" href="classWt_1_1WFormModel.html#a33c90b8c637bc83bbc57717175a5aa52">Field</a> field, bool readOnly)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Sets whether a field is read-only. <a href="#adfa51b8bcebd7a75db93b8e1293114e7"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WFormModel.html#a47183becef5033bd62dbab9d563b17fd">isReadOnly</a> (<a class="el" href="classWt_1_1WFormModel.html#a33c90b8c637bc83bbc57717175a5aa52">Field</a> field) const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns whether a field is read only. <a href="#a47183becef5033bd62dbab9d563b17fd"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classWt_1_1WString.html">WString</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WFormModel.html#a09ff735f56210e510b64d90df1c13db5">label</a> (<a class="el" href="classWt_1_1WFormModel.html#a33c90b8c637bc83bbc57717175a5aa52">Field</a> field) const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns a field label. <a href="#a09ff735f56210e510b64d90df1c13db5"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WFormModel.html#a6b407653aa026154d158b21b0900ed12">setValue</a> (<a class="el" href="classWt_1_1WFormModel.html#a33c90b8c637bc83bbc57717175a5aa52">Field</a> field, const boost::any &value)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Sets the field value. <a href="#a6b407653aa026154d158b21b0900ed12"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual const boost::any & </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WFormModel.html#a1e1409ee3fa1b73bf67e04f574ee2fbb">value</a> (<a class="el" href="classWt_1_1WFormModel.html#a33c90b8c637bc83bbc57717175a5aa52">Field</a> field) const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the field value. <a href="#a1e1409ee3fa1b73bf67e04f574ee2fbb"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classWt_1_1WString.html">WString</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WFormModel.html#a9eb28b1edcf5950486df58640c462272">valueText</a> (<a class="el" href="classWt_1_1WFormModel.html#a33c90b8c637bc83bbc57717175a5aa52">Field</a> field) const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the field value text. <a href="#a9eb28b1edcf5950486df58640c462272"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WFormModel.html#a953379029989eb628f873e76480d2e61">setValidator</a> (<a class="el" href="classWt_1_1WFormModel.html#a33c90b8c637bc83bbc57717175a5aa52">Field</a> field, <a class="el" href="classWt_1_1WValidator.html">WValidator</a> *validator)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Sets a validator. <a href="#a953379029989eb628f873e76480d2e61"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WFormModel.html#aafc50707e6190e1f6b446cac3a187b98">validateField</a> (<a class="el" href="classWt_1_1WFormModel.html#a33c90b8c637bc83bbc57717175a5aa52">Field</a> field)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Validates a field. <a href="#aafc50707e6190e1f6b446cac3a187b98"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WFormModel.html#a11e027a120875249ab70428646abd0dc">setValidated</a> (<a class="el" href="classWt_1_1WFormModel.html#a33c90b8c637bc83bbc57717175a5aa52">Field</a> field, bool validated)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Sets whether a field has been validated. <a href="#a11e027a120875249ab70428646abd0dc"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WFormModel.html#af942d5a18c272d99ac6527f16d2cc73c">isValidated</a> (<a class="el" href="classWt_1_1WFormModel.html#a33c90b8c637bc83bbc57717175a5aa52">Field</a> field) const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns whether the field has been validated yet. <a href="#af942d5a18c272d99ac6527f16d2cc73c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classWt_1_1WValidator_1_1Result.html">WValidator::Result</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WFormModel.html#acbddd334ba49e87f4f052c1f83507cf0">validation</a> (<a class="el" href="classWt_1_1WFormModel.html#a33c90b8c637bc83bbc57717175a5aa52">Field</a> field) const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the result of a validation. <a href="#acbddd334ba49e87f4f052c1f83507cf0"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WFormModel.html#afe186acdad8065d9e9275efba68a7079">setValidation</a> (<a class="el" href="classWt_1_1WFormModel.html#a33c90b8c637bc83bbc57717175a5aa52">Field</a> field, const <a class="el" href="classWt_1_1WValidator_1_1Result.html">WValidator::Result</a> &result)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Sets the validation result for a field. <a href="#afe186acdad8065d9e9275efba68a7079"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>A basic model class for forms. </p>
<p>This implements field data and validation handling for (simple) form-based views. It provides a standard way for views to perform field validation, and react to validation results.</p>
<p>All fields are uniquely identified using a string literal (which is the Field type). For each field, its value, the visibility, whether the field is read-only, and its current validation status is managed by the model. In addition, you will typically specialize the class to customize the validation and application logic.</p>
<p>Although it can be setup to use <a class="el" href="classWt_1_1WValidator.html" title="A validator is used to validate user input according to pre-defined rules.">WValidator</a> objects for individual fields, also other validation where more entered information needs to be considered simultaneously can be implemented.</p>
<p>A model is typically used by a View which renders the fields configured in the model, updates the model values, invokes and reflects the validation status.</p>
<p>Example (a bit contrived since you will usually not use the model directly): </p>
<div class="fragment"><pre class="fragment"> <span class="keyword">const</span> <span class="keywordtype">char</span> *NameField = <span class="stringliteral">"name"</span>;
<span class="keyword">const</span> <span class="keywordtype">char</span> *TelField = <span class="stringliteral">"telephone"</span>;
<a class="code" href="classWt_1_1WFormModel.html" title="A basic model class for forms.">Wt::WFormModel</a> *model = <span class="keyword">new</span> <a class="code" href="classWt_1_1WFormModel.html#aaec37618fd6ecb1a5c7be0bad771010e" title="Constructor.">Wt::WFormModel</a>();
model-><a class="code" href="classWt_1_1WFormModel.html#a0d570781cb3aaa44a1bd09254dd54c9e" title="Adds a field.">addField</a>(NameField, <span class="stringliteral">"Enter your name"</span>);
model-><a class="code" href="classWt_1_1WFormModel.html#a0d570781cb3aaa44a1bd09254dd54c9e" title="Adds a field.">addField</a>(TelField, <span class="stringliteral">"Phone number"</span>);
model-><a class="code" href="classWt_1_1WFormModel.html#a6b407653aa026154d158b21b0900ed12" title="Sets the field value.">setValue</a>(NameField, <a class="code" href="classWt_1_1WString.html#a17afc7c43b5b7a710047be4a2c639575" title="Creates a WString from a UTF8 unicode encoded string.">Wt::WString::fromUTF8</a>(<span class="stringliteral">"John Doe"</span>));
<span class="keywordflow">if</span> (model-><a class="code" href="classWt_1_1WFormModel.html#ab616d3fc40e0f90f9221500f72421cd0" title="Validates the current input.">validate</a>()) {
...
} <span class="keywordflow">else</span> {
<span class="keyword">const</span> <a class="code" href="classWt_1_1WValidator_1_1Result.html" title="A class that holds a validation result.">Wt::WValidator::Result</a>& rname = model-><a class="code" href="classWt_1_1WFormModel.html#acbddd334ba49e87f4f052c1f83507cf0" title="Returns the result of a validation.">validation</a>(NameField);
<span class="keywordflow">if</span> (rname.<a class="code" href="classWt_1_1WValidator_1_1Result.html#a3855dc4649529ab42b602f516b4f9f0b" title="Returns the validation state.">state</a>() != <a class="code" href="classWt_1_1WValidator.html#a638a1feefca259ea2f806a8add2d18a3a1bc2acb7589ab9e3050867ebfc32dda3" title="The input is valid.">Wt::WValidator::Valid</a>) {
std::cerr <<< <span class="stringliteral">"Invalid name: "</span> << rname.<a class="code" href="classWt_1_1WValidator_1_1Result.html#ad5cb254eb68c5410b2e855bf906a406f" title="Returns the validation message.">message</a>();
}
...
}
</pre></div> </div><hr/><h2>Member Typedef Documentation</h2>
<a class="anchor" id="a33c90b8c637bc83bbc57717175a5aa52"></a><!-- doxytag: member="Wt::WFormModel::Field" ref="a33c90b8c637bc83bbc57717175a5aa52" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef const char* <a class="el" href="classWt_1_1WFormModel.html#a33c90b8c637bc83bbc57717175a5aa52">Wt::WFormModel::Field</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>A type to identify a field. </p>
<p>Fields are identified by a string literal constant. </p>
</div>
</div>
<hr/><h2>Constructor & Destructor Documentation</h2>
<a class="anchor" id="aaec37618fd6ecb1a5c7be0bad771010e"></a><!-- doxytag: member="Wt::WFormModel::WFormModel" ref="aaec37618fd6ecb1a5c7be0bad771010e" args="(WObject *parent=0)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">Wt::WFormModel::WFormModel </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>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Constructor. </p>
<p>Creates a new form model. </p>
</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a0d570781cb3aaa44a1bd09254dd54c9e"></a><!-- doxytag: member="Wt::WFormModel::addField" ref="a0d570781cb3aaa44a1bd09254dd54c9e" args="(Field field, const WString &info=WString::Empty)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Wt::WFormModel::addField </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classWt_1_1WFormModel.html#a33c90b8c637bc83bbc57717175a5aa52">Field</a> </td>
<td class="paramname"><em>field</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classWt_1_1WString.html">WString</a> & </td>
<td class="paramname"><em>info</em> = <code><a class="el" href="classWt_1_1WString.html#a511a12bce677dc733bd7b6b9415bff73">WString::Empty</a></code> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Adds a field. </p>
<p>The <code>field</code> is added to the model, with an optional short informational message that can be used by views to provide a hint on the value that needs to be entered. The message is set as the validation message as lo ng as the field has not yet been validated.</p>
<p>If the <code>field</code> was already in the model, its data is reset. </p>
</div>
</div>
<a class="anchor" id="aa0291a84a835f1398b39fe8d1e8bd08c"></a><!-- doxytag: member="Wt::WFormModel::fields" ref="aa0291a84a835f1398b39fe8d1e8bd08c" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">std::vector< <a class="el" href="classWt_1_1WFormModel.html#a33c90b8c637bc83bbc57717175a5aa52">WFormModel::Field</a> > Wt::WFormModel::fields </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns the fields. </p>
<p>This returns the fields currently configured in the model (added with <a class="el" href="classWt_1_1WFormModel.html#a0d570781cb3aaa44a1bd09254dd54c9e" title="Adds a field.">addField()</a> or for which a value or property has been set). </p>
</div>
</div>
<a class="anchor" id="a47183becef5033bd62dbab9d563b17fd"></a><!-- doxytag: member="Wt::WFormModel::isReadOnly" ref="a47183becef5033bd62dbab9d563b17fd" args="(Field field) const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool Wt::WFormModel::isReadOnly </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classWt_1_1WFormModel.html#a33c90b8c637bc83bbc57717175a5aa52">Field</a> </td>
<td class="paramname"><em>field</em></td><td>)</td>
<td> const<code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns whether a field is read only. </p>
<p>The default implementation returns the value set by <a class="el" href="classWt_1_1WFormModel.html#adfa51b8bcebd7a75db93b8e1293114e7" title="Sets whether a field is read-only.">setReadOnly()</a> </p>
<p>Reimplemented in <a class="el" href="classWt_1_1Auth_1_1RegistrationModel.html#a86081bb7ff348df69bac0400678c05bb">Wt::Auth::RegistrationModel</a>.</p>
</div>
</div>
<a class="anchor" id="af942d5a18c272d99ac6527f16d2cc73c"></a><!-- doxytag: member="Wt::WFormModel::isValidated" ref="af942d5a18c272d99ac6527f16d2cc73c" args="(Field field) const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool Wt::WFormModel::isValidated </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classWt_1_1WFormModel.html#a33c90b8c637bc83bbc57717175a5aa52">Field</a> </td>
<td class="paramname"><em>field</em></td><td>)</td>
<td> const<code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns whether the field has been validated yet. </p>
<p>This is initially <code>false</code>, and set to <code>true</code> by <a class="el" href="classWt_1_1WFormModel.html#afe186acdad8065d9e9275efba68a7079" title="Sets the validation result for a field.">setValidation()</a>.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WFormModel.html#a11e027a120875249ab70428646abd0dc" title="Sets whether a field has been validated.">setValidated()</a> </dd></dl>
</div>
</div>
<a class="anchor" id="ac15d7ceee410635121a6338ca6b9df93"></a><!-- doxytag: member="Wt::WFormModel::isVisible" ref="ac15d7ceee410635121a6338ca6b9df93" args="(Field field) const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool Wt::WFormModel::isVisible </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classWt_1_1WFormModel.html#a33c90b8c637bc83bbc57717175a5aa52">Field</a> </td>
<td class="paramname"><em>field</em></td><td>)</td>
<td> const<code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns whether a field is visible. </p>
<p>In some cases not all fields of the model need to be shown. This may depend on values input for certain fields, and thus change dynamically. You may specialize this method to indicate that a certain field should be invisible.</p>
<p>The default implementation returns the value set by <a class="el" href="classWt_1_1WFormModel.html#aa3bea05b625310f549eb6ec736a2701c" title="Sets whether a field is visible.">setVisible()</a>. </p>
<p>Reimplemented in <a class="el" href="classWt_1_1Auth_1_1RegistrationModel.html#aaa45fc350dbc09cfef003fa9e00bdba1">Wt::Auth::RegistrationModel</a>, and <a class="el" href="classWt_1_1Auth_1_1AuthModel.html#af494bb2eb10b3b42f17490da5c3a8f9d">Wt::Auth::AuthModel</a>.</p>
</div>
</div>
<a class="anchor" id="a09ff735f56210e510b64d90df1c13db5"></a><!-- doxytag: member="Wt::WFormModel::label" ref="a09ff735f56210e510b64d90df1c13db5" args="(Field field) const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classWt_1_1WString.html">WString</a> Wt::WFormModel::label </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classWt_1_1WFormModel.html#a33c90b8c637bc83bbc57717175a5aa52">Field</a> </td>
<td class="paramname"><em>field</em></td><td>)</td>
<td> const<code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns a field label. </p>
<p>The default implementation returns the WString::tr(field) </p>
<p>Reimplemented in <a class="el" href="classWt_1_1Auth_1_1FormBaseModel.html#a8bd5862221e0fa8f84ceba4b8a440a09">Wt::Auth::FormBaseModel</a>.</p>
</div>
</div>
<a class="anchor" id="abca319cc5a0ab159d55adba68882f424"></a><!-- doxytag: member="Wt::WFormModel::removeField" ref="abca319cc5a0ab159d55adba68882f424" args="(Field field)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Wt::WFormModel::removeField </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classWt_1_1WFormModel.html#a33c90b8c637bc83bbc57717175a5aa52">Field</a> </td>
<td class="paramname"><em>field</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Removes a field. </p>
<p>The <code>field</code> is removed from the model. </p>
</div>
</div>
<a class="anchor" id="a32f3c9ff0302d54462939b71029d2c54"></a><!-- doxytag: member="Wt::WFormModel::reset" ref="a32f3c9ff0302d54462939b71029d2c54" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Wt::WFormModel::reset </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td><code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Resets the model. </p>
<p>The default implementation clears the value of all fields, and resets the validation state to not validated. </p>
<p>Reimplemented in <a class="el" href="classWt_1_1Auth_1_1RegistrationModel.html#a451385f9d3f2ade3b90c71696f0cef19">Wt::Auth::RegistrationModel</a>, and <a class="el" href="classWt_1_1Auth_1_1AuthModel.html#a043fc4539b1101eb7b27e98c286e6052">Wt::Auth::AuthModel</a>.</p>
</div>
</div>
<a class="anchor" id="adfa51b8bcebd7a75db93b8e1293114e7"></a><!-- doxytag: member="Wt::WFormModel::setReadOnly" ref="adfa51b8bcebd7a75db93b8e1293114e7" args="(Field field, bool readOnly)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Wt::WFormModel::setReadOnly </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classWt_1_1WFormModel.html#a33c90b8c637bc83bbc57717175a5aa52">Field</a> </td>
<td class="paramname"><em>field</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool </td>
<td class="paramname"><em>readOnly</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Sets whether a field is read-only. </p>
<p>Fields are read-write by default.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WFormModel.html#a47183becef5033bd62dbab9d563b17fd" title="Returns whether a field is read only.">isReadOnly()</a> </dd></dl>
</div>
</div>
<a class="anchor" id="a11e027a120875249ab70428646abd0dc"></a><!-- doxytag: member="Wt::WFormModel::setValidated" ref="a11e027a120875249ab70428646abd0dc" args="(Field field, bool validated)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Wt::WFormModel::setValidated </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classWt_1_1WFormModel.html#a33c90b8c637bc83bbc57717175a5aa52">Field</a> </td>
<td class="paramname"><em>field</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool </td>
<td class="paramname"><em>validated</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td><code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Sets whether a field has been validated. </p>
<p>This is usually not used directly, but invoked by <a class="el" href="classWt_1_1WFormModel.html#afe186acdad8065d9e9275efba68a7079" title="Sets the validation result for a field.">setValidation()</a></p>
<p>A field is initially (or after <a class="el" href="classWt_1_1WFormModel.html#a32f3c9ff0302d54462939b71029d2c54" title="Resets the model.">reset()</a>), not validated. </p>
</div>
</div>
<a class="anchor" id="afe186acdad8065d9e9275efba68a7079"></a><!-- doxytag: member="Wt::WFormModel::setValidation" ref="afe186acdad8065d9e9275efba68a7079" args="(Field field, const WValidator::Result &result)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Wt::WFormModel::setValidation </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classWt_1_1WFormModel.html#a33c90b8c637bc83bbc57717175a5aa52">Field</a> </td>
<td class="paramname"><em>field</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classWt_1_1WValidator_1_1Result.html">WValidator::Result</a> & </td>
<td class="paramname"><em>result</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td><code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Sets the validation result for a field. </p>
<p>This will also set the field as validated.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WFormModel.html#acbddd334ba49e87f4f052c1f83507cf0" title="Returns the result of a validation.">validation()</a>, <a class="el" href="classWt_1_1WFormModel.html#af942d5a18c272d99ac6527f16d2cc73c" title="Returns whether the field has been validated yet.">isValidated()</a> </dd></dl>
</div>
</div>
<a class="anchor" id="a953379029989eb628f873e76480d2e61"></a><!-- doxytag: member="Wt::WFormModel::setValidator" ref="a953379029989eb628f873e76480d2e61" args="(Field field, WValidator *validator)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Wt::WFormModel::setValidator </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classWt_1_1WFormModel.html#a33c90b8c637bc83bbc57717175a5aa52">Field</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_1WValidator.html">WValidator</a> * </td>
<td class="paramname"><em>validator</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td><code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Sets a validator. </p>
<p>If the validator has no ownership yet, the form model will take ownership. </p>
</div>
</div>
<a class="anchor" id="a6b407653aa026154d158b21b0900ed12"></a><!-- doxytag: member="Wt::WFormModel::setValue" ref="a6b407653aa026154d158b21b0900ed12" args="(Field field, const boost::any &value)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Wt::WFormModel::setValue </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classWt_1_1WFormModel.html#a33c90b8c637bc83bbc57717175a5aa52">Field</a> </td>
<td class="paramname"><em>field</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const boost::any & </td>
<td class="paramname"><em>value</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td><code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Sets the field value. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WFormModel.html#a1e1409ee3fa1b73bf67e04f574ee2fbb" title="Returns the field value.">value()</a>, <a class="el" href="classWt_1_1WFormModel.html#a9eb28b1edcf5950486df58640c462272" title="Returns the field value text.">valueText()</a> </dd></dl>
</div>
</div>
<a class="anchor" id="aa3bea05b625310f549eb6ec736a2701c"></a><!-- doxytag: member="Wt::WFormModel::setVisible" ref="aa3bea05b625310f549eb6ec736a2701c" args="(Field field, bool readOnly)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Wt::WFormModel::setVisible </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classWt_1_1WFormModel.html#a33c90b8c637bc83bbc57717175a5aa52">Field</a> </td>
<td class="paramname"><em>field</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool </td>
<td class="paramname"><em>readOnly</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Sets whether a field is visible. </p>
<p>Fields are visible by default.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WFormModel.html#ac15d7ceee410635121a6338ca6b9df93" title="Returns whether a field is visible.">isVisible()</a> </dd></dl>
</div>
</div>
<a class="anchor" id="aee2cb70d6b2fa6fd449be8e2ddc3faff"></a><!-- doxytag: member="Wt::WFormModel::valid" ref="aee2cb70d6b2fa6fd449be8e2ddc3faff" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool Wt::WFormModel::valid </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns the current overall validation state. </p>
<p>This checks the <a class="el" href="classWt_1_1WFormModel.html#acbddd334ba49e87f4f052c1f83507cf0" title="Returns the result of a validation.">validation()</a> of all fields, and returns <code>true</code> if all all fields have been validated and are valid.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WFormModel.html#ab616d3fc40e0f90f9221500f72421cd0" title="Validates the current input.">validate()</a> </dd></dl>
</div>
</div>
<a class="anchor" id="ab616d3fc40e0f90f9221500f72421cd0"></a><!-- doxytag: member="Wt::WFormModel::validate" ref="ab616d3fc40e0f90f9221500f72421cd0" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool Wt::WFormModel::validate </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td><code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Validates the current input. </p>
<p>The default implementation calls <a class="el" href="classWt_1_1WFormModel.html#aafc50707e6190e1f6b446cac3a187b98" title="Validates a field.">validateField()</a> for each field and returns <code>true</code> if all fields validated.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WFormModel.html#aafc50707e6190e1f6b446cac3a187b98" title="Validates a field.">validateField()</a> </dd></dl>
<p>Reimplemented in <a class="el" href="classWt_1_1Auth_1_1AuthModel.html#a3afaf0525196b5ab7bbec1e0018290db">Wt::Auth::AuthModel</a>.</p>
</div>
</div>
<a class="anchor" id="aafc50707e6190e1f6b446cac3a187b98"></a><!-- doxytag: member="Wt::WFormModel::validateField" ref="aafc50707e6190e1f6b446cac3a187b98" args="(Field field)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool Wt::WFormModel::validateField </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classWt_1_1WFormModel.html#a33c90b8c637bc83bbc57717175a5aa52">Field</a> </td>
<td class="paramname"><em>field</em></td><td>)</td>
<td><code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Validates a field. </p>
<p>The default implementation uses the validator configured for the field to validate the field contents, or if no validator has been configured assumes that the field is valid.</p>
<p>You will typically customize this method for more complex validation cases.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WFormModel.html#ab616d3fc40e0f90f9221500f72421cd0" title="Validates the current input.">validate()</a>, validationResult() </dd></dl>
<p>Reimplemented in <a class="el" href="classWt_1_1Auth_1_1RegistrationModel.html#ab2eb27092037d2bf2119093aacfb2a1d">Wt::Auth::RegistrationModel</a>, and <a class="el" href="classWt_1_1Auth_1_1AuthModel.html#a26902bf5e5b8eee16a255c936b9d3915">Wt::Auth::AuthModel</a>.</p>
</div>
</div>
<a class="anchor" id="acbddd334ba49e87f4f052c1f83507cf0"></a><!-- doxytag: member="Wt::WFormModel::validation" ref="acbddd334ba49e87f4f052c1f83507cf0" args="(Field field) const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const <a class="el" href="classWt_1_1WValidator_1_1Result.html">WValidator::Result</a> & Wt::WFormModel::validation </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classWt_1_1WFormModel.html#a33c90b8c637bc83bbc57717175a5aa52">Field</a> </td>
<td class="paramname"><em>field</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns the result of a validation. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WFormModel.html#aafc50707e6190e1f6b446cac3a187b98" title="Validates a field.">validateField()</a> </dd></dl>
</div>
</div>
<a class="anchor" id="a1e1409ee3fa1b73bf67e04f574ee2fbb"></a><!-- doxytag: member="Wt::WFormModel::value" ref="a1e1409ee3fa1b73bf67e04f574ee2fbb" args="(Field field) const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const boost::any & Wt::WFormModel::value </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classWt_1_1WFormModel.html#a33c90b8c637bc83bbc57717175a5aa52">Field</a> </td>
<td class="paramname"><em>field</em></td><td>)</td>
<td> const<code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns the field value. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WFormModel.html#a9eb28b1edcf5950486df58640c462272" title="Returns the field value text.">valueText()</a>, <a class="el" href="classWt_1_1WFormModel.html#a6b407653aa026154d158b21b0900ed12" title="Sets the field value.">setValue()</a> </dd></dl>
</div>
</div>
<a class="anchor" id="a9eb28b1edcf5950486df58640c462272"></a><!-- doxytag: member="Wt::WFormModel::valueText" ref="a9eb28b1edcf5950486df58640c462272" args="(Field field) const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classWt_1_1WString.html">WString</a> Wt::WFormModel::valueText </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classWt_1_1WFormModel.html#a33c90b8c637bc83bbc57717175a5aa52">Field</a> </td>
<td class="paramname"><em>field</em></td><td>)</td>
<td> const<code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns the field value text. </p>
<p>This uses <a class="el" href="group__modelview.html#ga57b5cadd177847f51eaeb0cee23782c1" title="Interprets a boost::any as a string value.">Wt::asString()</a> to interpret the current value as text.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WFormModel.html#a1e1409ee3fa1b73bf67e04f574ee2fbb" title="Returns the field value.">value()</a> </dd></dl>
</div>
</div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Enumerator</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<hr size="1"><address style="text-align: right; margin: 3px"><small>
Generated on Fri Mar 30 2012 for <a href="http://www.webtoolkit.eu/wt">the
C++ Web Toolkit (Wt)</a> by <a
href="http://www.doxygen.org/index.html"><img src="doxygen.png"
alt="doxygen" border="0" style="vertical-align: middle; display:
inline-block; height: 2em"></a> 1.7.5.1</small></address>
</body>
</html>
|