McDewey

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

Page 410

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

Description Parameters Name Displays a loading indicator message over the gadget. None <static> gadgets.loadingindicator.showLoading() Displays an error message over the gadget stating that the gadget failed to load, along with a Retry button. When the user clicks the Retry button, the container reloads the gadget. None <static> gadgets.loadingindicator.showRetry() Changes the message that appears when the gadget is loading. text (string)—Text to display as the loading message. <static> gadgets.loadingindicator.updateLoadingMessage(text) Changes the message that appears when the gadget loading times out. text (string)—Text to display when the gadget loading has timed out. <static> gadgets.loadingindicator.updateTimeoutMessage(text) Changes the message that appears on the Retry button. text (string)—Text to display on the Retry button. <static> gadgets.loadingindicator.updateRetryButtonText(text) Gadget Preferences The gadgets.Prefs class provides access to user preferences, module dimensions, and messages. Clients can access their preferences by constructing an instance of gadgets.Prefs (and optionally, passing in their module ID). Gadget preferences can then be set using the standard OpenSocial gadget APIs. var myPrefs = new gadgets.Prefs(); myPrefs.set(“counter”, count +1); In the Finesse Desktop, gadget preferences persist in the browser. After a gadget sets its preferences, anytime that gadget is constructed in the same browser, these preferences continue to be available through the APIs. var myPrefs = new gadgets.Prefs(); helloValue = myPrefs.getString(“hello”); Do not use preferences to persist critical application data. This data is stored in the browser and may be manually purged by the user at will. This storage is meant for preferences (similar to the type of information that is typically stored inside a cookie), and not for complex application data. Additionally, when the browser runs out of the allocated storage space, this data is purged. Note If special characters are expected in the value of the preference, they should be escaped inbound and unescaped outbound, as shown in the following example: var myPrefs = new gadgets.Prefs(), myPrefs.set("hello", gadgets.util.escapeString("!@#$%^&*()<>?"); … var myPrefs = new gadgets.Prefs(), helloValue = gadgets.util.unescapeString(myPrefs.getString("hello")); Cisco Finesse Web Services Developer and JavaScript Guide, Release 12.5(1) 394 Finesse Desktop Gadget Development Gadget Preferences