Empleado con las revisiones
This commit is contained in:
parent
7187b75fff
commit
cdb53c3766
@ -248,11 +248,7 @@ public class EmployeeView extends BeanValidationForm<Employee> implements HasUrl
|
|||||||
int birthYear = birthday.getValue().getYear();
|
int birthYear = birthday.getValue().getYear();
|
||||||
int ages = currentYear - birthYear;
|
int ages = currentYear - birthYear;
|
||||||
age.setValue(String.valueOf(ages));
|
age.setValue(String.valueOf(ages));
|
||||||
if (ages < 18) {
|
birthday.setInvalid(ages < 18);
|
||||||
birthday.setInvalid(true);
|
|
||||||
} else {
|
|
||||||
birthday.setInvalid(false);
|
|
||||||
}
|
|
||||||
System.out.println(age);
|
System.out.println(age);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user