Class RegistrationWidget
- java.lang.Object
-
- eu.webtoolkit.jwt.WObject
-
- eu.webtoolkit.jwt.WWidget
-
- eu.webtoolkit.jwt.WWebWidget
-
- eu.webtoolkit.jwt.WInteractWidget
-
- eu.webtoolkit.jwt.WTemplate
-
- eu.webtoolkit.jwt.WTemplateFormView
-
- eu.webtoolkit.jwt.auth.RegistrationWidget
-
public class RegistrationWidget extends WTemplateFormView
A registration widget.This implements a widget which allows a new user to register. The widget renders the
"Wt.Auth.template.registration"template. and uses aRegistrationModelfor 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_, noDefault
-
Fields inherited from class eu.webtoolkit.jwt.WWidget
WT_GETEXTRAMS_JS
-
-
Constructor Summary
Constructors Constructor Description RegistrationWidget()Constructor.RegistrationWidget(AuthWidget authWidget)Constructor.RegistrationWidget(AuthWidget authWidget, WContainerWidget parentContainer)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidclose()Closes the registration widget.protected WWidgetcreateFormWidget(java.lang.String field)Creates a form widget.protected voiddoRegister()Performs the registration.RegistrationModelgetModel()Returns the registration model.protected voidregisterUserDetails(User user)Registers more user information.voidremove()Destructor.protected voidrender(java.util.EnumSet<RenderFlag> flags)Renders the widget.voidsetModel(RegistrationModel model)Sets the registration model.voidupdate()Updates the user-interface.protected booleanvalidate()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, hideToolTip, 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, showToolTip, showToolTipOnHover, unescapeText, updateSignalConnection, voidEventSignal, widgetAdded, widgetRemoved
-
Methods inherited from class eu.webtoolkit.jwt.WWidget
acceptDrops, acceptDrops, addCssRule, addCssRule, addJSignal, addStyleClass, animateHide, animateShow, applyThemeStyles, boxBorder, boxPadding, createJavaScript, disable, dropEvent, enable, getDropTouch, getJsRef, getParent, hide, htmlText, isExposed, isGlobalWidget, isLayoutSizeAware, layoutSizeChanged, needsRerender, positionAt, positionAt, positionAt, positionAt, removeFromParent, removeStyleClass, render, resize, scheduleRender, scheduleRender, scheduleRender, scheduleThemeStyleApply, 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 Detail
-
RegistrationWidget
public RegistrationWidget(AuthWidget authWidget, WContainerWidget parentContainer)
Constructor.Creates a new authentication.
-
RegistrationWidget
public RegistrationWidget()
Constructor.
-
RegistrationWidget
public RegistrationWidget(AuthWidget authWidget)
Constructor.
-
-
Method Detail
-
remove
public void remove()
Description copied from class:WWidgetDestructor.Deletes a widget and all contained contents.
- Overrides:
removein classWTemplate- See Also:
WWidget.removeWidget(WWidget widget)
-
setModel
public void setModel(RegistrationModel model)
Sets the registration model.
-
getModel
public RegistrationModel 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
protected void registerUserDetails(User user)
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
protected void render(java.util.EnumSet<RenderFlag> flags)
Description copied from class:WWidgetRenders 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:
renderin classWInteractWidget
-
createFormWidget
protected WWidget createFormWidget(java.lang.String field)
Description copied from class:WTemplateFormViewCreates 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:
createFormWidgetin classWTemplateFormView
-
-