JSF 2: Using enums in the rendered attribute

后端 未结 4 1276
忘掉有多难
忘掉有多难 2020-12-24 08:22

Is there any way to check declaratively whether an enum has a specified value. For example:



        
4条回答
  •  轮回少年
    2020-12-24 08:46

    Until EL 3.0 it's not possible to import enums in EL scope. You can however just treat and compare them like strings, i.e. the enum constant value must be quoted like below.

    
    

提交回复
热议问题