Hi, I’m trying to show some data tables (as screen fragments) on the mainWindow. I have tried the steps described here: Using Screen Fragments - CUBA Platform. Developer’s Manual. However, I keep getting an error. How can I show the fragment in the mainWindow and load the data to the fragment’s table?
Hopefully there’s someone who can tell me what I’m missing here… I have created a sample project to show my issue.
Currently you refer it from the fragment, however it is not declared neither in the main screen nor in the fragment. Where do you want the accountsDc to be loaded, in the fragment itself or provided from the main screen?
Yes, thanks @stukalov, you are right. I forgot to insert the accoutsDc. I want to create multiple screen fragments (each with their own data collection) and load them in the main screen, to create a sort of dashboard. I’ve added the accountsDc to the example project now. The problem is, that the data still doesn’t seem to load in the main screen. What’s needed for that to work?
Just as a side note: have you seen the dashboard addon available in the marketplace? Dashboards – CUBA Platform - perhaps it will take away the heavy lifting from you and with that the concrete problem is also solved…
P.S. You have a mistake in your data loader declaration, more precisely, an entity name in the query is case sensitive and your TESTPROJECT_ACCOUNT will not work, but testproject_Account works just fine.