Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
Configuration option not visible in control panel
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?
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.
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"
The last configuration that I provided (in 7.3 though) required a "Web-ContextPath" entry in bnd.bnd if I remember correctly.
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"
Powered by Liferay™