File tree Expand file tree Collapse file tree
src/main/java/pl/tomaszdziurko/wicket/view Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -31,6 +31,13 @@ <h1>Login Page</h1>
3131 < input type ="password " id ="password " wicket:id ="password " />
3232 </ div >
3333 </ div >
34+ < div class ="control-group ">
35+ < div class ="controls ">
36+ < label class ="checkbox ">
37+ < input type ="checkbox " wicket:id ="rememberMe "> Remember me on this computer
38+ </ label >
39+ </ div >
40+ </ div >
3441 < div class ="form-actions ">
3542 < input type ="submit " wicket:id ="submit " value ="Login " title ="Login " class ="btn btn-primary "/>
3643 </ div >
Original file line number Diff line number Diff line change 11package pl .tomaszdziurko .wicket .view ;
22
33import org .apache .wicket .markup .html .form .Button ;
4+ import org .apache .wicket .markup .html .form .CheckBox ;
45import org .apache .wicket .markup .html .form .Form ;
56import org .apache .wicket .markup .html .form .PasswordTextField ;
67import org .apache .wicket .markup .html .form .RequiredTextField ;
@@ -15,6 +16,7 @@ public class LoginPage extends BasePage {
1516
1617 private String login ;
1718 private String password ;
19+ private boolean rememberMe ;
1820
1921 public LoginPage () {
2022
@@ -24,6 +26,7 @@ public LoginPage() {
2426 loginForm .add (new FeedbackPanel ("feedback" ));
2527 loginForm .add (new RequiredTextField <String >("login" , new PropertyModel <String >(this , "login" )));
2628 loginForm .add (new PasswordTextField ("password" , new PropertyModel <String >(this , "password" )));
29+ loginForm .add (new CheckBox ("rememberMe" , new PropertyModel <Boolean >(this , "rememberMe" )));
2730
2831 Button submit = new Button ("submit" ) {
2932 @ Override
You can’t perform that action at this time.
0 commit comments