Using greater than logical expression in rendered attribute

后端 未结 2 1939
北荒
北荒 2021-01-01 12:49

I have an outputText field for which I write a condition in the rendered attribute. The condition is for comparing the length of the string with so

相关标签:
2条回答
  • 2021-01-01 13:37

    You have to use gt and lt operators.

    Check out JavaServer Faces Expression Language Intro from Sun/Oracle. Precisely the Operators section.

    0 讨论(0)
  • 2021-01-01 13:41

    rendered only accepts EL expression.

    subsAlertsHelper.personEmail.length() is incorrect.

    On the personEmail object, add a method getLength() witch returns the length

    public int getLength(){ return this. length();}
    

    Modify :

    rendered="#{subsAlertsHelper.personEmail.length >20}"
    
    0 讨论(0)
提交回复
热议问题