0

I have this situation that works perfect and I know that I shoud map a bean attribute to the value of the outputText and not to the method, but in this case this is necesary. So how can I avoid this problem?

<h:outputText value="#{bean.method(param)}" />

Error: Multiple annotations found at this line:

  • Syntax error in EL
  • Expression must be a value expression but is a method

My faces-config.xml

<?xml version="1.0" encoding="UTF-8"?>

<faces-config 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"
    version="2.2">

    <application>
        <locale-config>
            <default-locale>es</default-locale>
            <supported-locale>es</supported-locale>
            <supported-locale>en</supported-locale>
        </locale-config>
        <el-resolver>org.springframework.web.jsf.el.SpringBeanFacesELResolver</el-resolver>
    </application>
</faces-config>

I see in here that the problem should go away if i upgrade my EL resolver but how can I do this?

Im using Java EE with JDK1.8 with tomcat 8 and PrimeFaces

<jsf.version>2.2.13</jsf.version>
<primeFaces.version>6.0</primeFaces.version>
<java.version>1.8</java.version>
UHDante
  • 577
  • 9
  • 21
  • Are you saying that it runs and works completely fine and that it's just your development editor who's giving a false error message? How exactly is this then caused by JSF/PrimeFaces/Java/EL? You basically need a different/better editor. JSF/PrimeFaces/Java/EL cannot provide you this. And you will not be able to get answers if you don't tell any word about the actual editor being used. – BalusC Feb 22 '18 at 08:28
  • Yes that is my problem, it is a problem on my JSF view show by the editor. I use Eclipse – UHDante Feb 22 '18 at 08:30
  • 1
    Just replace/upgrade/reconfigure your editor. This is not a JSF problem. You need to reframe your question to ask about the editor, not about JSF. JSF cannot help you in any way in order to solve this editor-specific problem. – BalusC Feb 22 '18 at 08:31
  • Eclipse Version: Oxygen.1 Release (4.7.1), is this not updated? I just whant to this error not be shown as an error beacuse it works fine. – UHDante Feb 22 '18 at 08:33
  • Thanks @BalusC, eclipse validation rules were the problem here, I just set the one causing the problem to warning and fix it. Thanks – UHDante Feb 22 '18 at 08:48

0 Answers0