VerticalPanel panel = new VerticalPanel();
panel.setStyleName("fill-layout");
form = new Form<PoolConfig>(PoolConfig.class) {
@Override
public FormValidation validate() {
FormValidation superValidation = super.validate();
PoolConfig updatedEntity = this.getUpdatedEntity();
// only works on real values
if(ExpressionAdapter.getExpressions(updatedEntity).isEmpty())
{
int minPoolSize = updatedEntity.getMinPoolSize();
int maxPoolSize = updatedEntity.getMaxPoolSize();
if(minPoolSize > maxPoolSize){
superValidation.addError("maxPoolSize");
maxCon.setErroneous(true);
maxCon.setErrMessage("Max Pool Size must be greater than Min Pool Size");
}
}
return superValidation;