GRID

 0    46 flashcards    radoslawgadowski
download mp3 print play test yourself
 
Question English Answer English
Example of grid initialization
start learning
"type": "grid", "label": "Simple View Grid", "id": "simpleGridWorker", "rows": "<% workersEndpoint. data %>", "rowVariableName": "thisRow", "columns": [
What must the inbound endpoint used by rows return?
start learning
A list containing the data elements to display as grid rows.
What is the purpose of rowVariableName?
start learning
It defines a variable representing the data element for the current row.
Can columns and dynamicColumns be used together?
start learning
No. They are mutually exclusive.
Can columns and dynamicColumns be used together?
start learning
No
Dynamic Columns - What information should column metadata contain?
start learning
At minimum, information such as the column ID, label, type, and data field.
Example of DynamicColumns
start learning
"rows": "<% workersEndpoint. data %>", "dynamicColumns": {"type": "dynamicColumns", "columns": "<% [{'name': 'Name',
What does attributeName define?
start learning
The field path in the row data whose value should be displayed in the generated column.
Does a grid paginate data by default?
start learning
No. By default, it displays as much data as the client can handle without pagination.
Which two attributes can be used to configure grid paging?
start learning
autoPaging and pagingInfo
Can autoPaging and pagingInfo be used together?
start learning
No. They are mutually exclusive.
When should autoPaging be used?
start learning
With fast endpoints that don't support paging and return large volumes of data in a single call.
When does autoPaging start loading additional data?
start learning
When there are more than 50 rows of results on a view page.
How many rows are initially displayed with autoPaging?
start learning
The first 50 rows.
What happens when the user scrolls down with autoPaging enabled?
start learning
The grid calls the endpoint again to load more results.
Why isn't autoPaging recommended for slow endpoints?
start learning
Because the endpoint may be called multiple times as the user scrolls.
When should pagingInfo be used?
start learning
When the endpoint itself returns paginated data.
Which required attribute identifies the paginated endpoint?
start learning
pagingInfo. endPoint.
What must the endpoint used by pagingInfo support?
start learning
limit and offset paging parameters.
Which variables are used to pass paging values between requests?
start learning
pagingVariables. limit and pagingVariables. offset
What should the initial pagingVariables. limit typically be?
start learning
The example initializes it to 100.
What should the initial pagingVariables. offset typically be?
start learning
0
What happens when the user scrolls beyond the currently fetched data?
start learning
Subsequent requests automatically update pagingVariables. offset.
What does pagingInfo. rowCount represent?
start learning
The total number of items returned by the endpoint, typically the total field.
What does pagingInfo. data represent?
start learning
The paginated list of data returned by the endpoint, typically the data field.
What type of variables are pagingVariables. limit and pagingVariables. offset?
start learning
They are string variables.
Example of paginated endpoint
start learning
"endPoints": [{"baseUrlType": "workday-staffing", "name": "workersPagedEndpoint", "authType": "sso", "url": "<% var limit = pagingVariables. limit?: 100; var offset = pagingVariables. offset?: 0; '/workers? limit=' + limit + '&offset=' + offset;
Example of Pagination Info
start learning
{"type": "grid", "label": "Wrkrs", "rows": "<% wrkrsPgdNdpnt. data %>", "rowVariableName": "wrkr", "pagingInfo": {"endPoint":"<%ndPnts. wrkrsPgdNdpint%>", "rowCount":"<%wrkrsPgdNdpnt. total%>", "data":"<%wrkrsPgdNdpnt. data%>"}, "columns": [
What happens when a grid is placed on an edit page?
start learning
The widgets in the grid become editable, allowing users to add or modify row data.
What attribute controls whether users can add rows?
start learning
doNotAdd - If false, the user can add a row on top of the grid.
How can you distinguish a new row from an existing row?
start learning
Check whether its row ID is empty or non-empty.
Example of valueOutBinding
start learning
{"type": "column", "columnId": "expenseIdColumn", "label": "Expense ID", "cellTemplate": {"type": "text", "id": "entryId", "value": "<% rowdata. id %>", "valueOutBinding": "putExpense. id",
example of valueOfBinding and ValuesOut
start learning
{"type": "column", "columnId": "clmn", "label": "lb", "cellTemplate": {"type": "text", "id": "expenseDate", "value": "<%test. value%>", "valuesOut": [{"value": "<% self. value %>", "valueOutBinding": "postExpense. date"},
When use ValuesOut for Grid?
start learning
For all other non-ID columns, use valuesOut to specify valueOutBinding with data for both the POST and PUT (or PATCH) outbound endpoints.
What event handles a new grid row?
start learning
onRowAdd, Example: "rowVariableName": "rowdata", "onRowAdd": "<% updateTotalQuantity() %>",
What event handles row deletion?
start learning
onRowRemove, "rowVariableName": "rowdata", "onRowAdd": "<% updateTotalQuantity() %>", "onRowRemove": "<% updateTotalQuantity() %>",
What is the typical position of a newly added row when showRowMover is false?
start learning
At the top of the grid.
How do you get the number of rows in a grid?
start learning
Use the size() method on the grid's rows property: expenseGrid. rows. size()
How can you submit all grid rows in one outbound request as an array?
start learning
Set isArrayOutBinding to true.
What else is required when using isArrayOutBinding: true?
start learning
Each column's cellTemplate should use an array-style valueOutBinding, for example: someOutboundEndpoint. someDataArray[]. someField
What happens when isArrayOutBinding = false
start learning
Rows are submitted in separate requests, one request per row.
How do you submit only selected rows?
start learning
Use the outbound endpoint's onSend event handler.
How do you determine whether the current row is selected?
start learning
currentRowVariable. selected
What does self. data contain in an onSend handler?
start learning
The data generated from the grid's valueOutBinding values.
What must isArrayOutBinding be when using currentRowVariable in onSend?
start learning
It must be false.
Can currentRowVariable be used in a valueOutBinding with PMD Scripting?
start learning
No

You must sign in to write a comment