> For the complete documentation index, see [llms.txt](https://docs.gapvelocity.ai/webmap/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.gapvelocity.ai/webmap/winforms/extend-or-modify-the-converted-application/nowebmap-forms-winforms/interaction-between-the-no-webmap-added-form-and-the-webmap-components.md).

# 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

<figure><img src="/files/jCMQBCeEW6eCSopq7BdD" alt=""><figcaption><p>Binding the event to the exisiting form on C#</p></figcaption></figure>

<figure><img src="/files/W07zzWN2kgimn9kmSqiO" alt=""><figcaption><p>Method called by the event</p></figcaption></figure>

And in the FrontEnd added component, call the service like the next example:

<figure><img src="/files/5fjiVZb9XyBVZajEXisW" alt=""><figcaption><p>Calling the service to refresh a existing window</p></figcaption></figure>

**Is very important to add the next input to the window we want to refresh:**

<figure><img src="/files/IoBotIfL8qXER8XwDLkQ" alt=""><figcaption><p>Adding the input to a wmwindow we want to refresh or change from the added component</p></figcaption></figure>

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:<br>

<figure><img src="/files/5O4gLwDHPBJvcul4pJS0" alt=""><figcaption><p>The SelectedCustomersIds is property is set from the WebMAP form.</p></figcaption></figure>

After that we receive it anywhere

<figure><img src="/files/NSw1MFarPjvq6W3G8Ov6" alt=""><figcaption><p>We save the state and call the getStateParams.</p></figcaption></figure>

<figure><img src="/files/inGSr17TdTqmxfy2QsB4" alt=""><figcaption><p>We access the property.</p></figcaption></figure>

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.

<figure><img src="/files/FqTsPGCpgyigei6umVo3" alt=""><figcaption><p>We add properties to the customArgs object.</p></figcaption></figure>

After that, you only have to access the property in the Backend handler associated with the RefreshClientCustomChanges event.

<figure><img src="/files/RVV9Td8GFPYI93Vk25pm" alt=""><figcaption><p>Access the property in the CustomArgs object.</p></figcaption></figure>

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:

```json
CustomArgs: {
    Name: "Josh",
    Id: "123-abc",
    Product: {
        Name: "Apple"
    }
}
```

If we have something like this you just need to send the correct path. For example, if you want to get the product name:

```csharp
eventArgs.CustomArgs.GetJsonStringValue("Product/Name");
```
