Using greater than logical expression in rendered attribute

后端 未结 2 1941
北荒
北荒 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: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}"
    

提交回复
热议问题