|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.wicket.Component
org.apache.wicket.MarkupContainer
org.apache.wicket.markup.html.WebMarkupContainer
org.apache.wicket.markup.html.WebMarkupContainerWithAssociatedMarkup
org.apache.wicket.markup.html.panel.Panel
org.apache.wicket.examples.panels.signin.SignInPanel
public abstract class SignInPanel
Reusable user sign in panel with username and password as well as support for cookie persistence of the both. When the SignInPanel's form is submitted, the abstract method signIn(String, String) is called, passing the username and password submitted. The signIn() method should sign the user in and return null if no error ocurred, or a descriptive String in the event that the sign in fails.
Nested Class Summary | |
---|---|
class |
SignInPanel.SignInForm
Sign in form. |
Nested classes/interfaces inherited from class org.apache.wicket.Component |
---|
Component.ComponentModelChange, Component.EnabledChange, Component.IVisitor<T extends Component>, Component.VisibilityChange |
Field Summary |
---|
Fields inherited from class org.apache.wicket.Component |
---|
ENABLE, FLAG_CONFIGURED, FLAG_INITIALIZED, FLAG_REMOVING_FROM_HIERARCHY, FLAG_RESERVED1, FLAG_RESERVED2, FLAG_RESERVED3, FLAG_RESERVED4, FLAG_RESERVED5, FLAG_RESERVED6, FLAG_RESERVED7, FLAG_RESERVED8, PATH_SEPARATOR, RENDER |
Constructor Summary | |
---|---|
SignInPanel(String id)
|
|
SignInPanel(String id,
boolean includeRememberMe)
|
Method Summary | |
---|---|
void |
forgetMe()
Removes persisted form data for the signin panel (forget me) |
String |
getPassword()
Convenience method to access the password. |
boolean |
getRememberMe()
Get model object of the rememberMe checkbox |
String |
getUsername()
Convenience method to access the username. |
void |
setPersistent(boolean enable)
Convenience method set persistence for username and password. |
void |
setRememberMe(boolean rememberMe)
Set model object for rememberMe checkbox |
abstract boolean |
signIn(String username,
String password)
Sign in user if possible. |
Methods inherited from class org.apache.wicket.markup.html.panel.Panel |
---|
onComponentTag, onComponentTagBody, renderHead |
Methods inherited from class org.apache.wicket.markup.html.WebMarkupContainerWithAssociatedMarkup |
---|
newHeaderPartContainer, renderHeadFromAssociatedMarkupFile |
Methods inherited from class org.apache.wicket.markup.html.WebMarkupContainer |
---|
getMarkupType, getWebPage, getWebRequest |
Methods inherited from class org.apache.wicket.MarkupContainer |
---|
add, addOrReplace, autoAdd, autoAdd, contains, findMarkupStream, get, get, getAssociatedMarkupStream, getMarkupStream, hasAssociatedMarkup, internalAdd, isTransparentResolver, iterator, iterator, newMarkupResourceStream, onAfterRenderChildren, onRender, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderComponentTagBody, renderNext, replace, setDefaultModel, setMarkupStream, size, swap, toString, toString, visitChildren, visitChildren |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SignInPanel(String id)
Component.Component(String)
public SignInPanel(String id, boolean includeRememberMe)
id
- See Component constructorincludeRememberMe
- True if form should include a remember-me checkboxComponent.Component(String)
Method Detail |
---|
public final void forgetMe()
public String getPassword()
public boolean getRememberMe()
public String getUsername()
public void setPersistent(boolean enable)
enable
- Whether the fields should be persistentpublic void setRememberMe(boolean rememberMe)
rememberMe
- public abstract boolean signIn(String username, String password)
username
- The usernamepassword
- The password
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |