myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "l.penet@senat.fr" <l.pe...@senat.fr>
Subject Re: c:forEach issue in JSF 2
Date Wed, 01 Jul 2015 08:09:57 GMT
On 01/07/2015 10:01, khush N wrote:
> Hi Thomas,
>
> Thank you for the quick reply!
>
> I am using JSF 2.2. As mentioned in my previous email, I have huge code
> base which is using c:forEach tag. So, it would be really great if I can
> figure out the real issue with c:forEach.
>
> If there is not other way to make c:forEach work, I will have to switch to
> ui:repeat.
ui:repeat is not an equivalent of c:forEach.

c:forEach is evaluated when building the component tree.
ui:repeat is evaluated after the component tree is build.

So, code such as :

<p:dataTable ...>
<c:forEach ...>
<p:row>
...
</p:row>
</c:forEach>
</p:dataTable>

Will generate p:row  components according to your c:forEach, which will 
be taken in account by the p:dataTable component.
But this will not work with ui:repeat.

Ludovic

|
| AVANT D'IMPRIMER, PENSEZ A L'ENVIRONNEMENT.
|


Mime
View raw message