# Any way to have a custom editor on an AlarmProperty?

**URL:** <https://forum.inductiveautomation.com/t/any-way-to-have-a-custom-editor-on-an-alarmproperty/92267>\
**Category:** Module Development\
**Tags:** ignition81\
**Created:** [June 24, 2024, 1:09am UTC](https://forum.inductiveautomation.com/t/any-way-to-have-a-custom-editor-on-an-alarmproperty/92267 "2024-06-24T01:09:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ron\_Beyer](https://avatars.discourse-cdn.com/v4/letter/r/d07c76/32.png) [@Ron\_Beyer](https://forum.inductiveautomation.com/u/Ron_Beyer)\
**Post date:** [June 24, 2024, 1:09am UTC](https://forum.inductiveautomation.com/t/any-way-to-have-a-custom-editor-on-an-alarmproperty/92267/1 "2024-06-24T01:09:15Z")

</div>

I'm trying to have a custom editor (the "\_\_tagPath" editor) on an alarm property being provided by my module, but it doesn't seem there is a way to do this (or at least I'm not seeing it).

The `AlarmManager.registerExtendedConfigProperties` seems to take an `AlarmProperty`, which super's `DescriptiveProperty`, something that `ConfigurationProperty` also has, so I thought I could create a new `BasicAlarmConfigurationProperty` that extends `BasicAlarmProperty` and implements `ConfigurationProperty` and pass that in. If I do that, when creating a tag I get an error:

```python
ExecutionException: com.inductiveautomation.ignition.client.gateway_interface.GatewayException: java.lang.RuntimeException: Error cloning object through serialization.
	caused by GatewayException: java.lang.RuntimeException: Error cloning object through serialization.
	caused by ExecutionException: java.lang.RuntimeException: Error cloning object through serialization.

```

This is the complete class:

```python
public class BasicAlarmConfigurationProperty<T> extends BasicAlarmProperty<T> implements ConfigurationProperty<T>, Serializable {

    List<ConfigurationProperty.Option<T>> options = null;
    ConfigurationProperty.CustomEditorDescriptor editor = null;
    String baseKey = null;

    public BasicAlarmConfigurationProperty() {}
    public BasicAlarmConfigurationProperty(AlarmProperty<T>base, String displayKey) {
        super(base, displayKey);
    }
    public BasicAlarmConfigurationProperty(String name, Class<T> type, T defaultVal, String displayKey,
                                           String categoryKey, String descKey, boolean bindable, boolean advanced,
                                           String editorKey) {
        super(name, type, defaultVal, displayKey, categoryKey, descKey, bindable, advanced);
        setCustomEditor(new ConfigurationProperty.CustomEditorDescriptor(editorKey));
    }

    public void setCustomEditor(ConfigurationProperty.CustomEditorDescriptor desc) {
        editor = desc;
    }

    public void setOptions(List<ConfigurationProperty.Option<T>> options) {
        this.options = options;
    }

    @Override
    public Optional<List<Option<T>>> getOptions() {
        return Optional.ofNullable(options);
    }

    @Override
    public Optional<CustomEditorDescriptor> getCustomEditor() {
        return Optional.ofNullable(editor);
    }

    @Override
    public Optional<String> getValueDisplayBaseKey() {
        return Optional.empty();
    }
}

```

Is there a way to do this? The end use here is that I'd like to pick an associated tag that reflects the alarm status back into the data source (for example, keeping alarm generation in the HMI but copying the status in the PLC). I'd like the property to include a tag browser similar to how the Reference Tag's source works.

Definition of the property:

```python
public class AlarmProperties {

    public static final BasicAlarmProperty<String> REMOTE_STATE = new BasicAlarmConfigurationProperty<>(
            "remoteState",
            String.class,
            "",
            "AlarmHandshake.Properties.RemoteState.Name",
            "AlarmHandshake.Properties.RemoteState.Category",
            "AlarmHandshake.Properties.RemoteState.Desc",
            true,
            false,
            "__tagPath"
    );

}

```

And adding it to the extended properties in the Gateway Hook:

```python

    @Override
    public void setup(GatewayContext gatewayContext) {
        this.gatewayContext = gatewayContext;

        BundleUtil.get().addBundle("AlarmHandshake", getClass(), "AlarmProperties");
        gatewayContext.getAlarmManager().registerExtendedConfigProperties(MODULE_ID, AlarmProperties.REMOTE_ACK);
    }

```

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [June 24, 2024, 5:20pm UTC](https://forum.inductiveautomation.com/t/any-way-to-have-a-custom-editor-on-an-alarmproperty/92267/2 "2024-06-24T17:20:37Z")

</div>

I think this just isn't possible, unfortunately. Your custom configuration property can't be cloned for storage because it's defined in your module's classloader and the platform doesn't have access to it, and even if it could, I don't think anything in the alarm editing UI is actually paying attention to that custom editor descriptor field.
