McDewey

Multi-vendor documentation library · semantic search · MCP endpoint at /mcp

Page 404

↗ View in doc context
page
404
source
finesse/v12.5/developer-guide/developer-guide.md
chunk_id
finesse::v12.5::developer-guide::developer-guide::388

<ModulePrefs> <Require feature="pubsub-2"></Require> <Require feature="setprefs"></Require> <Require feature="osapi"></Require> <Require feature="dynamic-height"></Require> </ModulePrefs> Example: Gadget with Title <ModulePrefs title="SampleGadget" description="Hello"> <Require feature="settitle"/> <Require feature="pubsub-2"></Require> <Require feature="setprefs"></Require> <Require feature="osapi"></Require> <Require feature="dynamic-height"></Require> </ModulePrefs> Import Finesse JavaScript API For gadgets to work properly, they need to import the Finesse JavaScript library hosted on the Finesse server. Hosting Third-Party Gadgets on Web Server To import the JavaScript library, the Finesse FQDN needs to be provided inside the import statement. For building the finesse.min.js URL, we need to retrieve the following properties from the gadget preferences: 1. scheme: https 2. hostname: FQDN of the Finesse server 3. port: port of the Finesse service These properties are inside the gadget preferences as part of Finesse container initialization. In your gadget XML: • Define the user preferences that will be used for building the finesse.min.js import statement. <UserPref name="scheme" display_name="scheme" default_value="" datatype ="hidden"/> <UserPref name="host" display_name="host" default_value="" datatype ="hidden"/> <UserPref name="hostPort" display_name="hostPort" default_value="" datatype ="hidden"/> • Import the finesse.min.js file. <script type="text/javascript" src="UP_scheme://UP_host:UP_hostPort/desktop/assets/js/finesse.min.js"> </script> Hosting Third-Party Gadgets on Finesse Server Third-party gadgets can be hosted on the Finesse server inside the 3rdpartygadget directory. See Upload Third-Party Gadgets, on page 410. Since the third-party gadget is hosted on the Finesse server, you can import the Finesse JavaScript API with a relative URL. <script type=”text/javascript”src=”/desktop/assets/js/finesse.min.js”></script> Cisco Finesse Web Services Developer and JavaScript Guide, Release 12.5(1) 388 Finesse Desktop Gadget Development Import Finesse JavaScript API