JSTL Var in JSF binding

Hello all,

i need to do some thing like this :

<c:forEach var="entry" items="${sessionScope.MyBean.listStep}" varStatus="status">

<c:set var="Index" value="${status.index}" scope="session" />

...

<h:selectOneMenu binding="#{MyBean.structItemArray[Index].item1Selected}" >

<f:selectItems binding="#{MyBean.listItem1}" />

</h:selectOneMenu>

...

</c:forEach>

StructItem is a class with properties : item1Selected, item2Selected, ...

and MyBean has Private StructItem[] StructstructItemArray ;

it seems that :

#{MyBean.structItemArray[Index].item1Selected} DON'T WORK

#{MyBean.structItemArray[0].item1Selected}

#{MyBean.structItemArray[1].item1Selected}... WORK

Could some one help me ?

if you want more just ask !

thx

[1066 byte] By [mattraxa] at [2007-11-26 15:16:03]
# 1
As far as I know, you cannot mix (JSTL, JSP ) with JSF tags. But I think that there are some forEach JSF tags.
gs03anna at 2007-7-8 10:49:13 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

> As far as I know, you cannot mix (JSTL, JSP ) with

> JSF tags. But I think that there are some forEach JSF

> tags.

I think with JSP2.0 EL one cannot mix JSTL and JSF tags.

But with JSP2.1 , JSF 1.2 and Unified EL on Servlet 2.5 according to what's written here: http://java.sun.com/products/jsp/ it is possible to mix JSTL and JSF tags.

I haven't personally tried this to verify it, since I'm new to JSF.

Message was edited by:

appy77

appy77a at 2007-7-8 10:49:13 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...