use of org.jowidgets.cap.ui.api.attribute.IAttributeConfig in project jo-client-platform by jo-source.
the class BeanTableModelImpl method setConfig.
@Override
public void setConfig(final IBeanTableModelConfig config) {
Assert.paramNotNull(config, "config");
onSetConfig = true;
final Map<String, IAttributeConfig> attributeConfigs = config.getAttributeConfigs();
if (attributeConfigs != null) {
for (final IAttribute<Object> attribute : attributeSet) {
final IAttributeConfig attributeConfig = attributeConfigs.get(attribute.getPropertyName());
if (attributeConfig != null) {
attribute.setConfig(attributeConfig);
}
}
}
final Map<String, IUiFilter> filtersConfig = config.getFilters();
if (filtersConfig != null) {
for (final Entry<String, IUiFilter> entry : filtersConfig.entrySet()) {
setFilter(entry.getKey(), entry.getValue());
}
}
if (config.getSortModelConfig() != null) {
this.sortModel.setConfig(config.getSortModelConfig());
}
if (config.isAutoSelection() != null) {
this.autoSelection = config.isAutoSelection();
}
onSetConfig = false;
dataModel.fireDataChanged();
}
Aggregations