deltaspike-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gerhard Petracek <gerhard.petra...@gmail.com>
Subject Re: Get tree structure information from JSF type safe config
Date Fri, 02 May 2014 20:44:25 GMT
ViewConfigNode has a quite different purpose -> we can't just expose it
(for such use-cases).
-> we would need to add more complexity (new api + re-building the tree)
and the benefit is more cosmetic for the use-case(s) we know so far.
(+ there isn't even a real difference in view of the performance.)

regards,
gerhard



2014-05-02 21:55 GMT+02:00 Karl Kildén <karl.kilden@gmail.com>:

> Thanks Gerhard, this is close to my actual implementation that is working
> fine. I just felt that offering a tree in the API would make the api
> richer.
>
> cheers
>
>
> On 2 May 2014 20:03, Gerhard Petracek <gerhard.petracek@gmail.com> wrote:
>
> > @karl:
> > you can also use ViewConfigResolver#getConfigDescriptors (and
> #getMetaData
> > per ConfigDescriptor) to find the entries with your meta-data.
> > -> use #getViewConfigDescriptors to find the pages with the same
> base-path
> > (see #getPath).
> > it's a bit slower than traversing an existing tree, however, you just
> need
> > to do it once and cache the result in an application-scoped bean.
> >
> > @thomas:
> > initially it's a tree during the scanning process.
> > at the end it gets converted to a map for a faster access (every entry
> > contains the final meta-data).
> >
> > regards,
> > gerhard
> >
> > http://www.irian.at
> >
> > Your JSF/JavaEE powerhouse -
> > JavaEE Consulting, Development and
> > Courses in English and German
> >
> > Professional Support for Apache MyFaces
> >
> >
> >
> > 2014-05-02 19:19 GMT+02:00 Karl Kildén <karl.kilden@gmail.com>:
> >
> > > Hi,
> > >
> > > Yes, but it seems internal.
> > >
> > >
> > > On 2 May 2014 17:06, Thomas Andraschko <andraschko.thomas@gmail.com>
> > > wrote:
> > >
> > > > Hi Karl,
> > > >
> > > > is think the structure is already available. Check ViewConfigNode.
> > > > Don't know if it's only internal or not.
> > > > Maybe Gerhard could give a hint here.
> > > >
> > > > Regards,
> > > > Thomas
> > > >
> > > >
> > > >
> > > > 2014-05-02 16:57 GMT+02:00 Karl Kildén <karl.kilden@gmail.com>:
> > > >
> > > > > Hello!
> > > > >
> > > > > I would like a tree structure from type safe configs. I create it
> > > myself
> > > > > now but I think the API could support it better. Each interface
> > > (folder)
> > > > is
> > > > > mapped to a category in my site. These categories are top level
> > > > navigation
> > > > > choices. Each category is clickable like this:
> > > > > http://www.primefaces.org/showcase/ui/menubar.jsf I As in that
> > > > primefaces
> > > > > example I have something similar. Take their first item, "File".
> > > > >
> > > > > In my example I do have @Folder interface File. As you may guess
> if I
> > > > click
> > > > > my arrow I can select all pages defined under the folder File. The
> > end
> > > > > result is that when I add pages in my site it is pure javacode, the
> > > > mapping
> > > > > in the UI is done already. I also have support for @Exclude if they
> > are
> > > > to
> > > > > be hidden from the auto mapping.
> > > > >
> > > > > Anyway I would love if I could just get a tree structure right off
> > the
> > > > API
> > > > > instead of constructing it myself. I need stuff like isParent
> isLeaf
> > > etc.
> > > > >
> > > > > cheers
> > > > >
> > > >
> > >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message