Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

action="#{(condition) ? method1 : method2)}"

843842Mar 15 2005 — edited Mar 16 2005
Hi 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.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 13 2005
Added on Mar 15 2005
6 comments
141 views