Hello,
I'm using DynamicDSGenerator for creating a changeable datasource. When I load the changed datasource the columns of ListGrid are change fine according to the new fields.
But the FilterBuilder doesn't change. It contains still the old fields.
(Maybe the reason is that the ID of the datasource is not changed.)
I use this: DataSource.load("dynamicDS", callback, true);
The callback function is:
final Function callback = new Function() {
@Override
public void execute() {
DataSource dynamicDS = DataSource.getDataSource("dynamicDS");
dsResultList.setDataSource(dynamicDS);
filterBuilder.setDataSource(dynamicDS);
}
};
I made a workaround. I create a dummy datasource with one field, and the FilterBuilder's datasource is set to this dummy DS before and it works.
(...)
filterBuilder.setDataSource(dummyDS);
filterBuilder.setDataSource(dynamicDS);
(...)
Is there any more elegant solution?
Thank you for your answer in advance.
I'm using DynamicDSGenerator for creating a changeable datasource. When I load the changed datasource the columns of ListGrid are change fine according to the new fields.
But the FilterBuilder doesn't change. It contains still the old fields.
(Maybe the reason is that the ID of the datasource is not changed.)
I use this: DataSource.load("dynamicDS", callback, true);
The callback function is:
final Function callback = new Function() {
@Override
public void execute() {
DataSource dynamicDS = DataSource.getDataSource("dynamicDS");
dsResultList.setDataSource(dynamicDS);
filterBuilder.setDataSource(dynamicDS);
}
};
I made a workaround. I create a dummy datasource with one field, and the FilterBuilder's datasource is set to this dummy DS before and it works.
(...)
filterBuilder.setDataSource(dummyDS);
filterBuilder.setDataSource(dynamicDS);
(...)
Is there any more elegant solution?
Thank you for your answer in advance.
Comment