Class RegistrationWidget
This implements a widget which allows a new user to register. The widget renders the
"Wt.Auth.template.registration"
template. and uses a RegistrationModel
for the actual registration logic.
Typically, you may want to specialize this widget to ask for other information.
-
Nested Class Summary
Nested classes/interfaces inherited from class eu.webtoolkit.jwt.WTemplate
WTemplate.Function, WTemplate.Functions
Nested classes/interfaces inherited from class eu.webtoolkit.jwt.WObject
WObject.FormData
-
Field Summary
Fields inherited from class eu.webtoolkit.jwt.WInteractWidget
dragTouchEndSlot_, dragTouchSlot_
-
Constructor Summary
ConstructorDescriptionConstructor.RegistrationWidget
(AuthWidget authWidget) Constructor.RegistrationWidget
(AuthWidget authWidget, WContainerWidget parentContainer) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
close()
Closes the registration widget.protected WWidget
createFormWidget
(String field) Creates a form widget.protected void
Performs the registration.getModel()
Returns the registration model.protected void
registerUserDetails
(User user) Registers more user information.void
remove()
Destructor.protected void
render
(EnumSet<RenderFlag> flags) Renders the widget.void
setModel
(RegistrationModel model) Sets the registration model.void
update()
Updates the user-interface.protected boolean
validate()
Validates the current information.Methods inherited from class eu.webtoolkit.jwt.WTemplateFormView
indicateValidation, setFormWidget, setFormWidget, updateModel, updateModelField, updateModelValue, updateModelValue, updateView, updateViewField, updateViewValue, updateViewValue
Methods inherited from class eu.webtoolkit.jwt.WTemplate
addFunction, applyArguments, bindEmpty, bindInt, bindString, bindString, bindWidget, clear, conditionValue, enableAjax, format, format, format, format, getConditionsSet, getErrorText, getTemplateText, getWidgetIdMode, getWidgets, handleUnresolvedVariable, hasInternalPathEncoding, isEncodeTemplateText, iterateChildren, refresh, removeWidget, removeWidget, renderTemplate, renderTemplateText, reset, resolveFunction, resolveString, resolveStringValue, resolveWidget, setCondition, setEncodeTemplateText, setInternalPathEncoding, setTemplateText, setTemplateText, setWidgetIdMode, varName
Methods inherited from class eu.webtoolkit.jwt.WInteractWidget
clicked, doubleClicked, enterPressed, escapePressed, gestureChanged, gestureEnded, gestureStarted, getMouseOverDelay, isEnabled, keyPressed, keyWentDown, keyWentUp, load, mouseDragged, mouseMoved, mouseWentDown, mouseWentOut, mouseWentOver, mouseWentUp, mouseWheel, propagateSetEnabled, setDraggable, setDraggable, setDraggable, setDraggable, setMouseOverDelay, setPopup, touchEnded, touchMoved, touchStarted, unsetDraggable
Methods inherited from class eu.webtoolkit.jwt.WWebWidget
addStyleClass, beingDeleted, blurred, callJavaScriptMember, childrenChanged, createDomElement, doJavaScript, escapeText, escapeText, escapeText, escapeText, find, findById, focussed, getAttributeValue, getBaseZIndex, getChildren, getClearSides, getDecorationStyle, getDomChanges, getFloatSide, getHeight, getHtmlTagName, getId, getJavaScriptMember, getLineHeight, getMargin, getMaximumHeight, getMaximumWidth, getMinimumHeight, getMinimumWidth, getOffset, getPositionScheme, getScrollVisibilityMargin, getStyleClass, getTabIndex, getToolTip, getVerticalAlignment, getVerticalAlignmentLength, getWidth, hasFocus, hasStyleClass, isCanReceiveFocus, isDisabled, isHidden, isHiddenKeepsGeometry, isInline, isLoaded, isPopup, isRendered, isScrollVisibilityEnabled, isScrollVisible, isSetFirstFocus, isThemeStyleEnabled, isVisible, jsStringLiteral, jsStringLiteral, manageWidget, parentResized, parentResized, propagateSetVisible, removeScript, removeStyleClass, resize, scrollVisibilityChanged, setAttributeValue, setBaseZIndex, setCanReceiveFocus, setClearSides, setDecorationStyle, setDeferredToolTip, setDisabled, setFlexBox, setFloatSide, setFocus, setHidden, setHiddenKeepsGeometry, setHtmlTagName, setId, setInline, setJavaScriptMember, setLineHeight, setLoadLaterWhenInvisible, setMargin, setMaximumSize, setMinimumSize, setObjectName, setOffsets, setParentWidget, setPositionScheme, setScrollVisibilityEnabled, setScrollVisibilityMargin, setSelectable, setStyleClass, setTabIndex, setThemeStyleEnabled, setToolTip, setVerticalAlignment, unescapeText, updateSignalConnection, voidEventSignal, widgetAdded, widgetRemoved
Methods inherited from class eu.webtoolkit.jwt.WWidget
acceptDrops, acceptDrops, addCssRule, addCssRule, addJSignal, addStyleClass, animateHide, animateShow, boxBorder, boxPadding, createJavaScript, disable, dropEvent, enable, getDropTouch, getJsRef, getParent, hide, htmlText, isExposed, isGlobalWidget, isLayoutSizeAware, layoutSizeChanged, needsRerender, positionAt, positionAt, removeFromParent, removeStyleClass, render, resize, scheduleRender, scheduleRender, scheduleRender, setClearSides, setDeferredToolTip, setFocus, setHeight, setHidden, setLayoutSizeAware, setMargin, setMargin, setMargin, setMargin, setMargin, setOffsets, setOffsets, setOffsets, setOffsets, setOffsets, setToolTip, setVerticalAlignment, setWidth, show, stopAcceptDrops, toggleStyleClass, toggleStyleClass, tr
Methods inherited from class eu.webtoolkit.jwt.WObject
getObjectName, setFormData
-
Constructor Details
-
RegistrationWidget
Constructor.Creates a new authentication.
-
RegistrationWidget
public RegistrationWidget()Constructor. -
RegistrationWidget
Constructor.
-
-
Method Details
-
remove
public void remove()Description copied from class:WWidget
Destructor.Deletes a widget and all contained contents.
-
setModel
Sets the registration model. -
getModel
Returns the registration model.This returns the model that is used by the widget to do the actual registration.
-
update
public void update()Updates the user-interface.This updates the user-interface to reflect the current state of the model.
-
validate
protected boolean validate()Validates the current information.The default implementation simply calls
WFormModel.validate()
on the model.You may want to reimplement this method if you've added other information to the registration form that need validation.
-
doRegister
protected void doRegister()Performs the registration.The default implementation checks if the information is valid with
validate()
, and then callsRegistrationModel.doRegister()
. If registration was successful, it callsregisterUserDetails()
and subsequently logs the user in. -
close
protected void close()Closes the registration widget.The default implementation simply deletes the widget.
-
registerUserDetails
Registers more user information.This method is called when a new user has been successfully registered.
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.
-
render
Description copied from class:WWidget
Renders the widget.This function renders the widget (or an update for the widget), after this has been scheduled using
scheduleRender()
.The default implementation will render the widget by serializing changes to JavaScript and HTML. You may want to reimplement this widget if you have been postponing some of the layout / rendering implementation until the latest moment possible. In that case you should make sure you call the base implementation however.
- Overrides:
render
in classWWebWidget
-
createFormWidget
Description copied from class:WTemplateFormView
Creates a form widget.This method is called by
updateViewField()
when it needs to create a form widget for a field, and none was specified usingsetFormWidget()
.- Overrides:
createFormWidget
in classWTemplateFormView
-