Context: LiferayFaces + Eclipse IDE. liferay-plugins-sdk-6.2-ce-ga6, liferay-faces-bridge-api-3.2.4-ga5-sources.jar
Hi all:
As a begginer in the JSF programming world within Liferay Platform, I've started to create a JSF Portlet Project following the 'Creating a JSF Portlet' learning path. I've successfully created the JSF Portlet Project and deployed it on the Tomcat Server, and it's even working as expected.
The problem is that eclipse is displaying some errors in the facelet 'view.xhtml', despite of the fact that the portlet is working fine. The content of such file is:
<?xml version="1.0"?>
<f:view
xmlns="http://www.w3.org/1999/xhtml"
xmlns:aui="http://liferay.com/faces/aui"
xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets"
>
<h:head />
<h:body>
<h:outputText value="#{i18n['guestbook-jsf-hello-world']}" />
</h:body>
</f:view>
And the errors I can see are:
- should insert missing 'title' element (in the '' line) (in fact, it's not an error but a warning).
- f:view is not recognized (in fact, is's a warning).
- h:head is not recognized.
- h:body is not recognized.
- Self-closing syntax (/>) used on a non-void HTML element.
It seems that the JSF tags are not recognised, although the portlet is working fine. Can anyone explain to me what's going on with eclipse IDE and how I can prevent eclipse IDE from showing those errors messages? Thanks in advance.
Additional info (@BalusC): I think JSF Project has a facelet for the view mode, as the content of portlet.xml includes:
<portlet-class>javax.portlet.faces.GenericFacesPortlet</portlet-class>
<init-param>
<name>javax.portlet.faces.defaultViewId.view</name>
<value>/views/view.xhtml</value>
</init-param>
<supports>
<mime-type>text/html</mime-type>
<portlet-mode>view</portlet-mode>
</supports>
Moreover, within Project -> JavaResources -> Libraries -> Ivy you can find, among others, the following libraries:
- jsf-api-2.1.21-sources.jar
- jsf-impl-2.1.21-sources.jar
- liferay-faces-util-3.2.4-ga5-sources.jar
- liferay-faces-bridge-api-3.2.4-ga5-sources.jar
- liferay-faces-bridge-impl-3.2.4-ga5-sources.jar
- liferay-faces-portal-3.2.4-ga5-sources.jar
So the JSF implementation library do exists.
Moreover, within Project -> Properties -> Java Build Path -> Order and Export, all the entries are selected, so the JSF/LiferayFaces related libraries are included into the JSF Project.
Any idea/suggestion is welcome. Thanks.
WEB-INF/lib!). Not exactly sure tho as I don't do Portlets (I only do Java EE). By the way,<h:head>is not a HTML element. Only that one in the generated HTML output is. - BalusC<h:head />is included by the wizard, it all is not my code. - txapeldot<h:head>for a HTML element. - BalusC