Hi,
I noticed that my 10.5 CS UI Widget javascript implementation is not comptible with the V16 version.
On KC there in no documentation on this like there is for 10.5 here:
https://knowledge.opentext.com/knowledge/llisapi.dll?func=ll&objId=57082486&objAction=browse&viewType=1
Anyone have ideas on this?
With regards
Sander
SDK for CS UI Widgets for CS16 is planned to be released with the CS16 2016/12 (December) update. It will include documentation, samples and also instructions, how to upgrade your custom pages.
Basically, JavaScript objects should keep their interface, as far as we were able to implement it with the new UI design. Before the SDK is released, you can try using your current code and replace just the script and styesheet links on your page:
<script src="//server/otcs/cs/widgets?crossOrigin=true"></script><link rel="stylesheet" href="//server/otcssupport/csui/themes/carbonfiber/theme.css">
Hi Ferdinand,
I changed the reference you suggested but the call to the FolderBrowseWidget breaks when trying to create an instance of the connector object: See attachment for details.
How can I create an instance of the connector?
csui.util.Connector has been available since CS16 release as compatimility with CS10.5 UI Widgets. Your sample should work. I tried it against a testing server. What is the content of the csui object, which you see in the console?
I am a step further using your sample code however I immediately receive an 'session has expired' error.
I looked into the cs thread log en otds log but fail to see the cause. Please see attachment.
Any ideas?
with regards,
This error occurred, because Basic Authentication doesn't work in CS16 REST API anymore. As a consequence, CS UI Widgets stopped supporting the hardcoded credentials:
credentials: { username: '...', password: '...',}
The integrator has to obtain OTCSTicket or OTDSTicket, before a connector gets created.
Other means of authentication can be added later based on feedback, but the initial release supports web portals, where the web page is generated on the server side and the developer can obtain an authentication token on the server side and supply it to the widget, when the code with the widget is generated on the page.
I tried to pass the otds ticket through the session parameter (as per documentation in the 10.5 version) and ommited the credential parameter but get no result. Should I pass the key in the credential parameter somehow?
Current code:
<script> //Set loglevel csui.setLogging({ console: true, window: false, page: false, level: "DEBUG" }); // Edit the connection parameters to point to your server var serverOrigin = 'http://localhost', cgiUrl = serverOrigin + '/otcs16/llisapi.dll', supportUrl = serverOrigin + '/img', credentials = { username: 'otadmin@otds.admin', password: '!Livelink123' //username: 'sander.hofman', //password: 'Barcelona!234' }, startNode = {id: 2000}; csui.onReady(function () { var connector = new csui.util.Connector({ connection: { url: cgiUrl + '/api/v1', supportPath: supportUrl //,credentials: credentials session: { ticket: 'CwXE0L41LGhQTPFY2VOwV4ZOMIXXcs7KLtp7OtuzCpRNdnuVnvowvNGbicbWJEiwdLhmHDszoLH%2BMS4uPpn16oke3eYLBusd' } }, start: startNode }), browser = new csui.widget.FolderBrowserWidget({ connector: connector, start: startNode }); browser.show({placeholder: '#browser'}); });
</script>
I'm not sure if we documented correctly, how to use various authentication headers. The parameter session.ticket has to contain only the authentication ticket native to CS REST API obtained by GET /auth. If you have other tickets like OTDSTicket, MYSAPSSO2 or some other header which is accepted by some login callback on CS, you need to pass it inside options.authenticationHeaders:
connection: { url: cgiUrl + '/api/v1', supportPath: supportUrl authenticationHeaders: { OTDSTicket: '...' } },
Make sure, that as soon as you can obtain the native ticket, you use it. Other tickets may have worse performance. Every CS REST API call returns a fresh native ticket, which you can use in following calls to prevent ticket expiration. The ticket is returned as response header OTCSTicket and can be passed to connection options as session.ticket or authenticationHeaders.OTCSTicket.
Correction: supportPath should be a path only; hot the full URL:
supportPath: '/img'