You cannot stamp an include. An include is executed during JSP/TagHandler
time. dataList/dataTable var is executed at stamping time. You would have to
use a forEach tag.

For more information I have written some blogs on the topic:
http://drewdev.blogspot.com/2008/08/cforeach-with-jsf-could-ruin-your-day.html
http://drewdev.blogspot.com/2008/06/understanding-datatable.html
http://drewdev.blogspot.com/2008/03/build-time-vs-render-time.html

On Fri, Sep 16, 2011 at 9:57 AM, Jakob Korherr <jakob.korh...@gmail.com>wrote:

> Hi Michael,
>
> How about using JSTL's c:forEach? This tag evaluates its child-tags
> for every element in the given value at tree build time. Thus you will
> have e.g. 10 <ui:include> evaluations instead of one. However, be
> careful with this stuff, b/c you can easily produce duplicate IDs.
>
> Regards,
> Jakob
>
> 2011/9/15 Michael Heinen <mhn4...@googlemail.com>:
> > Hi all,
> > I want to render items in a datalist via dynamic includes.
> >
> > Sample:
> > <t:dataList value="#{MyController.myLinks}"
> >            var="aLink"
> > ...
> > <ui:include src="#{aLink.aPath}
> > ...
> > </t:dataList>
> >
> > This does not work with facelets ui:include because it is evaluated only
> > once and too early.
> > How can I accomplish dynamic includes with JSF 1.2 and facelets?
> >
> > Currently I use a lot of groups with simple rendered checks but I want to
> > get rid of them for better performance and reuseability .
> >
> > Michael
> >
>
>
>
> --
> Jakob Korherr
>
> blog: http://www.jakobk.com
> twitter: http://twitter.com/jakobkorherr
> work: http://www.irian.at
>

Reply via email to