@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 <[email protected]>:

> Hi,
>
> Yes, but it seems internal.
>
>
> On 2 May 2014 17:06, Thomas Andraschko <[email protected]>
> 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 <[email protected]>:
> >
> > > 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
> > >
> >
>

Reply via email to