Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 19102 invoked from network); 11 May 2005 10:51:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 11 May 2005 10:51:45 -0000 Received: (qmail 65750 invoked by uid 500); 11 May 2005 10:55:17 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 65700 invoked by uid 500); 11 May 2005 10:55:17 -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 List-Id: Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 65683 invoked by uid 99); 11 May 2005 10:55:17 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from v07274.home.net.pl (HELO v07274.home.net.pl) (212.85.125.162) by apache.org (qpsmtpd/0.28) with SMTP; Wed, 11 May 2005 03:55:16 -0700 Received: from sj162.internetdsl.tpnet.pl (HELO ?192.168.1.62?) (lgawron.mobilebox@home@80.55.87.162) by matrix15.home.net.pl with SMTP; Wed, 11 May 2005 10:51:32 -0000 Message-ID: <4281E3B6.2040007@mobilebox.pl> Date: Wed, 11 May 2005 12:51:34 +0200 From: Leszek Gawron User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: dev@cocoon.apache.org Subject: Re: #{$cocoon/request/request/protocol} References: <4280C6C4.5090302@mobilebox.pl> <4280CF5A.2010603@reverycodes.com> <4280D214.1020806@mobilebox.pl> <4280D573.8040007@mobilebox.pl> <4280E00B.6020502@nada.kth.se> <4281D644.6040204@apache.org> <4281E16E.105@nada.kth.se> In-Reply-To: <4281E16E.105@nada.kth.se> Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Daniel Fagerstrom wrote: > Sylvain Wallez wrote: > >> Daniel Fagerstrom wrote: > > > > >>> Sylvain refactored the environment handling in flow to simplify it, >>> but it also lead to some back incompatibilities that we had long >>> heated discussions about this in the begining of this year, check the >>> archive. The varoious changes in the TemplateObjectModelHelper was to >>> keep it in synch with the changes in FOM_Cocoon. >> >> >> For the record, the back incompatible changes were removed :-) > > > I know that you removed them. But $cocoon/request/property doesn't work > for JXPath, you need $cocoon/request/getProperty() instead, IIUC. I > think this has to do with the functionality of > FOM_Cocoon.AttributeHolderJavaObject and that it is an effect of the > refactoring, but maybe it didn't work before either. $cocoon/request/getProperty() this will not work now either. JXPath queries FOM_Request for properties (with public getters - thats my understanding) and gets none "meaningful" as FOM_Request looks like this: > public static class FOM_Request extends AttributeHolderJavaObject { > private final Request request; > > public FOM_Request(Scriptable scope, Request request) { > super(scope, request, Request.class); > this.request = request; > } > > protected Enumeration getAttributeNames() { > return this.request.getParameterNames(); > } > > protected Object getAttribute(String name) { > return this.request.getParameter(name); > } > } If you "accidentally" provide a getter for private final Request request; than you are able to do $cocoon/request/request/protocol and the properties are visible. It means that FOM_Request is not able to properly proxy Request interface to JXPath. -- Leszek Gawron lgawron@mobilebox.pl IT Manager MobileBox sp. z o.o. +48 (61) 855 06 67 http://www.mobilebox.pl mobile: +48 (501) 720 812 fax: +48 (61) 853 29 65