Skip to content

Commit

Permalink
MID-9247: fix for model of ReportExpressionColumn
Browse files Browse the repository at this point in the history
  • Loading branch information
skublik committed Oct 20, 2023
1 parent 2bd5ec9 commit d72d1b8
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@
import com.evolveum.midpoint.xml.ns._public.common.common_3.*;
import com.evolveum.prism.xml.ns._public.types_3.PolyStringType;

import org.apache.wicket.model.LoadableDetachableModel;

public class ConfigurableExpressionColumn<S extends SelectableRow<T>, T extends Serializable> extends AbstractExportableColumn<S, String> {

private static final Trace LOGGER = TraceManager.getTrace(ConfigurableExpressionColumn.class);
Expand Down Expand Up @@ -92,7 +94,12 @@ public void populateItem(org.apache.wicket.markup.repeater.Item<ICellPopulator<S
public IModel<String> getDataModel(IModel<S> rowModel) {
ItemPath columnPath = WebComponentUtil.getPath(customColumn);

return () -> loadExportableColumnDataModel(rowModel, customColumn, columnPath, expression);
return new LoadableDetachableModel<>() {
@Override
protected String load() {
return loadExportableColumnDataModel(rowModel, customColumn, columnPath, expression);
}
};
}

@Override
Expand Down

0 comments on commit d72d1b8

Please sign in to comment.