tags:

views:

8

answers:

1

I am using tomahawk dataList, where I use

rowIndexVar="rowIndex"

Inside the dataList I have been using verbatim, where I need to retreive the rowIndex thro' JSP EL ${rowIndex}. How can I achieve it.

+1  A: 

Anything in <f:verbatim> will be treated as template text. If you want to evaluate EL expressions, simply put it outside <f:verbatim>.

I.e. don't do

<f:verbatim><p><h:outputText value="#{rowIndex}" /></p></f:verbatim>

but rather do

<f:verbatim><p></f:verbatim>
    <h:outputText value="#{rowIndex}" />
<f:verbatim></p></f:verbatim>

True, it's ugly, but if you're using JSF 1.2 or newer, you can omit the <f:verbatim> anyway.

<p><h:outputText value="#{rowIndex}" /></p>

Or if you're on JSF 2.0 with Facelets, you can even use unified EL in template text:

<p>#{rowIndex}</p>
BalusC