My intelliJ idea is giving the "can not resolve symbol f:viewAction" warning in red although the method in action
attribute of f:viewAction
is called.
It is also not giving auto complete for it. The auto complete works when i use f:view
or f:viewParam
. Also when i go to the xmlns:f="http://java.sun.com/jsf/core
link, i can not find <tag-name>viewAction</tag-name>
in that file so i am guessing i haven't included the right version may be?
My xhtml page:
<?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>
My Dependencies:
<!-- 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>
How can i include the correct library? and why is the action never the less called?