...
The event is returning the object that has the changes and in case of a tab(sidebar-item), it’s returning the tabbar(sidebar). Besides that, you can also check the stateData from the object. StateData contains the state, value and action just like in the table below:
Property | Value |
---|---|
State | the name of the state (eg |
hasChanges, hasErrors) | |
Value | the value of the state (eg true/false) |
Action | the action is null (in a future version this will be used to specify if the state value was set or cleared (eg set/clear) |
Example:
Create a new typescript file for example “TestEventOnStateChanged.ts” and add the following code for testing.
Code Block |
---|
namespace akioma.osivabc.stammefg { export function TestEventOnStateChanged(object: any) { if (object.type == 'tabbar') { object = object.fetchPage(object.currentPageNum); } if (object.stateData && Object.keys(object.stateData).length !== 0) { console.log('The object and stateData', object, object.stateData); } } } |
Open a “Versicherte” like “Zukerhuat Terence” , open designer in external screen and add “$ akioma.osiv.stamm.TestEventOnStateChanged(eventSource);” for an input, the form, first tab and sidebar item and for the window.
...