Configuring Portlet Properties for Your JS Widget

Follow these steps to configure your portlet’s properties:

  1. Open your generated JavaScript widget’s package.json file.

  2. 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,
    	"": "my_js_portlet_project",
    	"": "power-user,user",
    	"javax.portlet.resource-bundle": "content.Language"
  3. Deploy your bundle to apply the changes.

Great! Now you know how to configure your JavaScript portlet’s properties.

« Localizing Your WidgetUsing Translation Features in Your Widget »
Este artigo foi útil?
Utilizadores que acharam útil: 0 de 1