Creating Custom Widgets Flashcards
Which one of the following is NOT a true statement about widget Client Scripts?
A. Maps server data from JavaScript and JSON objects to client objects
B. Gathers data from user inputs like input text, radio buttons, and check boxes
C. Processes data for rendering
D. Passes data to the HTML template
E. Passes user input and data to the server for processing
B. Gathers data from user inputs like input text, radio buttons, and check boxes
Which one of the following is NOT a true statement about widget Server Scripts?
A. Sets the initial widget state
B. Sends data to the widget’s Client Script using the data object
C. Works with record data, web services, and any other data available in ServiceNow server-side scripts
D. Specifies widget parameters
E. Runs server-side queries
D. Specifies widget parameters
Which of the following are widget Server Script Global Objects? More than one response may be correct. A. current B. widget C. data D. input E. options
C. data
D. input
E. options
Which of the following are true statements about widget clones? More than one response may be correct.
A. Clones are created every time a widget is added to a portal
B. Clones are copies of widget records
C. Baseline widgets cannot be edited and must be cloned to make changes
D. Clones are read-only
E. Any widget can be cloned
B. Clones are copies of widget records
C. Baseline widgets cannot be edited and must be cloned to make changes
E. Any widget can be cloned
Which one of the following best describes the Client Script global function this.server.update()?
A. Calls the server and posts this.data to the Server Script
B. Calls the server and automatically replaces the current options and data from the server response
C. Retrieves the options used to invoke the widget on the server
D. Calls the Server Script and passes custom input
E. Retrieves the serialized data object from the Server Script
A. Calls the server and posts this.data to the Server Script
Which of the following are classes in the Widget API? More than one response may be correct. A. recordWatch B. spUtil C. spModal D. spAriaUtil E. GlideSPScriptable
B. spUtil
C. spModal
D. spAriaUtil
E. GlideSPScriptable
Which of the following are widget debugging strategies? More than one response may be correct.
A. Log to console: $scope.data
B. console.log()
C. spModal.alert()
D. spUtil.addTrivialMessage()
E. Third-party browser-based debugging tools
A. Log to console: $scope.data B. console.log() C. spModal.alert() D. spUtil.addTrivialMessage() E. Third-party browser-based debugging tools
True or False? When multiple widgets are on a page, widget controllers are siblings.
This is a trick question because there is not enough information to know for sure. In most cases, the statement is true. In the case where one widget is embedded in another widget, the statement is false. Why does this matter? When emitting and listening for events, you need to know the relationship between the widgets.
Which of the following are true about widget options? More than one response may be correct.
A. Setting widgets option values affects all instances of a widget
B. Widget options are identical for all widget types
C. Portal users can change the widget option values
D. Developers can add widget options to the widget option schema
E. Reference is a valid data type for a widget option
D. Developers can add widget options to the widget option schema
E. Reference is a valid data type for a widget option
Which one the following best describes an Angular Providers? A. Directive B. Controller C. Widget API Class D. Event E. Function
A. Directive
Which the following are true statements about Record Watch? More than one response may be correct. A. Notifies tables when records are changed by widgets B. The recordWatch() method is part of the spUtil Widget API class C. Is automatically part of a widget's logic D. Registers a listener in a widget E. Notified when table records are inserted, updated, or deleted
B. The recordWatch() method is part of the spUtil Widget API class D. Registers a listener in a widget E. Notified when table records are inserted, updated, or deleted