Another Configure Page Question

Is there an example project somewhere which illustrates working with configure pages?

I was following this thread but I am getting an error (attached).

The two errors shown are independent. 1st, you need Noun and NounPlural keys in MyRecord.properties to describe your table. When reading exceptions, be sure to look for the “Caused by” section, if any.
2nd, all java classes that represent wicket pages or components must be serializable, as the web interface serializes and deserializes in the user’s login session. That’s the whole point of the Model system – it separates the nonserializable data you need to display/edit from the component structure of the web page.

Thanks for the reply Phil.

Can you provide a little more detail on what I need to do to add the Noun and NounPlural keys? I’ve looked at the code posted in the other thread, through the SDK documentation, and the Javadocs, and I don’t see any hints of how to accomplish this. I tried creating fields in my record, and that (predictably) did not work.

There should be a MyRecord.properties file in the same folder with MyRecord.java. That will deliver field.Name= and field.Desc= strings for your configuration record, along with category names and anything else that needs “MyRecord.” as the prefix. See the modbus driver for those examples. I usually supplement those with a bundle loaded from a common “Meta” class that also defines my module ID, like so:[code]/**

  • @author Phil Turmel pturmel@automation-pros.com
  • Copyright Automation Professionals, LLC 2015
  • Project: TimeSeriesDBCache_Common
    */
    package com.automation_pros.tsdbcache;

import com.inductiveautomation.ignition.common.BundleUtil;

public class Meta {
public static final String MODULE_ID = “com.automation_pros.tsdbcache”;
public static final String SHORT_MODULE_ID = “tsdbcache”;

public Meta() {}

static public void bundle() {
	BundleUtil.get().addBundle(SHORT_MODULE_ID, Meta.class, "localization");
}

static public void unBundle() {
	BundleUtil.get().removeBundle(SHORT_MODULE_ID);
}

}
[/code]I call bundle() from the module setup() hook, and unBundle() from the module shutdown() hook. In the same folder as Meta.java, there’s a localization.properties file with all of my globally keyed strings. Each key within that file is prefixed with my short module ID as dictated by the addBundle() method. In multi-scope modules, the Meta class is placed in a common jar for all the scopes to use.