AdministrationSectionExt cannot be resolved to a type in Platform 2.x

Hi,

I’m building a module for 2.x. In my omod project, which I created using SDK, I see the following syntax error in AdminList class:

AdministrationSectionExt cannot be resolved to a type AdminList.java

Falling back to 1.x.x, the error goes away. It’s clear to me that this class was removed from 2.x. So,

  1. What’s the alternative way? I want to add a module configuration page to Administration section.
  2. Shouldn’t the openmrs-sdk:create-project command generate correct code template based on the platform version selected?

I solved the issue by adding legacy-ui dependency in my omod/pom.xml

    <dependency>
        <groupId>org.openmrs.module</groupId>
        <artifactId>legacyui-omod</artifactId>
        <version>1.3.3</version>
        <scope>provided</scope>
    </dependency>

Which makes perfect sense.

Thanks to @tahira.

3 Likes

@owais.hussain you can think of the legacy UI as deprecated because technically it is, therefore when building a module for the 2.x UI it’s pointless to add an AdminList extension, the best thing to do is to remove it from your config.xml file. This is what we’ve been doing for modules built for the reference application and in general for the 2.x UI, I think the module wizard also needs to be updated to do this automatically.

3 Likes