* default component tries to guess the right place for theme css.
* <p>
* Note, this is a new Ajax terminal specific component and is likely to change.
- *
+ *
* @since 5.3
*/
public class LoginForm extends CustomComponent {
private ApplicationResource loginPage = new ApplicationResource() {
/**
- *
+ *
*/
private static final long serialVersionUID = 1L;
private ParameterHandler paramHandler = new ParameterHandler() {
/**
- *
+ *
*/
private static final long serialVersionUID = 1L;
private URIHandler uriHandler = new URIHandler() {
/**
- *
+ *
*/
private static final long serialVersionUID = 1L;
private final String responce = "<html><body>Login form handeled."
* 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.
- *
+ *
* @return byte array containing login page html
*/
protected byte[] getLoginHTML() {
+ "<div class='v-app v-app-loginpage' style=\"background:transparent;\">"
+ "<iframe name='logintarget' style='width:0;height:0;"
+ "border:0;margin:0;padding:0;'></iframe>"
- + "<form id='loginf' target='logintarget' onkeypress=\"submitOnEnter(event)\">"
+ + "<form id='loginf' target='logintarget' onkeypress=\"submitOnEnter(event)\" method=\"post\">"
+ "<div>Username</div><div >"
+ "<input class='v-textfield' style='display:block;' type='text' name='username'></div>"
+ "<div>Password</div>"
public class LoginEvent extends Event {
/**
- *
+ *
*/
private static final long serialVersionUID = 1L;
private Map<String, String> params;
/**
* Access method to form values by field names.
- *
+ *
* @param name
* @return value in given field
*/
public interface LoginListener extends Serializable {
/**
* This method is fired on each login form post.
- *
+ *
* @param event
*/
public void onLogin(LoginForm.LoginEvent event);
/**
* Adds LoginListener to handle login logic
- *
+ *
* @param listener
*/
public void addListener(LoginListener listener) {
/**
* Removes LoginListener
- *
+ *
* @param listener
*/
public void removeListener(LoginListener listener) {