The documentation applies to: v0.8.0
State Management - Combination on Page¶
For an idea of manipulating data on Page, we use a State Management for handling the changes. Basically, we need to ensure no concurrent changes to update a
On an initial step, we will get the datasources for Page. These datasources must have an unique name.
data is a key name which we store in State Management. Thus a combination of datasources is following the screenshot below:
If you access to State Management, you need to access via
data will be used everywhere on LET Portal. Thus you know clearly about a combination above, you won't get any trouble on another document.
State Management - Standard Array on Page¶
On Standard Array, if
allowupdateparts option is
data will store two groups as
data will store four groups such as
So let's explain about the
allowupdateparts option. This options is used to indicate a proccess way of array data:
false: means you want to remove all and then insert all, so that you have two groups
removes. LP will help you to maintain two groups until user submits. Usage: very usefull for non-reference children, means a child doesn't have any external reference to this.
true: means you want to update a few children, remove few children and insert a few children. So that you have four groups
updates. Usage: very useful for optimizing performance, and a child has external references to this.
fresh: contains all initial children data that are received from datasource. After that, each action on array will move one item from this list to
updatesregarding action type.
inserts: When user add one item, it will be added into this group
removes: When user remove one item, it will be added into this group
updates: When user update one item which has been on
fresh, it will be moved to this group. Otherwise, a new item on
insertswill be updated instead.
We will discuss later about how to use these groups on Page Button.
State Management supports only Standard section, we don't find any use-cases for Dynamic List or Chart. If you have any idea, please feedback to us.