Unfortunately, JSP EL and JSF EL don't play nicely together.  This will be fixed in JSF 1.2 with the Unified EL. In the meantime, here's a hack that should work:

<%-- Step 1: Use a non-displayed dataTable to pull userList into request --%>
<h:dataTable var="employee" value="#{employeeBacking.employee}" style="display:none"/>

        <c:forEach items="${employeeBacking.employees}" var="emp" varStatus="status">
            <c:out value="${status.index}"/><br/>
        </c:forEach

You could also use an h:dataTable to do the iteration.

Hope this helps,

Matt

On Aug 23, 2005, at 9:50 AM, Rick Reumann wrote:

I understand the below won't work as is without the backing bean put in scope with a useBean construct...but I'm more curious why I can not get c:out to evaluate (or really I should also just be able to use ${..} without the c:out since using tomcat5). What I end up getting is the literal text ${status.index} being displayed. I've tried with commons-el.jar and without and the same result:( 

<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<f:view>
    <h:form>
        <c:forEach items="${employeeBacking.employees}" var="emp" varStatus="status">
            <c:out value="${status.index}"/><br/>
        </c:forEach>
    </h:form>
</f:view>
 

Reply via email to