Blocks and Events Flashcards
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.
D. A Block can only be reused once.
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.
C. Inside Screens and Blocks, except on itself.
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 Placeholder reserves space in the interface to be allocated when the block is instantiated.
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.
B. To receive data from the parent and use it within the Block.
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.
C. By using an input parameter in the Block.
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.
C. They allow you to create multiple instances of the Block with different content.
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.
C. To ensure that the Block’s functionality is independent of the parent’s.
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.
C. Using an event.
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.
B. A Block’s scope is limited to the current instance of the Block.
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 Block is a reusable UI component, while a Screen is not.
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. Events can be defined at the Block or Screen level. (False)
Events are only defined at the Block level.
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.
D. When the Event is set to mandatory.
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.
C. When the parent of the Block changes the value of at least one of the Block Input Parameters.
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.
C. Both the scope of the Block and the parent.
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.
C. To initiate the execution of the Event handler.