com.vaadin.ui
Class LoginForm

java.lang.Object
  extended by com.vaadin.server.AbstractClientConnector
      extended by com.vaadin.ui.AbstractComponent
          extended by com.vaadin.ui.CustomComponent
              extended by com.vaadin.ui.LoginForm
All Implemented Interfaces:
MethodEventSource, ClientConnector, Sizeable, com.vaadin.shared.Connector, Component, HasComponents, java.io.Serializable, java.lang.Iterable<Component>

Deprecated. As of 7.0. This component no longer fulfills its duty reliably in the supported browsers and a VerticalLayout with two TextFields can be used instead.

@Deprecated
public class LoginForm
extends CustomComponent

LoginForm is a Vaadin component to handle common problem among Ajax applications: browsers password managers don't fill dynamically created forms like all those UI elements created by Vaadin.

For developer it is easy to use: add component to a desired place in you UI and add LoginListener to validate form input. Behind the curtain LoginForm creates an iframe with static html that browsers detect.

Login form is by default 100% width and height, so consider using it inside a sized Panel or Window.

Login page html can be overridden by replacing protected getLoginHTML method. As the login page is actually an iframe, styles must be handled manually. By default component tries to guess the right place for theme css.

Since:
5.3
See Also:
Serialized Form

Nested Class Summary
static class LoginForm.LoginEvent
          Deprecated. This event is sent when login form is submitted.
static interface LoginForm.LoginListener
          Deprecated. Login listener is a class capable to listen LoginEvents sent from LoginBox
 
Nested classes/interfaces inherited from interface com.vaadin.ui.HasComponents
HasComponents.ComponentAttachDetachNotifier, HasComponents.ComponentAttachEvent, HasComponents.ComponentAttachListener, HasComponents.ComponentDetachEvent, HasComponents.ComponentDetachListener
 
Nested classes/interfaces inherited from interface com.vaadin.ui.Component
Component.ErrorEvent, Component.Event, Component.Focusable, Component.Listener
 
Nested classes/interfaces inherited from interface com.vaadin.server.ClientConnector
ClientConnector.AttachEvent, ClientConnector.AttachListener, ClientConnector.ConnectorErrorEvent, ClientConnector.DetachEvent, ClientConnector.DetachListener
 
Nested classes/interfaces inherited from interface com.vaadin.server.Sizeable
Sizeable.Unit
 
Field Summary
 
Fields inherited from class com.vaadin.ui.AbstractComponent
DESIGN_ATTR_PLAIN_TEXT
 
Fields inherited from interface com.vaadin.server.Sizeable
SIZE_UNDEFINED, UNITS_CM, UNITS_EM, UNITS_EX, UNITS_INCH, UNITS_MM, UNITS_PERCENTAGE, UNITS_PICAS, UNITS_PIXELS, UNITS_POINTS
 
Constructor Summary
LoginForm()
          Deprecated.  
 
Method Summary
 void addListener(LoginForm.LoginListener listener)
          Deprecated. As of 7.0, replaced by addLoginListener(LoginListener)
 void addLoginListener(LoginForm.LoginListener listener)
          Deprecated. Adds LoginListener to handle login logic
 void beforeClientResponse(boolean initial)
          Deprecated. Called before the shared state and RPC invocations are sent to the client.
 java.lang.String getLoginButtonCaption()
          Deprecated. Returns the caption for the login button.
protected  java.lang.String getLoginHTML()
          Deprecated. Returns byte array containing login page html.
 java.lang.String getPasswordCaption()
          Deprecated. Returns the caption for the password field.
 java.lang.String getUsernameCaption()
          Deprecated. Returns the caption for the user name field.
 boolean handleConnectorRequest(VaadinRequest request, VaadinResponse response, java.lang.String path)
          Deprecated. Handle a request directed to this connector.
 void removeListener(LoginForm.LoginListener listener)
          Deprecated. As of 7.0, replaced by removeLoginListener(LoginListener)
 void removeLoginListener(LoginForm.LoginListener listener)
          Deprecated. Removes LoginListener
 void setHeight(float height, Sizeable.Unit unit)
          Deprecated. Sets the height of the object.
 void setLoginButtonCaption(java.lang.String loginButtonCaption)
          Deprecated. Sets the caption (button text) to show for the login button.
 void setPasswordCaption(java.lang.String passwordCaption)
          Deprecated. Sets the caption to show for the password field.
 void setUsernameCaption(java.lang.String usernameCaption)
          Deprecated. Sets the caption to show for the user name field.
 void setWidth(float width, Sizeable.Unit unit)
          Deprecated. Sets the width of the object.
 
Methods inherited from class com.vaadin.ui.CustomComponent
getComponentCount, getCompositionRoot, iterator, setCompositionRoot
 
Methods inherited from class com.vaadin.ui.AbstractComponent
addListener, addShortcutListener, addStyleName, attach, detach, findAncestor, fireComponentErrorEvent, fireComponentEvent, focus, getActionManager, getCaption, getComponentError, getCustomAttributes, getData, getDebugId, getDescription, getErrorMessage, getExplicitImmediateValue, getHeight, getHeightUnits, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getState, getState, getStyleName, getWidth, getWidthUnits, isCaptionAsHtml, isConnectorEnabled, isEnabled, isImmediate, isOrHasAncestor, isReadOnly, isResponsive, isVisible, readDesign, removeListener, removeShortcutListener, removeStyleName, setCaption, setCaptionAsHtml, setComponentError, setData, setDebugId, setDescription, setEnabled, setHeight, setHeightUndefined, setIcon, setId, setImmediate, setLocale, setParent, setPrimaryStyleName, setReadOnly, setResponsive, setSizeFull, setSizeUndefined, setStyleName, setStyleName, setVisible, setWidth, setWidthUndefined, writeDesign
 
Methods inherited from class com.vaadin.server.AbstractClientConnector
addAttachListener, addDetachListener, addExtension, addListener, addListener, addListener, addMethodInvocationToQueue, createState, encodeState, equals, fireEvent, getAllChildrenIterable, getConnectorId, getErrorHandler, getExtensions, getListeners, getResource, getRpcManager, getRpcProxy, getSession, getStateType, getUI, hashCode, hasListeners, isAttached, isThis, markAsDirty, markAsDirtyRecursive, registerRpc, registerRpc, removeAttachListener, removeDetachListener, removeExtension, removeListener, removeListener, removeListener, removeListener, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler, setResource
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.vaadin.ui.Component
addListener, addStyleName, attach, getCaption, getDescription, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getUI, isEnabled, isReadOnly, isVisible, readDesign, removeListener, removeStyleName, setCaption, setEnabled, setIcon, setId, setParent, setPrimaryStyleName, setReadOnly, setStyleName, setVisible, writeDesign
 
Methods inherited from interface com.vaadin.server.ClientConnector
addAttachListener, addDetachListener, detach, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler
 
Methods inherited from interface com.vaadin.shared.Connector
getConnectorId
 
Methods inherited from interface com.vaadin.server.Sizeable
getHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeightUndefined, setSizeFull, setSizeUndefined, setWidth, setWidthUndefined
 

Constructor Detail

LoginForm

public LoginForm()
Deprecated. 
Method Detail

handleConnectorRequest

public boolean handleConnectorRequest(VaadinRequest request,
                                      VaadinResponse response,
                                      java.lang.String path)
                               throws java.io.IOException
Deprecated. 
Description copied from interface: ClientConnector
Handle a request directed to this connector. This can be used by connectors to dynamically generate a response and it is also used internally when serving ConnectorResources.

Requests to /APP/connector/[ui id]/[connector id]/ are routed to this method with the remaining part of the requested path available in the path parameter.

NOTE that the session is not locked when this method is called. It is the responsibility of the connector to ensure that the session is locked while handling state or other session related data. For best performance the session should be unlocked before writing a large response to the client.

Specified by:
handleConnectorRequest in interface ClientConnector
Overrides:
handleConnectorRequest in class AbstractClientConnector
Parameters:
request - the request that should be handled
response - the response object to which the response should be written
path - the requested relative path
Returns:
true if the request has been handled, false if no response has been written.
Throws:
java.io.IOException - if there is a problem generating a response.

beforeClientResponse

public void beforeClientResponse(boolean initial)
Deprecated. 
Description copied from interface: ClientConnector
Called before the shared state and RPC invocations are sent to the client. Gives the connector an opportunity to set computed/dynamic state values or to invoke last minute RPC methods depending on other component features.

Specified by:
beforeClientResponse in interface ClientConnector
Overrides:
beforeClientResponse in class AbstractComponent
Parameters:
initial - true if the client-side connector will be created and initialized after this method has been invoked. false if there is already an initialized client-side connector.

getLoginHTML

protected java.lang.String getLoginHTML()
Deprecated. 
Returns byte array containing login page html. If you need to override the login html, use the default html as basis. Login page sets its target with javascript.

Returns:
byte array containing login page html

addLoginListener

public void addLoginListener(LoginForm.LoginListener listener)
Deprecated. 
Adds LoginListener to handle login logic

Parameters:
listener -

addListener

@Deprecated
public void addListener(LoginForm.LoginListener listener)
Deprecated. As of 7.0, replaced by addLoginListener(LoginListener)


removeLoginListener

public void removeLoginListener(LoginForm.LoginListener listener)
Deprecated. 
Removes LoginListener

Parameters:
listener -

removeListener

@Deprecated
public void removeListener(LoginForm.LoginListener listener)
Deprecated. As of 7.0, replaced by removeLoginListener(LoginListener)


setWidth

public void setWidth(float width,
                     Sizeable.Unit unit)
Deprecated. 
Description copied from interface: Sizeable
Sets the width of the object. Negative number implies unspecified size (terminal is free to set the size).

Specified by:
setWidth in interface Sizeable
Overrides:
setWidth in class AbstractComponent
Parameters:
width - the width of the object.
unit - the unit used for the width.

setHeight

public void setHeight(float height,
                      Sizeable.Unit unit)
Deprecated. 
Description copied from interface: Sizeable
Sets the height of the object. Negative number implies unspecified size (terminal is free to set the size).

Specified by:
setHeight in interface Sizeable
Overrides:
setHeight in class AbstractComponent
Parameters:
height - the height of the object.
unit - the unit used for the width.

getUsernameCaption

public java.lang.String getUsernameCaption()
Deprecated. 
Returns the caption for the user name field.

Returns:
String

setUsernameCaption

public void setUsernameCaption(java.lang.String usernameCaption)
Deprecated. 
Sets the caption to show for the user name field. The caption cannot be changed after the form has been shown to the user.

Parameters:
usernameCaption -

getPasswordCaption

public java.lang.String getPasswordCaption()
Deprecated. 
Returns the caption for the password field.

Returns:
String

setPasswordCaption

public void setPasswordCaption(java.lang.String passwordCaption)
Deprecated. 
Sets the caption to show for the password field. The caption cannot be changed after the form has been shown to the user.

Parameters:
passwordCaption -

getLoginButtonCaption

public java.lang.String getLoginButtonCaption()
Deprecated. 
Returns the caption for the login button.

Returns:
String

setLoginButtonCaption

public void setLoginButtonCaption(java.lang.String loginButtonCaption)
Deprecated. 
Sets the caption (button text) to show for the login button. The caption cannot be changed after the form has been shown to the user.

Parameters:
loginButtonCaption -


Copyright © 2000-2014 Vaadin Ltd. All Rights Reserved.