Issue Getting Field Names to Display Correctly

I have a module in which I cannot get the field names to display properly. There have been times where it does work, but rarely.

For example, I have been able to get it to do this:

But most of the time it looks like this

The property record looks like this

Noun=Kafka Setting
Noun.Plural=Kafka Settings

Brokers.Name=Brokers (ADDRESS:PORT)
Enabled.Name=Enabled
UseStoreAndFwd.Name=Use Store & Forward
UseSSL.Name=Use SSL

Source.Name=Source
DispPath.Name=Display Path
SrcPath.Name=Source Path
AlarmsEnabled.Name=Enable Alarms

AuditEnabled.Name=Enable Audit

Category.Configuration=Producer Settings
Category.Alarms=Alarm Settings
Category.Audit=Audit Settings

Usage Looks like this

public class KafkaSettingsRecord extends PersistentRecord {

    public static final RecordMeta<KafkaSettingsRecord> META = new RecordMeta<KafkaSettingsRecord>(
            KafkaSettingsRecord.class, "KafkaSettingsRecord").setNounKey("KafkaSettingsRecord.Noun").setNounPluralKey(
            "KafkaSettingsRecord.Noun.Plural");

    public static final IdentityField Id = new IdentityField(META);

    //Kafka Settings
    public static final StringField BrokerList = new StringField(META, "Brokers", SFieldFlags.SMANDATORY);
    public static final BooleanField Enabled = new BooleanField(META, "Enabled").setDefault(false);
    public static final BooleanField UseStoreAndFwd = new BooleanField(META, "UseStoreAndFwd").setDefault(false);
    public static final BooleanField UseSSL = new BooleanField(META, "UseSSL").setDefault(false);

If anyone has experienced a similar issue in the past and has a way to fix it through code (not reseting the gateway) I’d appreciate the help fixing this non-critical, but visually very annoying problem.

Thanks,

Nick

I think this has been a development issue since the beginning… there is no fix I’m aware of aside from restarting the gateway, and there is no fix coming until this entire SORM/record system doesn’t exist any more in Ignition 8.2.

edit: although the underlying issue may be in the BundleUtil stuff… which is not part of the SORM system… hmm.

I do see this when installing the module. The module functionality is fine and we are able to get data up to Kafka, just the labels won’t cooperate:

Nick

Hmm. The issue I’m talking about is that basically on subsequent installs the properties can’t be resolved, like in your second screenshot.

After a gateway restart, and on any first install of the module when it doesn’t already exist, the properties resolve, right?

This gateway was fresh when I installed it (never had this module on it before) and the labels didn’t work.

I restarted just now via EAM and it didn’t make them show up.

Nick

Inside of the BundleUtil what should we be passing.

In this module which we use for buffered TCP messages, it’s like this based on the OPC-UA device driver example provided by IA:

BundleUtil.get().addBundle(BufferedTcpDevice.class);

That module has zero issues displaying the labels. However in the module I am having issues displaying the labels it is like this:

BundleUtil.get().addBundle("kafka", getClass(), "kafka");

Try this instead:

BundleUtil.get().addBundle("kafka", getClass().getClassLoader(), "kafka");

Don’t use BundleUtil with PersistentRecord properties. They load themselves. Name the properties file the same as the record’s class name with localization suffixes then .properties.

You’ll still need to restart the gateway if you modify the properties file, but otherwise should work automatically.

1 Like