Return-Path: Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 91119 invoked by uid 500); 20 Aug 2003 17:11:35 -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 91043 invoked from network); 20 Aug 2003 17:11:34 -0000 Received: from unknown (HELO trinity.anyware-tech.com) (217.112.237.100) by daedalus.apache.org with SMTP; 20 Aug 2003 17:11:34 -0000 Received: (qmail 24225 invoked from network); 20 Aug 2003 17:11:20 -0000 Received: from unknown (HELO anyware-tech.com) (10.1.0.254) by trinity.anyware-tech.com with SMTP; 20 Aug 2003 17:11:20 -0000 Message-ID: <3F43ABB7.7010202@anyware-tech.com> Date: Wed, 20 Aug 2003 19:11:19 +0200 From: Sylvain Wallez Organization: Anyware Technologies User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: fr, en, en-us MIME-Version: 1.0 To: dev@cocoon.apache.org Subject: Re: can you reach sitemap params from JXTemplate? References: <82A8E76E-D31B-11D7-875E-0003935AD2EE@media.demon.co.uk> In-Reply-To: <82A8E76E-D31B-11D7-875E-0003935AD2EE@media.demon.co.uk> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Jeremy Quinn wrote: > Hi All > > Does anyone know the correct syntax for getting a Sitemap parameter in > JXTemplate? > > I have tried all of the following: > > #{cocoon/parameters["publishedJobServer"]} > #{cocoon/parameters/publishedJobServer/} > ${cocoon.parameters["publishedJobServer"]} > ${cocoon.getParameters("publishedJobServer")} > ${cocoon.parameters.publishedJobServer} > > > The first two throw exceptions, the others output nothing. > I can use cocoon.getParameters("publishedJobServer") in my FlowScript > without a problem, but I would prefer not to have to pass it specially > to the view in cocoon.sendPage(). > > Any ideas? The "cocoon" object only exists in the flowscript. In JXTemplate, you can directly access the "parameters" variable : #{$parameters.getParameter('publishedJobServer')} This makes me think we should unify the notation across the various components of a flow-script application. In this regard, it would be more consistent to have "request", "session", "context" and "parameter" as children of a "cocoon" variable instead of having them directly as toplevel variables. Or are they available as toplevel variables to mimic JSTL from which JXTemplate is inspired ? Sylvain -- Sylvain Wallez Anyware Technologies http://www.apache.org/~sylvain http://www.anyware-tech.com { XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects } Orixo, the opensource XML business alliance - http://www.orixo.com