It is possible to create multiple portlet in the same portlet project.
Therefore, all the library and resources, e.g. jars, css, js, etc can be shared among portlet in the same project.
in this post, I will use JSF2 portlet as the sample.
for more information, please refer How to create JSF2 Portlet in Liferay
Prerequisites:
1. make sure Liferay development environment is properly setup
Steps:
Create New Portlet
1. R-click on existing portlet > New > Other
2. Expand Liferay > select JSF Portlet > Next > Next
p/s: if your target portlet is not JSF Portlet, then select Liferay Portlet
2. open liferay-display.xml and liferay-portlet.xml as well, to confirm the new portlet entry created.
Test the portlet
1. Login to Liferay
2. Add > More... > Sample > NewJSFPortlet > Add
3. If a new portlet successfully added to the page like below, you are done
Done!!
Therefore, all the library and resources, e.g. jars, css, js, etc can be shared among portlet in the same project.
in this post, I will use JSF2 portlet as the sample.
for more information, please refer How to create JSF2 Portlet in Liferay
Prerequisites:
1. make sure Liferay development environment is properly setup
Steps:
Create New Portlet
1. R-click on existing portlet > New > Other
2. Expand Liferay > select JSF Portlet > Next > Next
p/s: if your target portlet is not JSF Portlet, then select Liferay Portlet
3. Fill in new portlet details > Next > Finish
Verify the new portlet
1. open portlet.xml, check the new portlet entry
Test the portlet
1. Login to Liferay
2. Add > More... > Sample > NewJSFPortlet > Add
3. If a new portlet successfully added to the page like below, you are done
Done!!
i just to what u said and work fine but when iam using some action to fire some method did not work cn u help
ReplyDeletePlease make sure <h:head /> in your xhtml instead of the html <head />
Delete