2013-08-31 36 views
1

我想使用JSF 2.2的f:viewAction,但它不起作用。未找到JSF 2.2名称空间

我的脸,配置:

<faces-config version="2.2" 
    xmlns="http://xmlns.jcp.org/xml/ns/javaee" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd"> 

XHTML的定义:

<!DOCTYPE html> 
<html xmlns="http://www.w3.org/1999/xhtml" 
    xmlns:f="http://xmlns.jcp.org/jsf/core" 
    xmlns:h="http://xmlns.jcp.org/jsf/html" 
    xmlns:ui="http://xmlns.jcp.org/jsf/facelets" 
    xmlns:p="http://primefaces.org/ui"> 

    <f:metadata> 
     <f:viewAction action="#{bean.welcomeUser()}" onPostback="false" /> 
    </f:metadata> 

... 

</html> 

的问题是,它强调了F,H和UI命名空间(一个警告:NLS缺少消息:CANNOT_FIND_FACELET_TAGLIB: org.eclipse.jst.jsf.core.validation.internal.facelet.messages

我能做些什么来使其重新工作? (我已经包括MyFaces的-IMPL-2.2.0和MyFaces的-API-2.2.0)

编辑: 当我包括JSF IMPL 2.2和2.2 API到我的项目,该警告消失,但随后的编译得到大问题(工厂未找到等)

+0

哪个是你的设置(服务器/框架/其他)? – SJuan76

+0

您使用的是Eclipse吗? –

+0

为什么你发布未完成的'faces-config.xml'? –

回答