<!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::Auth::RegistrationWidget 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.3</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="namespaceWt_1_1Auth.html">Auth</a> </li> <li class="navelem"><a class="el" href="classWt_1_1Auth_1_1RegistrationWidget.html">RegistrationWidget</a> </li> </ul> </div> </div> <div class="header"> <div class="summary"> <a href="#pub-methods">Public Member Functions</a> | <a href="#pro-methods">Protected Member Functions</a> </div> <div class="headertitle"> <div class="title">Wt::Auth::RegistrationWidget Class Reference<div class="ingroups"><a class="el" href="group__auth.html">Authentication module (Wt::Auth)</a></div></div> </div> </div> <div class="contents"> <!-- doxytag: class="Wt::Auth::RegistrationWidget" --><!-- doxytag: inherits="Wt::WTemplateFormView" --> <p>A registration widget. <a href="classWt_1_1Auth_1_1RegistrationWidget.html#details">More...</a></p> <p><code>#include <Wt/Auth/RegistrationWidget></code></p> <div class="dynheader"> Inheritance diagram for Wt::Auth::RegistrationWidget:</div> <div class="dyncontent"> <div class="center"><img src="classWt_1_1Auth_1_1RegistrationWidget__inherit__graph.png" border="0" usemap="#Wt_1_1Auth_1_1RegistrationWidget_inherit__map" alt="Inheritance graph"/></div> <map name="Wt_1_1Auth_1_1RegistrationWidget_inherit__map" id="Wt_1_1Auth_1_1RegistrationWidget_inherit__map"> <area shape="rect" href="classWt_1_1WTemplateFormView.html" title="A template-based View class form form models." alt="" coords="17,379,185,405"/><area shape="rect" href="classWt_1_1WTemplate.html" title="A widget that renders an XHTML template." alt="" coords="45,304,157,331"/><area shape="rect" href="classWt_1_1WInteractWidget.html" title="An abstract widget that can receive user-interface interaction." alt="" coords="29,229,173,256"/><area shape="rect" href="classWt_1_1WWebWidget.html" title="A base class for widgets with an HTML counterpart." alt="" coords="37,155,165,181"/><area shape="rect" href="classWt_1_1WWidget.html" title="The abstract base class for a user-interface component." alt="" coords="52,80,151,107"/><area shape="rect" href="classWt_1_1WObject.html" title="A base class for objects that participate in the signal/slot system." alt="" coords="53,5,149,32"/></map> <center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div> <p><a href="classWt_1_1Auth_1_1RegistrationWidget-members.html">List of all members.</a></p> <table class="memberdecls"> <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_1Auth_1_1RegistrationWidget.html#a47a16bc4d44b0b52da8a6f7558b1a3f7">RegistrationWidget</a> (<a class="el" href="classWt_1_1Auth_1_1AuthWidget.html">AuthWidget</a> *authWidget=0)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Constructor. <a href="#a47a16bc4d44b0b52da8a6f7558b1a3f7"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a86bf94d2f72da5dc57b9b6cc1c61c542"></a><!-- doxytag: member="Wt::Auth::RegistrationWidget::setModel" ref="a86bf94d2f72da5dc57b9b6cc1c61c542" args="(RegistrationModel *model)" --> void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Auth_1_1RegistrationWidget.html#a86bf94d2f72da5dc57b9b6cc1c61c542">setModel</a> (<a class="el" href="classWt_1_1Auth_1_1RegistrationModel.html">RegistrationModel</a> *model)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Sets the registration model. <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classWt_1_1Auth_1_1RegistrationModel.html">RegistrationModel</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Auth_1_1RegistrationWidget.html#a6c816c872731aaf3473dbeca95798fa9">model</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the registration model. <a href="#a6c816c872731aaf3473dbeca95798fa9"></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_1Auth_1_1RegistrationWidget.html#a3b822bbbe027f3f4ab2c6106f3c66761">update</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Updates the user-interface. <a href="#a3b822bbbe027f3f4ab2c6106f3c66761"></a><br/></td></tr> <tr><td colspan="2"><h2><a name="pro-methods"></a> Protected Member Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Auth_1_1RegistrationWidget.html#a4a76e5f1fd9721edd503a2d33c9c7371">validate</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Validates the current information. <a href="#a4a76e5f1fd9721edd503a2d33c9c7371"></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_1Auth_1_1RegistrationWidget.html#ae04b18aeb42b46c80a182427d19f15f0">doRegister</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Performs the registration. <a href="#ae04b18aeb42b46c80a182427d19f15f0"></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_1Auth_1_1RegistrationWidget.html#a1d80e249b928ce2007b80e3ccfc2513c">close</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Closes the registration widget. <a href="#a1d80e249b928ce2007b80e3ccfc2513c"></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_1Auth_1_1RegistrationWidget.html#a867f317e75a8b14c002333f33717a6fe">registerUserDetails</a> (<a class="el" href="classWt_1_1Auth_1_1User.html">User</a> &user)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Registers more user information. <a href="#a867f317e75a8b14c002333f33717a6fe"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classWt_1_1WFormWidget.html">WFormWidget</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Auth_1_1RegistrationWidget.html#a19bfa5f81dfc00843053852743238ba5">createFormWidget</a> (<a class="el" href="classWt_1_1WFormModel.html#a33c90b8c637bc83bbc57717175a5aa52">RegistrationModel::Field</a> field)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Creates a form widget. <a href="#a19bfa5f81dfc00843053852743238ba5"></a><br/></td></tr> </table> <hr/><a name="details" id="details"></a><h2>Detailed Description</h2> <div class="textblock"><p>A registration widget. </p> <p>This implements a widget which allows a new user to register. The widget renders the <code>"Wt.Auth.template.registration"</code> template. and uses a <a class="el" href="classWt_1_1Auth_1_1RegistrationModel.html" title="Model for implementing a registration view.">RegistrationModel</a> for the actual registration logic.</p> <p>Typically, you may want to specialize this widget to ask for other information. </p> </div><hr/><h2>Constructor & Destructor Documentation</h2> <a class="anchor" id="a47a16bc4d44b0b52da8a6f7558b1a3f7"></a><!-- doxytag: member="Wt::Auth::RegistrationWidget::RegistrationWidget" ref="a47a16bc4d44b0b52da8a6f7558b1a3f7" args="(AuthWidget *authWidget=0)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">Wt::Auth::RegistrationWidget::RegistrationWidget </td> <td>(</td> <td class="paramtype"><a class="el" href="classWt_1_1Auth_1_1AuthWidget.html">AuthWidget</a> * </td> <td class="paramname"><em>authWidget</em> = <code>0</code></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Constructor. </p> <p>Creates a new authentication. </p> </div> </div> <hr/><h2>Member Function Documentation</h2> <a class="anchor" id="a1d80e249b928ce2007b80e3ccfc2513c"></a><!-- doxytag: member="Wt::Auth::RegistrationWidget::close" ref="a1d80e249b928ce2007b80e3ccfc2513c" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Wt::Auth::RegistrationWidget::close </td> <td>(</td> <td class="paramname"></td><td>)</td> <td><code> [protected, virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Closes the registration widget. </p> <p>The default implementation simply deletes the widget. </p> </div> </div> <a class="anchor" id="a19bfa5f81dfc00843053852743238ba5"></a><!-- doxytag: member="Wt::Auth::RegistrationWidget::createFormWidget" ref="a19bfa5f81dfc00843053852743238ba5" args="(RegistrationModel::Field field)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classWt_1_1WFormWidget.html">WFormWidget</a> * Wt::Auth::RegistrationWidget::createFormWidget </td> <td>(</td> <td class="paramtype"><a class="el" href="classWt_1_1WFormModel.html#a33c90b8c637bc83bbc57717175a5aa52">RegistrationModel::Field</a> </td> <td class="paramname"><em>field</em></td><td>)</td> <td><code> [protected, virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Creates a form widget. </p> <p>This method is called by <a class="el" href="classWt_1_1WTemplateFormView.html#abc0709f1ef21e4ed4c182a103d1a1885" title="Creates or updates a field in the View.">updateViewField()</a> when it needs to create a form widget for a field. You either need to make sure these widgets have been created and bound before calling <a class="el" href="classWt_1_1WTemplateFormView.html#a07d05005f74f317938b7f8546f1d377a" title="Updates the View.">updateView()</a>, or you need to specialize this method to do it on-demand. </p> <p>Reimplemented from <a class="el" href="classWt_1_1WTemplateFormView.html#a561f9d5afe770bf3296ab41177edb652">Wt::WTemplateFormView</a>.</p> </div> </div> <a class="anchor" id="ae04b18aeb42b46c80a182427d19f15f0"></a><!-- doxytag: member="Wt::Auth::RegistrationWidget::doRegister" ref="ae04b18aeb42b46c80a182427d19f15f0" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Wt::Auth::RegistrationWidget::doRegister </td> <td>(</td> <td class="paramname"></td><td>)</td> <td><code> [protected, virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Performs the registration. </p> <p>The default implementation checks if the information is valid with <a class="el" href="classWt_1_1Auth_1_1RegistrationWidget.html#a4a76e5f1fd9721edd503a2d33c9c7371" title="Validates the current information.">validate()</a>, and then calls <a class="el" href="classWt_1_1Auth_1_1RegistrationModel.html#a2b6ad0412e0e259c1700e3759028e87e" title="Performs the registration process.">RegistrationModel::doRegister()</a>. If registration was successful, it calls <a class="el" href="classWt_1_1Auth_1_1RegistrationWidget.html#a867f317e75a8b14c002333f33717a6fe" title="Registers more user information.">registerUserDetails()</a> and subsequently logs the user in. </p> </div> </div> <a class="anchor" id="a6c816c872731aaf3473dbeca95798fa9"></a><!-- doxytag: member="Wt::Auth::RegistrationWidget::model" ref="a6c816c872731aaf3473dbeca95798fa9" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classWt_1_1Auth_1_1RegistrationModel.html">RegistrationModel</a>* Wt::Auth::RegistrationWidget::model </td> <td>(</td> <td class="paramname"></td><td>)</td> <td> const</td> </tr> </table> </div> <div class="memdoc"> <p>Returns the registration model. </p> <p>This returns the model that is used by the widget to do the actual registration. </p> </div> </div> <a class="anchor" id="a867f317e75a8b14c002333f33717a6fe"></a><!-- doxytag: member="Wt::Auth::RegistrationWidget::registerUserDetails" ref="a867f317e75a8b14c002333f33717a6fe" args="(User &user)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Wt::Auth::RegistrationWidget::registerUserDetails </td> <td>(</td> <td class="paramtype"><a class="el" href="classWt_1_1Auth_1_1User.html">User</a> & </td> <td class="paramname"><em>user</em></td><td>)</td> <td><code> [protected, virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Registers more user information. </p> <p>This method is called when a new user has been successfully registered.</p> <p>You may want to reimplement this method if you've added other information to the registration form which needs to be annotated to the user. </p> </div> </div> <a class="anchor" id="a3b822bbbe027f3f4ab2c6106f3c66761"></a><!-- doxytag: member="Wt::Auth::RegistrationWidget::update" ref="a3b822bbbe027f3f4ab2c6106f3c66761" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Wt::Auth::RegistrationWidget::update </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Updates the user-interface. </p> <p>This updates the user-interface to reflect the current state of the model. </p> </div> </div> <a class="anchor" id="a4a76e5f1fd9721edd503a2d33c9c7371"></a><!-- doxytag: member="Wt::Auth::RegistrationWidget::validate" ref="a4a76e5f1fd9721edd503a2d33c9c7371" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool Wt::Auth::RegistrationWidget::validate </td> <td>(</td> <td class="paramname"></td><td>)</td> <td><code> [protected, virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Validates the current information. </p> <p>The default implementation simply calls <a class="el" href="classWt_1_1WFormModel.html#ab616d3fc40e0f90f9221500f72421cd0" title="Validates the current input.">RegistrationModel::validate()</a> on the model.</p> <p>You may want to reimplement this method if you've added other information to the registration form that need validation. </p> </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 Thu Nov 1 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>