Note that there are some explanatory texts on larger screens.

plurals
  1. POThe method getExpressionFactory() from the type Application refers to the missing type ExpressionFactory
    primarykey
    data
    text
    <p>I'm working on a JSF 2.0 application and I'm trying to programmatically adding an ajax action to a programmatically created UIComponent (the equivalent of statically declared f:ajax listener in a commandLink) as shown in <a href="http://www.wobblycogs.co.uk/index.php/computing/jee/71-programatically-adding-ajax-actions-to-uicomponents" rel="nofollow">this blog</a>.</p> <p>When I tried to get an ExpressionFactory in order to create a MethodExpression, this way: </p> <pre><code>FacesContext fc = FacesContext.getCurrentInstance(); Application application = fc.getApplication(); ExpressionFactory ef = fc.getApplication().getExpressionFactory(); </code></pre> <p>So, just when I wrote these lines, I got an error saying:</p> <pre><code>The method getExpressionFactory() from the type Application refers to the missing type ExpressionFactory. </code></pre> <p>The only available quick fix was to configure the build path.</p> <p>I don't know what exactly I should do, am I missing any JAR to resolve this problem?</p> <p>This is my <code>pom.xml</code>:</p> <pre><code>&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"&gt; &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt; &lt;groupId&gt;esprit.pfe2013&lt;/groupId&gt; &lt;artifactId&gt;GCFTest4addUIC&lt;/artifactId&gt; &lt;packaging&gt;war&lt;/packaging&gt; &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt; &lt;name&gt;GestionCongesFeki Maven Webapp&lt;/name&gt; &lt;url&gt;http://maven.apache.org&lt;/url&gt; &lt;repositories&gt; &lt;repository&gt; &lt;id&gt;central&lt;/id&gt; &lt;name&gt;Maven Repository Switchboard&lt;/name&gt; &lt;layout&gt;default&lt;/layout&gt; &lt;url&gt;http://repo1.maven.org/maven2&lt;/url&gt; &lt;snapshots&gt; &lt;enabled&gt;false&lt;/enabled&gt; &lt;/snapshots&gt; &lt;/repository&gt; &lt;repository&gt; &lt;id&gt;prime-repo&lt;/id&gt; &lt;name&gt;Prime Repo&lt;/name&gt; &lt;url&gt;http://repository.primefaces.org&lt;/url&gt; &lt;/repository&gt; &lt;/repositories&gt; &lt;pluginRepositories&gt; &lt;pluginRepository&gt; &lt;id&gt;central&lt;/id&gt; &lt;name&gt;Maven Plugin Repository&lt;/name&gt; &lt;url&gt;http://repo1.maven.org/maven2&lt;/url&gt; &lt;layout&gt;default&lt;/layout&gt; &lt;snapshots&gt; &lt;enabled&gt;false&lt;/enabled&gt; &lt;/snapshots&gt; &lt;releases&gt; &lt;updatePolicy&gt;never&lt;/updatePolicy&gt; &lt;/releases&gt; &lt;/pluginRepository&gt; &lt;/pluginRepositories&gt; &lt;!-- &lt;repositories&gt; --&gt; &lt;!-- &lt;repository&gt; --&gt; &lt;!-- &lt;id&gt;central&lt;/id&gt; --&gt; &lt;!-- &lt;name&gt;Central Repository&lt;/name&gt; --&gt; &lt;!-- &lt;url&gt;http://repo.maven.apache.org/maven2&lt;/url&gt; --&gt; &lt;!-- &lt;layout&gt;default&lt;/layout&gt; --&gt; &lt;!-- &lt;snapshots&gt; --&gt; &lt;!-- &lt;enabled&gt;false&lt;/enabled&gt; --&gt; &lt;!-- &lt;/snapshots&gt; --&gt; &lt;!-- &lt;/repository&gt; --&gt; &lt;!-- &lt;/repositories&gt; --&gt; &lt;dependencies&gt; &lt;dependency&gt; &lt;groupId&gt;javax.servlet&lt;/groupId&gt; &lt;artifactId&gt;javax.servlet-api&lt;/artifactId&gt; &lt;version&gt;3.0.1&lt;/version&gt; &lt;/dependency&gt; &lt;!-- PrimeFaces --&gt; &lt;dependency&gt; &lt;groupId&gt;org.primefaces&lt;/groupId&gt; &lt;artifactId&gt;primefaces&lt;/artifactId&gt; &lt;version&gt;3.4.1&lt;/version&gt; &lt;/dependency&gt; &lt;!-- JSF 2 --&gt; &lt;dependency&gt; &lt;groupId&gt;com.sun.faces&lt;/groupId&gt; &lt;artifactId&gt;jsf-api&lt;/artifactId&gt; &lt;version&gt;2.1.11&lt;/version&gt; &lt;/dependency&gt; &lt;dependency&gt; &lt;groupId&gt;com.sun.faces&lt;/groupId&gt; &lt;artifactId&gt;jsf-impl&lt;/artifactId&gt; &lt;version&gt;2.1.11&lt;/version&gt; &lt;/dependency&gt; &lt;dependency&gt; &lt;groupId&gt;javax.servlet&lt;/groupId&gt; &lt;artifactId&gt;jstl&lt;/artifactId&gt; &lt;version&gt;1.2&lt;/version&gt; &lt;/dependency&gt; &lt;dependency&gt; &lt;groupId&gt;taglibs&lt;/groupId&gt; &lt;artifactId&gt;standard&lt;/artifactId&gt; &lt;version&gt;1.1.2&lt;/version&gt; &lt;/dependency&gt; &lt;dependency&gt; &lt;groupId&gt;mysql&lt;/groupId&gt; &lt;artifactId&gt;mysql-connector-java&lt;/artifactId&gt; &lt;version&gt;5.1.13&lt;/version&gt; &lt;/dependency&gt; &lt;dependency&gt; &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt; &lt;artifactId&gt;maven-resources-plugin&lt;/artifactId&gt; &lt;version&gt;2.4.3&lt;/version&gt; &lt;/dependency&gt; &lt;/dependencies&gt; &lt;build&gt; &lt;finalName&gt;GCFTest4addUIC&lt;/finalName&gt; &lt;plugins&gt; &lt;plugin&gt; &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt; &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt; &lt;version&gt;2.3.2&lt;/version&gt; &lt;configuration&gt; &lt;source&gt;1.6&lt;/source&gt; &lt;target&gt;1.6&lt;/target&gt; &lt;/configuration&gt; &lt;/plugin&gt; &lt;/plugins&gt; &lt;/build&gt; &lt;/project&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload