Advertisement
Guest User

Untitled

a guest
Sep 20th, 2017
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.53 KB | None | 0 0
  1. /*
  2. * To change this license header, choose License Headers in Project Properties.
  3. * To change this template file, choose Tools | Templates
  4. * and open the template in the editor.
  5. */
  6. package web;
  7.  
  8. import javax.ejb.EJB;
  9. import javax.faces.bean.ManagedBean;
  10. import javax.faces.bean.SessionScoped;
  11. import jbs.StudentBean;
  12.  
  13. /**
  14. *
  15. * @author rodri
  16. */
  17. @ManagedBean
  18. @SessionScoped
  19. public class AdministratorManager {
  20.  
  21. private String newStudentUsername;
  22. private String newStudentPassword;
  23. private String newStudentName;
  24. private String newStudentEmail;
  25.  
  26. @EJB
  27. private StudentBean sb;
  28.  
  29. public AdministratorManager() {
  30.  
  31. }
  32.  
  33. public void createStudent() {
  34. sb.createStudent(newStudentUsername, newStudentPassword, newStudentName, newStudentEmail);
  35. clearFields();
  36. }
  37.  
  38. private void clearFields() {
  39. newStudentUsername = null;
  40. newStudentPassword = null;
  41. newStudentName = null;
  42. newStudentEmail= null;
  43. }
  44.  
  45. public String getNewStudentEmail() {
  46. return newStudentEmail;
  47. }
  48.  
  49. public String getNewStudentName() {
  50. return newStudentName;
  51. }
  52.  
  53. public String getNewStudentPassword() {
  54. return newStudentPassword;
  55. }
  56.  
  57. public String getNewStudentUsername() {
  58. return newStudentUsername;
  59. }
  60.  
  61. public StudentBean getSb() {
  62. return sb;
  63. }
  64.  
  65. public void setSb(StudentBean sb) {
  66. this.sb = sb;
  67. }
  68.  
  69.  
  70.  
  71.  
  72.  
  73. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement