Creating Custom Widgets Flashcards

1
Q

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

A

B. Gathers data from user inputs like input text, radio buttons, and check boxes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

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

A

D. Specifies widget parameters

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q
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
A

C. data
D. input
E. options

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

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

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

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

A. Calls the server and posts this.data to the Server Script

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q
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
A

B. spUtil
C. spModal
D. spAriaUtil
E. GlideSPScriptable

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

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
A. Log to console: $scope.data
B. console.log()
C. spModal.alert()
D. spUtil.addTrivialMessage()
E. Third-party browser-based debugging tools
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

True or False? When multiple widgets are on a page, widget controllers are siblings.

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

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

A

D. Developers can add widget options to the widget option schema
E. Reference is a valid data type for a widget option

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q
Which one the following best describes an Angular Providers?
A. Directive
B. Controller
C. Widget API Class
D. Event
E. Function
A

A. Directive

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q
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
A
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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly