Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package br.edu.ifpb.projeto.bean;
- import javax.annotation.PostConstruct;
- import javax.faces.bean.ManagedBean;
- import javax.faces.bean.ViewScoped;
- import br.edu.ifpb.projeto.dao.AlunoDAO;
- import br.edu.ifpb.projeto.model.Aluno;
- @ManagedBean(name = "alunoBean")
- @ViewScoped
- public class AlunoBean {
- private AlunoDAO alunoDao;
- private Aluno aluno;
- private String email;
- private String nome;
- private String competencias;
- @PostConstruct
- public void init() {
- this.aluno = new Aluno();
- }
- public String getEmail() {
- return email;
- }
- public void setEmail(String email) {
- this.email = email;
- }
- public String getNome() {
- return nome;
- }
- public void setNome(String nome) {
- this.nome = nome;
- }
- public Aluno getAluno() {
- return aluno;
- }
- public void setAluno(Aluno aluno) {
- this.aluno = aluno;
- }
- public void atualizar(){
- alunoDao = new AlunoDAO();
- alunoDao.beginTransaction();
- alunoDao.update(aluno);
- alunoDao.commit();
- }
- public String getCompetencias() {
- return competencias;
- }
- public void setCompetencias(String competencias) {
- this.competencias = competencias;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement