Interaction between the no webmap added Form and the WebMap components
To make easier the interactions between the migrated app and the no webmap components, a service has been added to the FrontEnd, it’s called ClientCustomUpdateService. This can be used to tell a migrated form to make some refresh or change properties of other components inside the form.
For this is necessary to also add a specific event on the C# code called RefreshCustomClientChanges
And in the FrontEnd added component, call the service like the next example:
Is very important to add the next input to the window we want to refresh:
This should be a unique identifier.
Known limitations
Accessing the WebMap state from the Custom controllers isn’t possible. The custom API requests can't access information for the migrated windoww or components to change models or properties. For this is used the RefreshCustomClientChanges method.
A custom unique identifier is needed for all the migrated Forms that need interaction to refresh or change something from the C# code
Communication with custom properties betwen WebMap and NoWebMap forms
Send properties from WebMAP to NoWebMAP
For this cases, the communication can be made in any way using Angular, for example, services, route params or the router state. The following example shows how to do it using the state:
After that we receive it anywhere
Note: It is important to know that the state needs to be set in the component's constructor.
Send properties from NoWebMAP to WebMAP
If we want to send properties to the WebMAP app, we use the existing refreshComponentService, but we modify the event to have the customArgs property.
After that, you only have to access the property in the Backend handler associated with the RefreshClientCustomChanges event.
The CustomArgs has a helper that returns the property we need with the correct type: String, Integer, Float or Boolean, you just need to call the method with the property path, like the one GetJsonBooleanValue in the previous image.
CustomArgs with internal objects structure:
If we have something like this you just need to send the correct path. For example, if you want to get the product name:
Last updated