Message Boards

Configuration option not visible in control panel

Thomas Kellerer, modified 3 Years ago.

Configuration option not visible in control panel

Expert Posts: 490 Join Date: 6/9/08 Recent Posts

I have a MVC portlet in Liferay 7.0 CE that defines a configuration key:

@Component(
    configurationPid = "com.foo.myportlet.ConfigID",
    immediate = true,
    property = {
        "com.liferay.portlet.display-category=My Portlets",
        ....
    },
    service = Portlet.class
)
public class MyPortlet extends MVCPortlet {
...
}

And the configuration class is define like this:
 

@Meta.OCD(id = "com.foo.myportlet.ConfigID")
public interface MyPortletConfig {

    @Meta.AD(
        deflt = "some default value",
        required = false
    )
    public String myProperty();
}

The porlet works fine, accessing the configuration property in my ActionCommand also works fine.

However, according to the documentation this should show up under "Control Panel -> System Settings -> Others" and I am pretty sure it did show up there at some time.

But the only entries in the "Others" section are "Apache Felix Declarative Service Implementation", "Apache Felix Event Admin Implementation" and "Apache Felix File Install"

I tried to re-create the search indexes, clean up permissions and and portlet preferences but to no avail.

Where else can I look, to find out, why my configuration is not registered in the control panel?

 

thumbnail
Evan Thibodeau, modified 3 Years ago.

RE: Configuration option not visible in control panel

New Member Posts: 14 Join Date: 3/29/12 Recent Posts

Hi Thomas, 

In order for your configuration to show up under "Others" you need to add an "@ExtendedObjectClassDefinition" anotation directly above the @Meta.OCD annotation. It should look something like this:

@ExtendedObjectClassDefinition(
    category = "my-category",
    scope = ExtendedObjectClassDefinition.Scope.SYSTEM
)
@Meta.OCD(

By default, Configurations will show up in Control Panel > System Settings > Third Party.

Thomas Kellerer, modified 3 Years ago.

RE: RE: Configuration option not visible in control panel

Expert Posts: 490 Join Date: 6/9/08 Recent Posts

Thanks for the quick answer. Unfortunately that didn't change anything.

I also don't have a category "Third Party".

"Control Panel > System Settings" only shows: "Web Experience, Collaboration, Forms and Workflow, Foundation, Other"

thumbnail
Olaf Kock, modified 3 Years ago.

RE: RE: Configuration option not visible in control panel

Liferay Legend Posts: 6403 Join Date: 9/23/08 Recent Posts

The last configuration that I provided (in 7.3 though) required a "Web-ContextPath" entry in bnd.bnd if I remember correctly.

thumbnail
Russell Bohl, modified 3 Years ago.

RE: Configuration option not visible in control panel

Expert Posts: 291 Join Date: 2/13/13 Recent Posts

I believe your configuration ID has to be the FQCN of the config class. At least, that was true at one point.

For example,

id = "com.foo.myportlet.MyPortletConfig"