Guest User

Untitled

a guest
Feb 8th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. public class LoginController extends Controller {
  2. @Inject
  3. FormFactory formFactory;
  4. @Inject
  5. UserFactory userFactory;
  6.  
  7. public Result loginPage(){
  8. Form loginForm = formFactory.form(models.UserFactory.User.class);
  9. return ok(login.render(loginForm));
  10. }
  11.  
  12. public class UserFactory {
  13. @Inject Database db;
  14. public class User {
  15. private int id;
  16. private String username;
  17. private String password;
  18. private String email;
  19.  
  20. public User(){
  21.  
  22. }
  23. public User(int id, String username, String password, String email){
  24. this.id = id;
  25. this.username = username;
  26. this.password = password;
  27. this.email = email;
  28. }
  29. public UserFactory(){
  30.  
  31. }
  32. }}
  33. //all other functions i do not copy, because they do not cause an error
Add Comment
Please, Sign In to add comment