Return-Path: Delivered-To: apmail-forrest-dev-archive@www.apache.org Received: (qmail 73422 invoked from network); 24 Aug 2005 17:54:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 24 Aug 2005 17:54:51 -0000 Received: (qmail 80127 invoked by uid 500); 24 Aug 2005 17:54:50 -0000 Delivered-To: apmail-forrest-dev-archive@forrest.apache.org Received: (qmail 80088 invoked by uid 500); 24 Aug 2005 17:54:50 -0000 Mailing-List: contact dev-help@forrest.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@forrest.apache.org List-Id: Delivered-To: mailing list dev@forrest.apache.org Received: (qmail 80061 invoked by uid 99); 24 Aug 2005 17:54:49 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Aug 2005 10:54:49 -0700 X-ASF-Spam-Status: No, hits=0.1 required=10.0 tests=FORGED_RCVD_HELO X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [81.169.145.166] (HELO natnoddy.rzone.de) (81.169.145.166) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Aug 2005 10:55:06 -0700 Received: from 172.26.0.5 (242.Red-213-97-135.pooles.rima-tde.net [213.97.135.242]) by post.webmailer.de (8.13.1/8.13.1) with ESMTP id j7OHsiR2012511; Wed, 24 Aug 2005 19:54:45 +0200 (MEST) Subject: Re: Fallback resolver Vs. Locationmap (was Re: svn commit: r233401 - in /forrest/trunk: main/webapp/ main/webapp/WEB-INF/xconf/ site-author/ whiteboard/plugins/org.apache.forrest.plugin.internal.view/ whiteboard/plugins/org.apache.forrest.plugin.inte From: Thorsten Scherler To: twilliams@apache.org, forrest dev In-Reply-To: <4998884405082406541a5641f2@mail.gmail.com> References: <20050819004415.38319.qmail@minotaur.apache.org> <43059DD5.9050801@apache.org> <1124459113.5100.17.camel@localhost.localdomain> <430A07AF.3070202@apache.org> <1124746287.5092.50.camel@localhost.localdomain> <430C77F4.4040504@apache.org> <4998884405082406541a5641f2@mail.gmail.com> Content-Type: text/plain Date: Wed, 24 Aug 2005 19:54:43 +0200 Message-Id: <1124906084.13647.13.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.0.2 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N On Wed, 2005-08-24 at 09:54 -0400, Tim Williams wrote: ... > > >>If I understand you the functionality is the same, and appears to be > > >>more flexible in the locationmap (although I'm in a noisy net cafe and > > >>cannot concentrate fully). Can we stick to just one solution? > > > > > > > > > Yes, why not, but the locationmap is not a solution to my problem right > > > now, that is how I personally see it. If you can provide an example how > > > the lm is solving the fallback mechanism for views without defining all > > > the fallbacks in the lm then I will be more then happy to use it. > > > > Do you meand "the user defining all the fallbacks"? in the sense of > > Forrest defining some locations and the user (optionally) defining some. > > If so I address this above, otherwise I don't understand your point, > > please expand. > > Here's what I think I understand of the problem. His fallbacks work > like this in order: > > 1. File-based > 2. Directory-based > 3. Parent-directory based (recursively) > 4. Theme based > 5. Application Default > Yes, that is right. I will add a doctype specific fallback as well the next days which I am right now developing. > Ok, maybe not exactly, but it gives the general idea. Anyway, > locationmaps can solve all of those except, I think, #3. We have no > ability to do a "..\" up the directory tree until we find it. We can't > dissect the "matcher" result enough to do it either if that makes any > sense. I think either way we're probably going to need some java code > to do this stuff. exactly!!! Thanks for writing this down so spot on, Tim. :) > One might argue that it should be a new selector I > suppose -- in which case, I'd say that it should only handle the > generic directory traversing part and not forrest-specific defaults. > In other words, implement the recursive directory traversal with a new > selector and use the built-in capability of the lm to do the rest -- > that'd give us a more generic directory traversing selector. Agreed (partly). ;-) The design of the action is quite generic already and could be reused in any cocoon based app that needs fallbacks, anyway the combination like you suggest seems to be very nice. Can a selector in the lm provide a map? Can I use: If the selector returns null then the child will be ignored, otherwise it will use the {calculatedValue} that have been placed in the returning map of the selector. Is that possible? TIA. salu2 -- thorsten "Together we stand, divided we fall!" Hey you (Pink Floyd) -------------------------------------------------------------- Thorsten Scherler Wyona Inc. - Open Source Content Management - Apache Lenya http://www.wyona.com http://lenya.apache.org thorsten.scherler@wyona.com thorsten@apache.org