// TODO: Also save if the enter key has been pressed.
String domainSaveButtonPressed = request.getRequestObject().getParameter(DOMAIN_SAVE_BUTTON_PRESSED);
boolean updateDomainDetails = (domainSaveButtonPressed != null) && Boolean.valueOf(domainSaveButtonPressed).booleanValue();
if (updateDomainDetails) {
DomainConfiguration domainConfig = new DomainConfiguration();
DomainConfigurationParser parser = new DomainConfigurationParser(domainConfig);
parser.parse(request);
domainConfig.setPropertyId(idDomainDetails);
domainConfig.apply(displayer.getDomainProperty());
}
}
String idRangeDetails = request.getRequestObject().getParameter("idRangeDetails");
if (idRangeDetails != null) {
// If the range property has been changed, load it.
DataProperty rangeProperty = displayer.getRangeProperty();
if (!idRangeDetails.equals(rangeProperty.getPropertyId())) displayer.setRangeProperty(ds.getPropertyById(idRangeDetails));
// If range save button has been pressed, update its configuration parameters.
String rangeSaveButtonPressed = request.getRequestObject().getParameter(RANGE_SAVE_BUTTON_PRESSED);
boolean updateRangeDetails = (rangeSaveButtonPressed != null) && Boolean.valueOf(rangeSaveButtonPressed).booleanValue();
// TODO: Also save if the enter key has been pressed.
if (updateRangeDetails) {
RangeConfiguration rangeConfig = new RangeConfiguration();
RangeConfigurationParser parser = new RangeConfigurationParser(rangeConfig);
parser.parse(request);
rangeConfig.setPropertyId(idRangeDetails);
rangeConfig.apply(displayer.getRangeProperty());
displayer.setRangeScalarFunction(DataDisplayerServices.lookup().getScalarFunctionManager().getScalarFunctionByCode(rangeConfig.getScalarFunctionCode()));
displayer.setUnitI18nMap(rangeConfig.getUnitI18nMap());
}