Question

I would like to declare a conditional method expression in EL like below:

<p:dataTable id="#{cc.attrs.datatableId}" var="overview" 
    rowSelectListener="#{cc.attrs.detailsMode == 'single' ? cc.attrs.bean.onRowSelect : cc.attrs.bean.onRowUrlSelect}">

However, it throws an EL exception:

javax.el.ELException: Not a Valid Method Expression: #{ cc.attrs.detailsMode == 'single' ? cc.attrs.bean.onRowSelect : cc.attrs.bean.onRowUrlSelect}

How I can declare a conditional EL method expression?

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top