I am having an issue handing null values for PopupDateField. I am expecting when there is not a value for PopupDateField, the field should be displayed as empty. When attempting to execute the code below, I get a nullpointerexception when the date input is null. Is there a work around for this?
EntityAccount entityAccount;
PropertysetItem item;
try {
entityAccount = runner.query(query, handler, 6);
item = new PropertysetItem();
item.addItemProperty("id",
new ObjectProperty<Long>(entityAccount.getId()));
item.addItemProperty("name", new ObjectProperty<String>(
entityAccount.getName()));
item.addItemProperty("abbrname", new ObjectProperty<String>(
entityAccount.getShortName()));
item.addItemProperty("fein", new ObjectProperty<String>(
entityAccount.getFein()));
item.addItemProperty("activatedate", new ObjectProperty<Date>(
entityAccount.getActivationDate()));
item.addItemProperty("deactivatedate", new ObjectProperty<Date>(
entityAccount.getDeactivationDate()));
FieldGroup binder = new FieldGroup(item);
binder.bind(_idField, "id");
binder.bind(_nameField, "name");
binder.bind(_abbrName, "abbrname");
binder.bind(_feinField, "fein");
binder.bind(_activateDate, "activatedate");
binder.bind(_deactivateDate, "deactivatedate");
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
thanks.