users@javaserverfaces-spec-public.java.net

[jsr372-experts mirror] [jsr372-experts] Re: Re: Re: 1103-IterableInUIRepeatUIData

From: Josh Juneau <juneau001_at_gmail.com>
Date: Thu, 19 Feb 2015 13:24:52 -0600

+1, good idea!

Josh Juneau
juneau001_at_gmail.com
http://jj-blogger.blogspot.com
https://www.apress.com/index.php/author/author/view/id/1866


On Thu, Feb 19, 2015 at 8:36 AM, Frank Caputo <frank_at_frankcaputo.de> wrote:

> This is great. I'd like to see a backport issue to 2.2.x. Though it is not
> officially supported, developers can use it right now.
>
> Ciao Frank
>
> > Am 19.02.2015 um 13:07 schrieb arjan tijms <arjan.tijms_at_gmail.com>:
> >
> > On Thu, Feb 19, 2015 at 12:00 PM, Bauke Scholtz <balusc_at_gmail.com>
> wrote:
> >> Big +1. Finally support for Set (and thus also Map#entrySet()) in
> ui:repeat.
> >
> > Ok, thanks!
> >
> >> Would be even more cool if it transparently recognizes Map like
> c:forEach so
> >> we don't need value="#{bean.map.entrySet()}" everytime.
> >
> > Good one, I do think that one requires a separate issue though.
> >
> > Kind regards,
> > Arjan
> >
> >
> >
> >>
> >> Cheers, B
> >>
> >> On Wed, Feb 18, 2015 at 6:11 PM, arjan tijms <arjan.tijms_at_gmail.com>
> wrote:
> >>>
> >>> Hi,
> >>>
> >>> As a relatively small thing that was left open from 2.2; issue 1103
> >>> deals with extending the support that 2.2 added for Collection in
> >>> UIData to UIRepeat, and additionally upgrading the support for both to
> >>> Iterable.
> >>>
> >>> I created a changebundle for that here:
> >>> https://java.net/jira/secure/attachment/54434/changebundle.txt
> >>>
> >>> I think it's a fairly low impact change; the test for iterable is the
> >>> last test, so for UIData the existing code will hit first for List and
> >>> then Collection if any such types are passed in, and only if the type
> >>> is none of these, but is Iterable, will the Iterable test hit and use
> >>> a new IterableDataModel.
> >>>
> >>> For UIRepeat there never was Collection support, so there the code
> >>> will hit if a Collection is passed in, as well as when an Iterable is
> >>> passed in.
> >>>
> >>> As for the implementation code, the IterableDataModel that is used has
> >>> been field tested in OmniFaces for some time now.
> >>>
> >>> Thoughts?
> >>>
> >>> Kind regards,
> >>> Arjan Tijms
> >>
> >>
>
>