GRID

 0    46 schede    radoslawgadowski
Scarica mp3 Stampa Gioca Testa il tuo livello
 
Domanda English Risposta English
Example of grid initialization
inizia ad imparare
"type": "grid", "label": "Simple View Grid", "id": "simpleGridWorker", "rows": "<% workersEndpoint. data %>", "rowVariableName": "thisRow", "columns": [
What must the inbound endpoint used by rows return?
inizia ad imparare
A list containing the data elements to display as grid rows.
What is the purpose of rowVariableName?
inizia ad imparare
It defines a variable representing the data element for the current row.
Can columns and dynamicColumns be used together?
inizia ad imparare
No. They are mutually exclusive.
Can columns and dynamicColumns be used together?
inizia ad imparare
No
Dynamic Columns - What information should column metadata contain?
inizia ad imparare
At minimum, information such as the column ID, label, type, and data field.
Example of DynamicColumns
inizia ad imparare
"rows": "<% workersEndpoint. data %>", "dynamicColumns": {"type": "dynamicColumns", "columns": "<% [{'name': 'Name',
What does attributeName define?
inizia ad imparare
The field path in the row data whose value should be displayed in the generated column.
Does a grid paginate data by default?
inizia ad imparare
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?
inizia ad imparare
autoPaging and pagingInfo
Can autoPaging and pagingInfo be used together?
inizia ad imparare
No. They are mutually exclusive.
When should autoPaging be used?
inizia ad imparare
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?
inizia ad imparare
When there are more than 50 rows of results on a view page.
How many rows are initially displayed with autoPaging?
inizia ad imparare
The first 50 rows.
What happens when the user scrolls down with autoPaging enabled?
inizia ad imparare
The grid calls the endpoint again to load more results.
Why isn't autoPaging recommended for slow endpoints?
inizia ad imparare
Because the endpoint may be called multiple times as the user scrolls.
When should pagingInfo be used?
inizia ad imparare
When the endpoint itself returns paginated data.
Which required attribute identifies the paginated endpoint?
inizia ad imparare
pagingInfo. endPoint.
What must the endpoint used by pagingInfo support?
inizia ad imparare
limit and offset paging parameters.
Which variables are used to pass paging values between requests?
inizia ad imparare
pagingVariables. limit and pagingVariables. offset
What should the initial pagingVariables. limit typically be?
inizia ad imparare
The example initializes it to 100.
What should the initial pagingVariables. offset typically be?
inizia ad imparare
0
What happens when the user scrolls beyond the currently fetched data?
inizia ad imparare
Subsequent requests automatically update pagingVariables. offset.
What does pagingInfo. rowCount represent?
inizia ad imparare
The total number of items returned by the endpoint, typically the total field.
What does pagingInfo. data represent?
inizia ad imparare
The paginated list of data returned by the endpoint, typically the data field.
What type of variables are pagingVariables. limit and pagingVariables. offset?
inizia ad imparare
They are string variables.
Example of paginated endpoint
inizia ad imparare
"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
inizia ad imparare
{"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?
inizia ad imparare
The widgets in the grid become editable, allowing users to add or modify row data.
What attribute controls whether users can add rows?
inizia ad imparare
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?
inizia ad imparare
Check whether its row ID is empty or non-empty.
Example of valueOutBinding
inizia ad imparare
{"type": "column", "columnId": "expenseIdColumn", "label": "Expense ID", "cellTemplate": {"type": "text", "id": "entryId", "value": "<% rowdata. id %>", "valueOutBinding": "putExpense. id",
example of valueOfBinding and ValuesOut
inizia ad imparare
{"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?
inizia ad imparare
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?
inizia ad imparare
onRowAdd, Example: "rowVariableName": "rowdata", "onRowAdd": "<% updateTotalQuantity() %>",
What event handles row deletion?
inizia ad imparare
onRowRemove, "rowVariableName": "rowdata", "onRowAdd": "<% updateTotalQuantity() %>", "onRowRemove": "<% updateTotalQuantity() %>",
What is the typical position of a newly added row when showRowMover is false?
inizia ad imparare
At the top of the grid.
How do you get the number of rows in a grid?
inizia ad imparare
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?
inizia ad imparare
Set isArrayOutBinding to true.
What else is required when using isArrayOutBinding: true?
inizia ad imparare
Each column's cellTemplate should use an array-style valueOutBinding, for example: someOutboundEndpoint. someDataArray[]. someField
What happens when isArrayOutBinding = false
inizia ad imparare
Rows are submitted in separate requests, one request per row.
How do you submit only selected rows?
inizia ad imparare
Use the outbound endpoint's onSend event handler.
How do you determine whether the current row is selected?
inizia ad imparare
currentRowVariable. selected
What does self. data contain in an onSend handler?
inizia ad imparare
The data generated from the grid's valueOutBinding values.
What must isArrayOutBinding be when using currentRowVariable in onSend?
inizia ad imparare
It must be false.
Can currentRowVariable be used in a valueOutBinding with PMD Scripting?
inizia ad imparare
No

Devi essere accedere per pubblicare un commento.