Follow these steps to configure your portlet’s properties:
-
Open your generated JavaScript widget’s
package.json
file. -
Set the properties under the
portlet
entry. Note that these are the same properties you would define in the Java@Component
annotation of a portlet, as defined in the liferay-portlet-app_7_2_0.dtd. An example configuration is shown below:"portlet": { "com.liferay.portlet.display-category": "category.sample", "com.liferay.portlet.header-portlet-css": "/css/styles.css", "com.liferay.portlet.instanceable": true, "javax.portlet.name": "my_js_portlet_project", "javax.portlet.security-role-ref": "power-user,user", "javax.portlet.resource-bundle": "content.Language" },
-
Deploy your bundle to apply the changes.
Great! Now you know how to configure your JavaScript portlet’s properties.