Hi
We have a landing page with 3 tabs - overview, documents, statistics
In overview page we have Widget 1 (WebReport)
In statistics we have Widget 2 (WebReport)
Both widget use code similar to this
<div id="content"></div>
<script>
csui.require([
'csui/lib/marionette',
'csui/lib/jquery',
'csui/utils/contexts/page/page.context',
'csui/utils/contexts/factories/connector',
'webreports/controls/table.report/table.report.view'
], function (
Marionette,
$,
PageContext,
ConnectorFactory,
TableReportView) {
var contentRegionDP = new Marionette.Region({el: '#content'}),
pageContextDP = new PageContext(),
tableReportViewDP,
options;
options = {
context: pageContextDP,
data: {
id: [LL_REPTAG_$WRDATA /],
title: 'Document progress',
header: false,
titleBarIcon: 'title-assignments',
columnsWithSearch: ["Name","Progress"],
sortBy: 'Name',
sortOrder: 'asc'
}
};
tableReportViewDP = new TableReportView(options);
contentRegionDP.show(tableReportViewDP);
pageContextDP.fetch();
});
</script>
Problem is that when switching between tabs, sometimes these WebReport widget do not load.
Is there other way how to call the tablereport view? maybe re-using same page context or something.