Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@UI.PartOfPreview
annotation solutionOptions for lazy loading in the UI for Change History
We want to lazy load the Change History table on a Fiori Object Page as this table can have a large number of entries which we only want to see/search on demand.
Requirements
In implementing this, we have the following restrictions:
We are restricting ourselves to an Object Page:
Unlike the Go Button from the List Report Page, an Object Page treats lazy loading different according to the number of items, where the Change History table would fall into the last category (as marked by ➡️ ):
We are restricting ourselves to using only Fiori annotations
That means, no changes to the manifest.json, which contains most of the controls that we need, such as navigating to a separate Page (component), using another template (List Report), etc. that would support the extra features we need.
In general, any solution we take should not violate the Fiori guidelines and stick to the possible (existing/customized) features of the floorplan (see Object Page) as designed.
Possible solutions
To implement a solution within the realm of requirements (from above), we can only do two more things to influence the table loading: By showing/hiding the entire table or by implementing a button that only loads the data for that table on demand.
i. Using
@UI.PartOfPreview
ii. Using
@UI.Hidden
on facetii. Using
@UI.Hidden
on columnsiii. Using an Action to set
$skip
,$top
i. Using
@UI.PartOfPreview
Disabling
@UI.PartOfPreview
hides the facet initially:Provides the buttons Show More/Show Less Buttons to show/hide it on demand:
Important
COULD USE as long as filter/search erroneous behavior is fixed on page refresh
Could this be due to the following restriction on facet target?
ii. Using
@UI.Hidden
on facetHiding the entire facet will stop data from loading automatically. We would then need an action button at the top of the Object page to toggle (show/hide) the facet on demand.
Important
COULD USE as long we can set
@UI.Hidden
dynamically so that the Table as the button is pressed.iii. Using
@UI.Hidden
on columnsHiding all columns does not have this issue (we still have a button), but the user might wonder why there are no default columns set to display:
Warning
SHOULD NOT USE due to misleading message in the UI (we cannot change this text)
vi. Using an Action to set
$skip
,$top
We display the table by default but initially set
$top = 0
. On pressing an action button "Show Changelogs", we could send a request to OData to retrieve the data, but with extra parameters that reset$top
/$skip
to their defaults. The user might still be confused by the default message 'No items available'.Warning
SHOULD NOT USE, as it interferes with standard OData calls.