Previous versions of platform allowed me to pass datasource through params and set it to table component in “init” method, but now I don’t have this ability because of throwing exception: (UnsupportedOperationException(“Changing datasource is not supported by the Table component”) .
As a workaround I overriden DsContextImpl.get(String id) as :
@Override
public Datasource get(String id) {
Datasource ds = super.get(id);
if(windowContext != null && ds == null) {
Object dsCandidate = windowContext.getParams().get(id);
if(dsCandidate instanceof Datasource) {
ds = (Datasource) dsCandidate;
}
}
return ds;
}
Is there any other way to set datasource to the table from window params without this hack?