1

i want to use the f:viewAction of JSF 2.2, but it is not working.

my faces-config:

<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-definition:

<!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>

the problem is that it underlines the f, h and the ui-namespace (with a warning: NLS missing message: CANNOT_FIND_FACELET_TAGLIB in: org.eclipse.jst.jsf.core.validation.internal.facelet.messages)

what can I do to make it work again? ( i have included myfaces-impl-2.2.0 and the myfaces-api-2.2.0)

EDIT: When i include jsf impl 2.2 and api 2.2 to my project, the warning disappears, but then the compiling gets big problems (factory not found etc)

4

1 回答 1

0

您描述的行为在MyFaces 2.2.8中仍然存在,问题f:viewAction是众所周知的。它应该在 Eclipse 3.7.2 (Mars.2) 和 MyFaces 2.2.9 中得到修复。

您没有标记的 Eclipse 自动完成功能,但您实际上可以按预期使用它。

参考:

于 2015-10-08T07:33:49.240 回答