Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 52397 invoked from network); 21 Oct 2003 12:46:19 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 21 Oct 2003 12:46:19 -0000 Received: (qmail 60900 invoked by uid 500); 21 Oct 2003 12:46:13 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 60691 invoked by uid 500); 21 Oct 2003 12:46:12 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: dev@cocoon.apache.org Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 60678 invoked from network); 21 Oct 2003 12:46:11 -0000 Received: from unknown (HELO mx3.nada.kth.se) (130.237.222.96) by daedalus.apache.org with SMTP; 21 Oct 2003 12:46:11 -0000 Received: from nada.kth.se (tophat.nada.kth.se [130.237.218.31]) by mx3.nada.kth.se (8.12.10/8.12.10) with ESMTP id h9LCk8DN008591 for ; Tue, 21 Oct 2003 14:46:08 +0200 (MEST) Message-ID: <3F952A90.8060001@nada.kth.se> Date: Tue, 21 Oct 2003 14:46:08 +0200 From: Daniel Fagerstrom User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0 X-Accept-Language: sv, en-us MIME-Version: 1.0 To: dev@cocoon.apache.org Subject: Re: [VOTE] Add parameter to Woody {SelectionList,Widget}.generateSaxFragment References: <3F9465B0.4050306@apache.org> <3F94EAD4.1060206@anyware-tech.com> <3F950E90.5050005@cbim.it> <3F95111C.4080808@anyware-tech.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0 () X-Spam-Checker-Version: SpamAssassin 2.60 (1.212-2003-09-23-exp) X-Scanned-By: MIMEDefang 2.36 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Sylvain Wallez wrote: > Ugo Cei wrote: > >> Sylvain Wallez wrote: >> >>> Can you explain in more details what's the purpose of the >>> jxpathContext here and where its value come from? Adding a >>> dependency on JXPath so high in Woody interfaces doesn't seem good >>> to me. >> > Ok, I understand. I encountered a somehow similar problem and came to > the conclusion that what we need is actually to have > a pluggable component. > > We could then have type="default|flow-jxpath|javascript|whatever"> and the attributes and > content of this element be the configuration of the selection list. We > can then have the FlowJXPathSelectionListBuilder be Contextualizable > to give the Avalon Context to the FlowJXPathSelectionList it creates. > > The flow context is then available through > FlowHelper.getContextObject(ContextHelper.getObjectModel(avalonContext)). > > This would avoid passing along the context object and also use it in > situations other than generateSAXFragment() such as during form > validation (for closed enumerations). > > What do you think? > > Sylvain Maybe somewhat OT, but wouldn't it be a good idea to define an API for using expression languages access java objects. After all, there starting to be quite a few components in Cocoon that uses JXPath or other expression languages. An expression language component would make it easier to write and support such components and it would probably make the use of expression languages more standardized among components. JEX http://www.plotnix.com/jex/index.html is an example of what such an API could look like. JEX was added to jakarta-commons-sandbox but didn't take of, IIRC people thought that it was better to use BSF, but IMO something like JEX would be usefull for using expression languages in Cocoon. WDYT? /Daniel