I’m creating this table, without datasource. The datasource will be created in the controller in init() method.
Now, the problem is why it always throws Exception:
GuiDevelopmentException: Table ‘rows’ element doesn’t have ‘datasource’ attribute
Unfortunately, the table XML loader works in such a way that a datasource for the table should be specified in XML too. This is a shortcoming and probably we will fix it in the future.
For now, you have to create the table programmatically together with the datasource. For example:
private List<entity that you created> tableDlLoadDelegate(LoadContext<entity that you created> loadContext){
//Stream must be of the type of the enitty you created
Stream<entity that you created> context=dataManager.loadList(loadContext).stream();
//data is a list or map of entities that you create
Stream<entity that you created> dataStream=data.stream();
Stream<entity that you created> dl=Stream.concat(context,dataStream);
return dl.collect(Collectors.toList());
}
in onInit(), in the same java field:
tableDl.load();