Estou fazendo um programa utilizando Genesis e está dando a seguinte advertência:
Na classe main que inicializa minha aplicação eu tenho a seguinte linha no método main(String[] args):
<a>code</a>
StartupHelper helper = new StartupHelper();
helper.addConverter(DateConverter.class, new DateConverter());
(…)[/code]
Também tenho implementada a seguinte classe:
<a>code</a>
public class DateConverter implements org.apache.commons.beanutils.Converter{
public Object convert(Class arg0, Object arg1) {
Date d = new Date();
SimpleDateFormat formatter = new SimpleDateFormat(“dd/MM/yyyy”);
String str = (String)arg1;
try {
d = formatter.parse(str);
} catch (ParseException ex) {
ex.printStackTrace();
return null;
}
return d;
(…)[/code]
Assim como a classe Aluno:
public class Aluno implements Serializable{
(...)
private Date dat_Nascimento;
//getters e setters
(...)
Tem um “@Form” implementado para esta classe.
A advertência (WARNING mostrado acima) é referente à seguinte linha do meu “View”:
initComponents();
binder = new SwingBinder(this, new pojo.Aluno());
(...)
binder.registerConverter("dat_Nascimento", new DateConverter());
(...)
binder.bind();