facebook

EL boolean flagged as warning in xhtml

  1. MyEclipse Archived
  2.  > 
  3. Bugs
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #275364 Reply

    arjan.tijms
    Member

    Hi,

    I’m using Eclipse 3.3/MyEclipse6.0GA/Java6U2/Debian Linux Etch.

    When I use a boolean EL expression in a facelets file, it’s always flagged as a warning (saying: Valid values are “true” or “false”).

    E.g.

    Suppose I have a bean with a method

    
    public boolean isUserAdmin(){
        return FacesUtils.isAdmin();
    }
    

    If I then use the following in an otherwise valid facelets (.xhtml) file, the mentioned warning is given.

    
    <h:form id="adminReg" rendered="#{userBean.userAdmin}">
    

    I tried many alternatives, among others:

    
    <h:form id="adminReg" rendered="#{userBean.userAdmin == true}">
    <h:form id="adminReg" rendered="#{userBean.userAdmin == 'true'}">
    <h:form id="adminReg" rendered="#{true}">
    etc
    

    Of course, in between I cleared all validation markers, revalidated the file, restarted Eclipse, cleaned the project, etc. It keeps giving this warning.

    When I use the exact same expression in a .jsp file, no warning is given. Both the xhtml and jsp pages run fine using Tomcat 6.0.14.

    #275424 Reply

    Riyad Kalla
    Member

    arjan,
    Looks like a bug… I wonder if the validator is trying to call “getUserAdmin”… out of curiosity, if you refactor the name of the method to that, does the file valid?

    (I’m not asking you to keep it that way, just narrowing down what the problem would be… e.g. the validator doesn’ tknow to attempt “is” or “can” prefixes for boolean returns)

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: EL boolean flagged as warning in xhtml

You must be logged in to post in the forum log in