I have a question regarding triggerEvent and UiConnect.
What is your proposed way of implementing an information exchange between panels which are loaded within a MasterModule with several SubModules using the "triggerEvent" functionality. (In previous WinCC versions, the internal _UI Datapoint was usually used for information exchange, which of course has a lot of limitations and disadvantages like not being able to pass on complex datatypes).
Please consider the following example

I have a module M1 which again contains two modules M1A and M1B (i.e. panels which only contain a module).
Module M1A contains a Panel "M1AP1", which loads 4 Panels dynamically using "addSymbol" on init (lets call them M1AP1S1 to M1AP1S4). Furthermore there is a button "Button1" in M1. M1B just contains another Panel M1BP1, which is not to be further considered in this example.
Now lets assume all involved panels have the same event
Code: Select all
#event onDataChanged(string data)
Lets say I want to transfer information from M1AP1S4 to M1 (and vice versa) using the triggerEvent function (e.g. assuming M1AP1S4 is some kind of a selectable setting I want to set with Button1).
UseCase U2:
Transfer information from M1AP1S4 to M1AP1S3 using the triggerEvent function
Questions:
- If I understood it correctly, when being in the scope of M1AP1S4 there is no way to directly trigger the event in M1, correct?
- If the direct triggering is not possible, it would require some kind of a chain-of-responsibility, which passes each data on to its parent and to its children until it finds its final recipient
- So, if I can only trigger events in my own panel scope, I would need my parent panel and all my childPanels to "uiConnect" to my #event and I would need to connect to my parents panel #event (if existing), correct? (In this case, I would need to pass on my Panel name to my Children)
- As a result, all involved panels need to have an #event and to have a "onDataChanged" function which is triggered whenever one of my childPanels or my parent Panel triggers an event
- Considering useCase U2, I would need to trigger the event in M1AP1S4, which is then passed on to the parent panel M1AP1, which then triggers its #event, which passes the data to M1A (where its actually not needed), M1AP1S1,M1AP1S2, M1AP1S3 and of course also to M1AP1S4 (where it should not trigger an event again, maybe by using some kind of identifier)
Please let me know if my assumptions are correct or if there is a different way I did not consider.
Thanks!