Blocks and Events Flashcards

1
Q

In OutSystems, a Block is a reusable UI component. Which of the following is NOT correct?

A. A Block promotes reusability, i.e. develop once, reuse many times.
B. A Block encapsulates its own logic.
C. A Block improves maintainability, i.e., change the design or functionality, affect all usages.
D. A Block can only be reused once.

A

D. A Block can only be reused once.

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

A Block can be used…
A. Only inside other Screens.
B. Inside Screens and Blocks, including itself.
C. Inside Screens and Blocks, except on itself.
D. Only inside other Blocks.

A

C. Inside Screens and Blocks, except on itself.

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

Regarding Placeholders, which of the following options is correct?

A. A Placeholder reserves space in the interface to be allocated when the block is instantiated.
B. When a Block with Placeholders is instantiated, it is mandatory to place at least one widget inside the placeholders.
C. Placeholders can be added to Screens and Blocks.
D. Only one placeholder may be added per Block.

A

A. A Placeholder reserves space in the interface to be allocated when the block is instantiated.

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

What is the primary purpose of input parameters within a Block?

A. To send data from the Block to its parent.
B. To receive data from the parent and use it within the Block.
C. To define the structure of the Block’s interface.
D. To control the visibility of the Block.

A

B. To receive data from the parent and use it within the Block.

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

How can you pass data from a Screen to a Block that it contains?

A. By using a variable in the Screen’s scope.
B. By using a placeholder within the Block.
C. By using an input parameter in the Block.
D. By using a screen action in the Screen.

A

C. By using an input parameter in the Block.

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

Which of the following is a benefit of using Placeholders in Blocks?

A. They allow you to add dynamic content to the Block at runtime.
B. They simplify the process of creating input parameters.
C. They allow you to create multiple instances of the Block with different content.
D. They allow you to control the visibility of the Block.

A

C. They allow you to create multiple instances of the Block with different content.

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

Why is it important to avoid direct access to the parent scope from within a Block?

A. To prevent code duplication.
B. To promote better code organization.
C. To ensure that the Block’s functionality is independent of the parent’s.
D. To improve the performance of the Block.

A

C. To ensure that the Block’s functionality is independent of the parent’s.

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

How can you communicate information from a Block back to its parent Screen?

A. Using input parameters.
B. Using a placeholder.
C. Using an event.
D. Using a screen action.

A

C. Using an event.

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

Which of the following statements about the “Scope” of a Block is TRUE?

A. A Block’s scope is limited to the Screen that it is contained within.
B. A Block’s scope is limited to the current instance of the Block.
C. A Block’s scope is limited to the module it is created within.
D. A Block’s scope is limited to the specific instances of the Block.

A

B. A Block’s scope is limited to the current instance of the Block.

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

What is the main difference between a Screen and a Block in OutSystems?

A. A Block is a reusable UI component, while a Screen is not.
B. A Screen can have input parameters, while a Block cannot.
C. A Block can have placeholders, while a Screen cannot.
D. A Screen is a user interface element, while a Block is not.

A

A. A Block is a reusable UI component, while a Screen is not.

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

Regarding Block Events, which of the following options is false?

A. Events can be defined at the Block or Screen level.
B. Events allow to pass information from the Block’s scope to the parent scope.
C. Events are triggered by a Block and handled by its parent.
D. Two instances of a Block may use the same handler for the same event.

A

A. Events can be defined at the Block or Screen level. (False)

Events are only defined at the Block level.

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

In which of the following situations is it necessary to define a handler for a Block Event?

A. When the event has Input Parameters.
B. When the Block has Placeholders.
C. When the event Input Parameters are all mandatory.
D. When the Event is set to mandatory.

A

D. When the Event is set to mandatory.

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

In which of the following situations is the On Parameters Changed Event triggered?

A. If the value of a Block Input Parameters changes inside a Client Action of the Block.
B. The On Parameters Changed must be explicitly triggered by the parent of the Block
C. When the parent of the Block changes the value of at least one of the Block Input Parameters.
D. When an aggregate inside the Block finishes fetching data.

A

C. When the parent of the Block changes the value of at least one of the Block Input Parameters.

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

When handling an Event, which scope does the handler have access to?

A. Only the scope of the Block where the event is triggered.
B. Only the scope of the parent where the event is handled.
C. Both the scope of the Block and the parent.
D. None, the handler only has access to its own local variables.

A

C. Both the scope of the Block and the parent.

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

What is the purpose of the Trigger Event element in a Block’s logic?

A. To define a new Block Event.
B. To handle an Event triggered by the parent.
C. To initiate the execution of the Event handler.
D. To pass data from the parent to the Block.

A

C. To initiate the execution of the Event handler.

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

Which statement is TRUE about Input Parameters of a Block Event?

A. They can be used to send data from the parent to the Block.
B. They allow the handler to modify the Block’s properties directly.
C. They are required for all Block Events, mandatory or not.
D. They are used to define the conditions under which the event is triggered.

A

A. They can be used to send data from the parent to the Block. (False)

Input parameters are used to send data from the Block to the parent.

16
Q

In Demo 1, how is the parent notified that the content of the FlipContent Block has flipped?

A. Through a change in the value of a Block Input Parameter.
B. Through the execution of a Screen Action inside the Block.
C. Through the OnFlip Event, which carries the IsFlipped value.
D. Through a notification displayed to the user.

A

C. Through the OnFlip Event, which carries the IsFlipped value.

16
Q

In Demo 2, why was an error displayed after adding the Event to the Block?

A. Because the event was not set to mandatory.
B. Because the event did not have any input parameters.
C. Because the event was not being handled by the parent.
D. Because the event was triggered inside a Client Action.

A

C. Because the event was not being handled by the parent.

17
Q

What type of element is used to handle a Block Event on the parent?

A. A Server Action.
B. A Client Action.
C. A Block.
D. An Aggregate.

A

B. A Client Action.

18
Q

What is the key difference between Block Events and the On Parameters Changed event?

A. Block Events are triggered by user actions, while On Parameters Changed is triggered by system events.
B. Block Events are defined by the developer, while On Parameters Changed is a built-in event.
C. Block Events can only be used with UI Blocks, while On Parameters Changed can be used with any Block.
D. Block Events can be mandatory or non-mandatory, while On Parameters Changed is always mandatory.

A

B. Block Events are defined by the developer, while On Parameters Changed is a built-in event.

19
Q

Why is it important for a Block and its parent to have separate scopes?

A. To improve application performance by isolating data and logic.
B. To enhance security by preventing unauthorized access to data.
C. To maintain code organization and prevent variable naming conflicts.
D. All of the above.

A

D. All of the above.

20
Q

If a Block Event is triggered but its handler is empty, what will happen?

A. The application will crash.
B. The event will be ignored, and the application will continue executing.
C. The Block will be hidden from the user interface.
D. A default action will be performed, depending on the type of event.

A

B. The event will be ignored, and the application will continue executing.

21
Q

How can you ensure that a specific Block Event is always handled by the parent?

A. By setting the Event to mandatory.
B. By adding an Input Parameter to the Event.
C. By triggering the Event inside a Server Action.
D. By using the OnReady event instead of a custom Block Event.

A

A. By setting the Event to mandatory.

22
Q

What is the significance of the IsFlipped input parameter in the OnFlip event of the FlipContent block?

A. It indicates whether the content is currently flipped or not.
B. It determines the duration of the flip animation.
C. It specifies the direction of the flip (horizontal or vertical).
D. It controls the visual style of the flipped content.

A

A. It indicates whether the content is currently flipped or not.

22
Q

Which of the following scenarios is NOT a suitable use case for a Block Event?

A. Notifying the parent screen when a user clicks a button inside a block.
B. Updating a data grid on the parent screen based on a selection made within a block.
C. Performing calculations within a block that only affect the block’s internal logic.
D. Displaying a modal popup on the parent screen when an error occurs within a block.

A

C. Performing calculations within a block that only affect the block’s internal logic.

Block Events are meant for communication between a block and its parent, not for internal operations within the block.

23
Q

In OutSystems, where is the Event Handler defined when handling an event triggered by a block?
A) Inside the block’s scope
B) At the parent level as a Screen Action
C) Inside the block’s logic flow
D) Directly in the block’s UI elements

A

B

24
Q
A