Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

As I user I could tick check box when I want to be auto-logged in the…

… future.
  • Loading branch information...
commit c5e91b39a203c9103754f8a03ab2e4151fc9e199 1 parent d787a98
@tdziurko authored
7 src/main/java/pl/tomaszdziurko/wicket/view/LoginPage.html
@@ -31,6 +31,13 @@
<input type="password" id="password" wicket:id="password" />
+ <div class="control-group">
+ <div class="controls">
+ <label class="checkbox">
+ <input type="checkbox" wicket:id="rememberMe"> Remember me on this computer
+ </label>
+ </div>
+ </div>
<div class="form-actions">
<input type="submit" wicket:id="submit" value="Login" title="Login" class="btn btn-primary"/>
3  src/main/java/pl/tomaszdziurko/wicket/view/
@@ -1,6 +1,7 @@
package pl.tomaszdziurko.wicket.view;
import org.apache.wicket.markup.html.form.Button;
+import org.apache.wicket.markup.html.form.CheckBox;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.form.PasswordTextField;
import org.apache.wicket.markup.html.form.RequiredTextField;
@@ -15,6 +16,7 @@
private String login;
private String password;
+ private boolean rememberMe;
public LoginPage() {
@@ -24,6 +26,7 @@ public LoginPage() {
loginForm.add(new FeedbackPanel("feedback"));
loginForm.add(new RequiredTextField<String>("login", new PropertyModel<String>(this, "login")));
loginForm.add(new PasswordTextField("password", new PropertyModel<String>(this, "password")));
+ loginForm.add(new CheckBox("rememberMe", new PropertyModel<Boolean>(this, "rememberMe")));
Button submit = new Button("submit") {
Please sign in to comment.
Something went wrong with that request. Please try again.