package com.algaworks.cursojavaee;
import java.io.Serializable;
import java.util.Date;
import javax.faces.application.FacesMessage;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;
import javax.faces.context.FacesContext;
@ManagedBean
@ViewScoped
public class PerfilUsuarioBean implements Serializable {
private static final long serialVersionUID = 1L;
private String nome;
private Date dataNascimento;
public void atualizar() {
System.out.println("Data nascimento: " + this.dataNascimento);
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage("Perfil atualizado!"));
}
public Date getDataHoje() {
return new Date();
}
public String getNome() {
return nome;
}
public void setNome(String nome) {
this.nome = nome;
}
public Date getDataNascimento() {
return dataNascimento;
}
public void setDataNascimento(Date dataNascimento) {
this.dataNascimento = dataNascimento;
}
}