Idea 117.21: what's a correct way of using a JSF EL expression?

Hi, I'm learning JSF 2 in a Java EE 6 environment. This is my web.xml:

<?xml version="1.0"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
         version="3.0" metadata-complete="true">
    <servlet>
        <servlet-name>Faces Servlet</servlet-name>
        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    </servlet>
    <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>*.jsf</url-pattern>
    </servlet-mapping>
    <welcome-file-list>
        <welcome-file>index.jsf</welcome-file><!-- .jsf or .xhtml? -->
    </welcome-file-list>
    <context-param>
        <param-name>javax.faces.PROJECT_STAGE</param-name>
        <param-value>Development</param-value>
    </context-param>
</web-app>


And here is faces-config.xml:

<?xml version="1.0" encoding="UTF-8"?>
<faces-config version="2.0" xmlns="http://java.sun.com/xml/ns/javaee"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:schemaLocation="
              http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd">
    <application>
        <locale-config>
            <default-locale>en</default-locale>
        </locale-config>
        <resource-bundle>
            <base-name>ApplicationResource</base-name>
            <var>msgs</var>
        </resource-bundle>
    </application>
</faces-config>


I saw the warning
fig1.png
What's the correct way of writing #{msgs.title}?

Regards.

1 comment
Comment actions Permalink

Your code is quite correct. Please file a ticket for this incorrect
inspection.
You may use ${} here to suppress the warning.

"Thai Dang Vu" <no_reply@jetbrains.com> сообщил(а) в новостях
следующее:10478104.244101332191057999.JavaMail.devnet@confluence.jetbrains.net...

Hi, I'm learning JSF 2 in a Java EE 6 environment. This is my web.xml:

>

>           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>          xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
> http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
>          version="3.0" metadata-complete="true">
>     
>         Faces Servlet
>         javax.faces.webapp.FacesServlet
>     
>     
>         Faces Servlet
>         *.jsf
>     
>     
>         index.jsf>     
>     
>         javax.faces.PROJECT_STAGE
>         Development
>     
> ]]>

>

And here is faces-config.xml:

>

 encoding="UTF-8"?>
>                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>               xsi:schemaLocation="
>               http://java.sun.com/xml/ns/javaee 
> http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd">
>     
>         
>             en
>         
>         
>             ApplicationResource
>             msgs
>         
>     
> ]]>

>

I saw the warning
Image:fig1.png
What's the correct way of writing #{msgs.title}?

>

Regards.

>

---
Original message URL: http://devnet.jetbrains.net/message/5454962#5454962


0

Please sign in to leave a comment.