GRID

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

Vous devez vous connecter pour poster un commentaire.