Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- package web;
- import javax.ejb.EJB;
- import javax.faces.bean.ManagedBean;
- import javax.faces.bean.SessionScoped;
- import jbs.StudentBean;
- /**
- *
- * @author rodri
- */
- @ManagedBean
- @SessionScoped
- public class AdministratorManager {
- private String newStudentUsername;
- private String newStudentPassword;
- private String newStudentName;
- private String newStudentEmail;
- @EJB
- private StudentBean sb;
- public AdministratorManager() {
- }
- public void createStudent() {
- sb.createStudent(newStudentUsername, newStudentPassword, newStudentName, newStudentEmail);
- clearFields();
- }
- private void clearFields() {
- newStudentUsername = null;
- newStudentPassword = null;
- newStudentName = null;
- newStudentEmail= null;
- }
- public String getNewStudentEmail() {
- return newStudentEmail;
- }
- public String getNewStudentName() {
- return newStudentName;
- }
- public String getNewStudentPassword() {
- return newStudentPassword;
- }
- public String getNewStudentUsername() {
- return newStudentUsername;
- }
- public StudentBean getSb() {
- return sb;
- }
- public void setSb(StudentBean sb) {
- this.sb = sb;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement