I'm in the process of adding a file upload field to my device driver configuration. Is it still the case that a custom record edit page must be implemented as described below? Or is the only alternative to implement the depreciated classes used in the modbus example?
Also, I've found that when I try to add additional links by overriding getLinks() (as previously shown in the ModbusTcpDriverType example using DriverType) I receive an error that function does not exist within the DeviceType class. I'm guessing this has changed since DeviceType was introduced. Is there an alternative available?
As always, any help is greatly appreciated - thanks.
You can still add custom actions to your record instance by overriding addRecordInstanceActions in DeviceType.
The following code is Kotlin instead of Java so you’ll just have to squint and get the idea instead of copy it. This is used by the FINS driver to lead to a custom tag editing Wicket panel.
Thanks a lot Kevin. I’ve been able to use the above code to create a custom action which links to a settings page.
My current problem is when the link to the new page is clicked no content is displayed and there are no errors in the logs. I’ve reduced the page content down to a header and a single label without result.
An interesting thing I’ve noticed is that it seems the getTitleModel() function is never actually called (I’ve inserted a logged which is never printed), however the following logger.info("Title area: "+isTitleVisible()); returns true.
I was hoping someone could shed some light on what I’m doing wrong. I’ve included the code below for reference.
Note: all 3 files are in the same directory.
The .properties file:
configurationtitle=Address Upload
label=This is a new label