com.itmill.toolkit.ui
Class LoginForm
java.lang.Object
com.itmill.toolkit.ui.AbstractComponent
com.itmill.toolkit.ui.AbstractComponentContainer
com.itmill.toolkit.ui.CustomComponent
com.itmill.toolkit.ui.LoginForm
- All Implemented Interfaces:
- MethodEventSource, Paintable, Sizeable, VariableOwner, Component, ComponentContainer, EventListener
public class LoginForm
- extends CustomComponent
LoginForm is a Toolkit component to handle common problem among Ajax
applications: browsers password managers don't fill dynamically created forms
like all those UI elements created by IT Mill Toolkit.
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.
Note, this is a new Ajax terminal specific component and is likely to change.
- Since:
- 5.3
Fields inherited from interface com.itmill.toolkit.terminal.Sizeable |
SIZE_UNDEFINED, UNIT_SYMBOLS, UNITS_CM, UNITS_EM, UNITS_EX, UNITS_INCH, UNITS_MM, UNITS_PERCENTAGE, UNITS_PICAS, UNITS_PIXELS, UNITS_POINTS |
Methods inherited from class com.itmill.toolkit.ui.CustomComponent |
addComponent, getComponentIterator, getComponentType, getCompositionRoot, getTag, moveComponentsFrom, paintContent, removeAllComponents, removeComponent, replaceComponent, setComponentType, setCompositionRoot |
Methods inherited from class com.itmill.toolkit.ui.AbstractComponent |
addListener, addListener, addListener, addListener, addStyleName, changeVariables, childRequestedRepaint, fireComponentErrorEvent, fireComponentEvent, fireEvent, getApplication, getCaption, getComponentError, getData, getDebugId, getDescription, getErrorHandler, getErrorMessage, getHeight, getHeightUnits, getIcon, getLocale, getParent, getStyle, getStyleName, getWidth, getWidthUnits, getWindow, handleError, isEnabled, isImmediate, isReadOnly, isVisible, paint, removeListener, removeListener, removeListener, removeListener, removeListener, removeStyleName, requestRepaint, requestRepaintRequests, setCaption, setComponentError, setData, setDebugId, setDescription, setErrorHandler, setHeight, setHeight, setHeightUnits, setIcon, setImmediate, setLocale, setParent, setReadOnly, setSizeFull, setSizeUndefined, setStyle, setStyleName, setWidth, setWidth, setWidthUnits, setVisible |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.itmill.toolkit.ui.Component |
addListener, addStyleName, childRequestedRepaint, getApplication, getCaption, getIcon, getLocale, getParent, getStyleName, getWindow, isEnabled, isReadOnly, isVisible, removeListener, removeStyleName, setCaption, setIcon, setParent, setReadOnly, setStyleName, setVisible |
Methods inherited from interface com.itmill.toolkit.terminal.Sizeable |
getHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeight, setHeightUnits, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthUnits |
LoginForm
public LoginForm()
getLoginHTML
protected byte[] getLoginHTML()
- 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
attach
public void attach()
- Description copied from class:
AbstractComponentContainer
- Notifies all contained components that the container is attached to a
window.
- Specified by:
attach
in interface Component
- Overrides:
attach
in class AbstractComponentContainer
- See Also:
Component.attach()
detach
public void detach()
- Description copied from class:
AbstractComponentContainer
- Notifies all contained components that the container is detached from a
window.
- Specified by:
detach
in interface Component
- Overrides:
detach
in class AbstractComponentContainer
- See Also:
Component.detach()
addListener
public void addListener(LoginForm.LoginListener listener)
- Adds LoginListener to handle login logic
- Parameters:
listener
-
removeListener
public void removeListener(LoginForm.LoginListener listener)
- Removes LoginListener
- Parameters:
listener
-
Copyright © 2000-2009 IT Mill Ltd. All Rights Reserved.