Return-Path: X-Original-To: apmail-deltaspike-users-archive@www.apache.org Delivered-To: apmail-deltaspike-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 51E5C11B74 for ; Fri, 2 May 2014 20:45:13 +0000 (UTC) Received: (qmail 19791 invoked by uid 500); 2 May 2014 20:45:12 -0000 Delivered-To: apmail-deltaspike-users-archive@deltaspike.apache.org Received: (qmail 19735 invoked by uid 500); 2 May 2014 20:45:12 -0000 Mailing-List: contact users-help@deltaspike.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@deltaspike.apache.org Delivered-To: mailing list users@deltaspike.apache.org Received: (qmail 19727 invoked by uid 99); 2 May 2014 20:45:12 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 May 2014 20:45:12 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of gerhard.petracek@gmail.com designates 209.85.192.44 as permitted sender) Received: from [209.85.192.44] (HELO mail-qg0-f44.google.com) (209.85.192.44) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 May 2014 20:45:08 +0000 Received: by mail-qg0-f44.google.com with SMTP id i50so3962099qgf.31 for ; Fri, 02 May 2014 13:44:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=rEd6NUtP3QpHylKLBxZGfkJQ5d9U7JiI/O8aYqsX2ck=; b=JnVR5oy4TfR8H/fayG24INCcDwpRSWWmHfV1oj+Qjp10AMyf1E5a1yIJYCjOXELnJp Za8s6efLVLIhGqxVJ2RhVY39F+Vv/4j/uMoc1SzljdaI/XXISl3SMsQEa9LfbytLTS/f c7ZCWyhnBVoHqAx5veuzTNWnhbMK/4KFwWgUDAvzYoNxAI1+bb9r3ngroOo1dvOCdw44 gNVhsNvrMtf3TQtRVWLCze28yeSVZpfAVOswmYGuWXIXG/QQ/IP5h0C6Cl9Y6SZ6bXeE MJq5SpkaZF5pfXoY7B0yL7iaz00sz9ju+Qh09BrSbzhhFT1PdjFZ8IQb6fXx+Z0L5dTL cdag== X-Received: by 10.140.89.18 with SMTP id u18mr23897562qgd.78.1399063485442; Fri, 02 May 2014 13:44:45 -0700 (PDT) MIME-Version: 1.0 Received: by 10.96.89.1 with HTTP; Fri, 2 May 2014 13:44:25 -0700 (PDT) In-Reply-To: References: From: Gerhard Petracek Date: Fri, 2 May 2014 22:44:25 +0200 Message-ID: Subject: Re: Get tree structure information from JSF type safe config To: users@deltaspike.apache.org Content-Type: multipart/alternative; boundary=001a11c11e4611714204f870da50 X-Virus-Checked: Checked by ClamAV on apache.org --001a11c11e4611714204f870da50 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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=C3=A9n : > 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 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=C3=A9n : > > > > > Hi, > > > > > > Yes, but it seems internal. > > > > > > > > > On 2 May 2014 17:06, Thomas Andraschko > > > 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=C3=A9n = : > > > > > > > > > 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. Th= e > > end > > > > > result is that when I add pages in my site it is pure javacode, t= he > > > > mapping > > > > > in the UI is done already. I also have support for @Exclude if th= ey > > are > > > > to > > > > > be hidden from the auto mapping. > > > > > > > > > > Anyway I would love if I could just get a tree structure right of= f > > the > > > > API > > > > > instead of constructing it myself. I need stuff like isParent > isLeaf > > > etc. > > > > > > > > > > cheers > > > > > > > > > > > > > > > --001a11c11e4611714204f870da50--