I have 2 entities, customer and tracking.
tracking has one customer.
when editing a customer, I want to show all its related tracking (trackingEntity.customer).
doing this with a grid is simple, but I want to reuse the tracking browse screen that was already created.
Inside customer edit, I added a panel with the view
But I can’t configure its data source. what is the proper way to reuse a view, but tweak the data source
You should not use screens as frames. If you want to share some layout and logic between two screens, create a separate frame and use it in the both screens. The frame may not contain own datasources, it’s components can use datasources of the host screen (see the docs).
Do you have a real life usecase that I can see?
In this project you can see that expense-frame.xml components use the
operationDs datasource that is defined not in the frame but in the operation-edit.xml screen that includes the frame.
@knstvk thank you. But unfortunatly I can’t really get from this example how would you reuse a screen with different datasource. Don’t forget that these are my first steps in the framework. trying to understand how to migrate current project.
Do you have another example where I can reuse screens with different datasource.
So I think you just need to remove the datasource declaration from
tracking-browse-frame.xml at all. Then it will be obtained from the host screen.
@knstvk thank you but I already try that.
Right now Im getting this error:
Thanks for your time!
GroupTable requires a
GroupDatasource, so try to change the XML tag of
groupDatasource (and remove it from the frame).
Ok. it is working. thank you. brilliant feature.