boolean isSupply = tenderType == TenderType.SUPPLY;
// --- Tender's supply time
final boolean priceManagementEnabled = stockManager.isPriceManagementEnabled(resource);
StyledDateTimeField dateTimeField = new StyledDateTimeField(CKEY_TENDER_SUPPLY_TIME) {
private static final long serialVersionUID = 1L;
@Override
protected void onRender() {
getResponse().write("<div class=\"date-time\">");
super.onRender();
getResponse().write("</div>");
}
};
dateTimeField.add(RangeValidator.minimum(getResourceModel().getObject().getContract().getCreationDate()));
dateTimeField.setRequired(isSupply);
formContainer.add(dateTimeField.setVisible(isSupply));
// --- Location
locationSelector = new LocationSelector(CKEY_LOCATION);
locationSelector.setVersioned(true);
formContainer.add(locationSelector);