This website uses cookies to ensure you get the best experience. Learn More.
Problem: Using custom fields for custom entities? However, the Liferay control panel does not provide a way to determine how many custom fields there are for custom entities.
Solution: Just add a single component, and it is done.
On this branch, I have created a sample component that can be deployed quickly into liferay. Once it is deployed, it will add visibility to custom fields for your custom entities.
Writing Custom Attributes Display class: Steps
public class ObjectDefinitionCustomAttributesDisplay extends BaseCustomAttributesDisplay
@Component(
property = "javax.portlet.name=" + ObjectPortletKeys.OBJECT_DEFINITIONS,
service = CustomAttributesDisplay.class
)
@Override
public String getClassName() {
return ObjectDefinition.class.getName();
}
public String getIconCssClass() {
return "relationship";
Now this component is ready to deploy. Once you deploy this into liferay, you can check the custom field page, it will display your custom entity in the list. And you can manage the custom field from liferay control panel page itself.
GitHub: https://github.com/BhargavVaghasiya-RV/liferay-component/