use of org.jowidgets.cap.common.api.bean.IBeanModification in project jo-client-platform by jo-source.
the class BeanProxyImpl method setModifications.
@Override
public void setModifications(final Collection<IBeanModification> modifications) {
checkDisposed();
Assert.paramNotNull(modifications, "modifications");
for (final IBeanModification modification : modifications) {
setValue(modification.getPropertyName(), modification.getNewValue());
}
}
use of org.jowidgets.cap.common.api.bean.IBeanModification in project jo-client-platform by jo-source.
the class BeanLinkPanelImpl method doFilter.
private void doFilter(final IBeanProxy<LINKABLE_BEAN_TYPE> bean) {
final IBeanTableModel<LINKABLE_BEAN_TYPE> tableModel = linkableTable.getModel();
final IFilterToolkit filterToolkit = CapUiToolkit.filterToolkit();
final IUiFilterFactory filterFactory = filterToolkit.filterFactory();
final IUiBooleanFilterBuilder filterBuilder;
filterBuilder = filterFactory.booleanFilterBuilder().setOperator(BooleanOperator.AND);
if (bean != null) {
for (final IBeanModification modification : bean.getModifications()) {
final String propertyName = modification.getPropertyName();
final IAttribute<Object> attribute = tableModel.getAttribute(propertyName);
final IIncludingFilterFactory<Object> includingFilterFactory = getIncludingFilterFactory(attribute);
if (includingFilterFactory != null) {
final Object operand = getModifiedFilterOperand(modification.getNewValue());
filterBuilder.addFilter(includingFilterFactory.getIncludingFilter(operand));
}
}
}
if (filterBuilder.hasEntries()) {
tableModel.setFilter(BEAN_LINK_SEARCH_FILTER_ID, filterBuilder.build());
} else {
tableModel.setFilter(BEAN_LINK_SEARCH_FILTER_ID, null);
}
tableModel.loadScheduled(LOAD_DELAY);
}
Aggregations