The intial commits have been done. I've added the libraries for the bridge and portlet support to a subdirectory:
icefaces/lib/portlets
to keep them separate from the more generic libraries and show that basic ICEfaces doesn't require them.
Under compat/samples/component-showcase I've added a portlets directory. This contains the portlet specific content and the required .xml files (portlet.xml, liferay*.xml).
There is now a new build target called portletize.war that currently only builds a Tomcat 6 compatible .war. So from the component-showcase directory you can type:
ant clean portletize.war
This will build the normal tomcat6.0 .war and then:
- unzip the .war file under portlets/build/exploded
- add all the portlet stuff to the exploded directory
- re-zip the directory as portlets/build/component-showcase-portlet.war
You should copy this war to:
liferay-portal-6.0.2/deploy
This should allow you to add the ICEfaces portlets to a portal page. Currently there are only two portlets defined but I've set it up so that there is only a single view.xhtml page for all the portlets. All we need to do to add more portlets is add a <portlet> entry in the portlet.xml file. Simply copy and paste an existing entry and change the values. The important one is the org.icefaces.demo.viewPath parameter that points to the content to include for that particular portlet:
<portlet>
<portlet-name>textFields</portlet-name>
<display-name>ICEfaces 2: Text Fields</display-name>
<portlet-class>org.portletfaces.bridge.GenericFacesPortlet</portlet-class>
<init-param>
<name>javax.portlet.faces.defaultViewId.view</name>
<value>/view.xhtml</value>
</init-param>
<init-param>
<name>org.icefaces.demo.viewPath</name>
<value>/WEB-INF/includes/examples/standard/textFields.xhtml</value>
</init-param>
<supports>
<mime-type>text/html</mime-type>
<portlet-mode>view</portlet-mode>
</supports>
<portlet-info>
<title>ICEfaces 2: Text Fields</title>
<short-title>Buttons and Links</short-title>
<keywords>ICEfaces Component Showcase Buttons Links</keywords>
</portlet-info>
</portlet>
Then add an entry to the liferay-portlet.xml file. Again, copy and paste an existing entry and just change the portlet-name to match the entry in the portlet.xml file:
<portlet>
<portlet-name>textFields</portlet-name>
<instanceable>true</instanceable>
<ajaxable>false</ajaxable>
</portlet>
Lastly, add a line to liferay-display.xml so that the portlet will show up in the menu for adding applications. Again, id must match the portlet-name:
<category name="ICEfaces 2">
<portlet id="buttonsAndLinks"/>
<portlet id="textFields"/>
</category>
The intial commits have been done. I've added the libraries for the bridge and portlet support to a subdirectory:
icefaces/lib/portlets
to keep them separate from the more generic libraries and show that basic ICEfaces doesn't require them.
Under compat/samples/component-showcase I've added a portlets directory. This contains the portlet specific content and the required .xml files (portlet.xml, liferay*.xml).
There is now a new build target called portletize.war that currently only builds a Tomcat 6 compatible .war. So from the component-showcase directory you can type:
ant clean portletize.war
This will build the normal tomcat6.0 .war and then:
You should copy this war to:
liferay-portal-6.0.2/deploy
This should allow you to add the ICEfaces portlets to a portal page. Currently there are only two portlets defined but I've set it up so that there is only a single view.xhtml page for all the portlets. All we need to do to add more portlets is add a <portlet> entry in the portlet.xml file. Simply copy and paste an existing entry and change the values. The important one is the org.icefaces.demo.viewPath parameter that points to the content to include for that particular portlet:
<portlet>
<portlet-name>textFields</portlet-name>
<display-name>ICEfaces 2: Text Fields</display-name>
<portlet-class>org.portletfaces.bridge.GenericFacesPortlet</portlet-class>
<init-param>
<name>javax.portlet.faces.defaultViewId.view</name>
<value>/view.xhtml</value>
</init-param>
<init-param>
<name>org.icefaces.demo.viewPath</name>
<value>/WEB-INF/includes/examples/standard/textFields.xhtml</value>
</init-param>
<supports>
<mime-type>text/html</mime-type>
<portlet-mode>view</portlet-mode>
</supports>
<portlet-info>
<title>ICEfaces 2: Text Fields</title>
<short-title>Buttons and Links</short-title>
<keywords>ICEfaces Component Showcase Buttons Links</keywords>
</portlet-info>
</portlet>
Then add an entry to the liferay-portlet.xml file. Again, copy and paste an existing entry and just change the portlet-name to match the entry in the portlet.xml file:
<portlet>
<portlet-name>textFields</portlet-name>
<instanceable>true</instanceable>
<ajaxable>false</ajaxable>
</portlet>
Lastly, add a line to liferay-display.xml so that the portlet will show up in the menu for adding applications. Again, id must match the portlet-name:
<category name="ICEfaces 2">
<portlet id="buttonsAndLinks"/>
<portlet id="textFields"/>
</category>