action="#{(condition) ? method1 : method2)}"
843842Mar 15 2005 — edited Mar 16 2005Hi all,
I'm trying to implement a simple tree behavior with a dataTable.
The first column of the table is an htmlCommandLink. I'd like it to call either Expand or Collapse depending on the selected row.
I've tried:
- action="#{bean.value}" (value of type java.lang.reflect.Method)
- action="#{bean.value}" (value of type String)
- action="#{(bean.condition) ? bean.method1 : bean.method2}"
- action='#{(bean.condition) ? "bean.method1" : "bean.method2"}'
None of that works.
Is this anything JSF can easily do?
Thanks much.