The conditional operator works in many attributes like "rendered" "value" and others.
But it does not work in action? Or am I doing it wrong?
<h:commandLink action="#{true ? bean.methodTrue() : bean.methodFalse()}"/>
Error: javax.el.ELException: Not a Valid Method Expression
(I realized it using primefaces ajax action attribute)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…