Error after upgrade 24.2, can't load WebReport in Smart UI dialog anymore.
Hello,
we were using Smart UI modules to provide Smart UI action (function menu) buttons to call WebReport contents in Smart UI dialogs.
All was working good since 16.2.x versions, but now after the upgrade to 24.2 receiving this error.
Here is the sample code of what was working previously.
<script>
csui.onReady3({
connection: {
url: "[LL_REPTAG_URLPREFIXFULL /]/api/v1",
supportPath: "/[LL_REPTAG_SUPPORTDIR /]",
session: { ticket: [LL_REPTAG_OTCSTICKET QUOTE /] }
}
},[
'csui/controls/dialog/dialog.view',
'csui/utils/contexts/page/page.context',
'webreports/widgets/tilereport/tilereport.view',
],function(DialogView, PageContext, TileReportView){
var context = new PageContext();
var tileReportView = new TileReportView({
context,
data:{
id: 257359,
scroll: true,
header: false,
}
});
var dialog = new DialogView({
largeSize: true,
view: tileReportView,
title: 'test'
});
dialog.show();
context.fetch();
});
</script>
If placed in Webreport and called as a Tile from Perspective, it was working before the upgrade and loaded whatever was in other WebReport (257359)
What must be changed in code to make it work again?
Answers
-
an update (this new comment as previous one disappeared after I clicked on 'Edit' button to do corrections):
there was a sample in some other post where the ticket was provided explicitly by this code because it was insufficient just to be set in onReady3 parameters.
// Pre-authenticate the default connector session connector.authenticator.updateAuthenticatedSession({ ticket: [LL_REPTAG_OTCSTICKET QUOTE /] });
then adjusting my code it works when placed in WebReport which is set in Perspectives TileReport widget.
<script>
csui.onReady3({
connection: {
url: "[LL_REPTAG_URLPREFIXFULL /]/api/v1",
supportPath: "/[LL_REPTAG_SUPPORTDIR /]",
session: { ticket: [LL_REPTAG_OTCSTICKET QUOTE /] }
}
},[
'csui/lib/jquery',
'csui/controls/dialog/dialog.view',
'csui/utils/contexts/page/page.context',
'webreports/widgets/tilereport/tilereport.view',
'csui/utils/contexts/factories/connector',
],function($, DialogView, PageContext, TileReportView, ConnectorFactory){
var context = new PageContext();
const connector = context.getObject(ConnectorFactory);
// Pre-authenticate the default connector session
connector.authenticator.updateAuthenticatedSession({
ticket: [LL_REPTAG_OTCSTICKET QUOTE /]
});
var tileReportView = new TileReportView({
context,
data:{
id: 257359,
scroll: true,
header: false,
}
});
var dialog = new DialogView({
largeSize: true,
view: tileReportView,
title: 'test'
});
dialog.show();
context.fetch();
});
</script>But how to use same approach back in that Smart UI module?
There are no WebReport tags to provide the ticket.
Are there any options to get the access to the ticket in code in the Smart UI module to succeed the context.fetch() call?
0
Categories
- All Categories
- 122 Developer Announcements
- 53 Articles
- 151 General Questions
- 146 Thrust Services
- 56 OpenText Hackathon
- 35 Developer Tools
- 20.6K Analytics
- 4.2K AppWorks
- 9K Extended ECM
- 917 Cloud Fax and Notifications
- 84 Digital Asset Management
- 9.4K Documentum
- 31 eDOCS
- 179 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 9 XM Fax
- Follow Categories