IntelliJ Idea 无法解析符号 f:viewAction

gog*_*aga 5 intellij-idea jsf-2.2

尽管调用了action属性中的方法,但我的智能想法以红色给出“无法解析符号 f:viewAction”警告f:viewAction

它也没有为它提供自动完成。当我使用f:view或时,自动完成工作f:viewParam。此外,当我转到xmlns:f="http://java.sun.com/jsf/core链接时,我<tag-name>viewAction</tag-name>在该文件中找不到,所以我猜我没有包含正确的版本?

我的 xhtml 页面:

<?xml version="1.0" encoding="UTF-8"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:f="http://java.sun.com/jsf/core"
                template="components/defaultLayout.xhtml">

    <f:metadata>
        <f:viewAction action="#{indexBean.init}" />
    </f:metadata>
</ui:composition>
Run Code Online (Sandbox Code Playgroud)

我的依赖:

<!-- Mojarra api of jsf - needed for tomcat  -->
        <dependency>
            <groupId>com.sun.faces</groupId>
            <artifactId>jsf-api</artifactId>
            <version>2.2.10</version>
        </dependency>
        <!-- Mojarra Implementation of jsf -->
        <dependency>
            <groupId>com.sun.faces</groupId>
            <artifactId>jsf-impl</artifactId>
            <version>2.2.10</version>
        </dependency>
Run Code Online (Sandbox Code Playgroud)

如何包含正确的库?为什么这个动作从来没有少被调用过?