On 8/23/06, Daniel Kröger <[EMAIL PROTECTED]> wrote:
I'm a bit confused since the description of the var attribute for the
dataTable action says it's the request scope variable that holds the
current row object.

But the following exemplary code doesn't work anyway:

<h:dataTable value="#{children}" var="child">
   <h:column>
     <h:outputText value="#{child.name}"/>
     <f:verbatim>${child.name}</f:verbatim>
   </h:column>
</h:dataTable>

So is there any other way to access the current var attribute from a
normal JSP expression or action?

<h:outputText value="#{child.name}"/> will work.  If it's not working,
it's probably because #{children} is wrong or empty.  Generally, it''s
#{bean.list} so what you have there looks a little odd.

<f:verbatim>${child.name}</f:verbatim> will not work.   $ searches the
jsp scope, not the JSF scope.   I think this scope is only used when
the page is compiled, but I don't use JSP.

Reply via email to