cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Oliver <res1c...@verizon.net>
Subject Re: can you reach sitemap params from JXTemplate?
Date Thu, 21 Aug 2003 18:09:18 GMT
Sorry, my bad, the JXPath version should be this:

#{getParameter($parameters, 'publishedJobServer')}

and the Jexl version:

${parameters.getParameter('publishedJobServer')}

These do work (at least for me). The fact that you got no output from 
the Jexl version would seem to indicate that the specified parameter 
wasn't present. You can also call any method of 
org.apache.avalon.framework.parameters.Parameters, for example, try this:

<t:forEach var="paramName" items="${parameters.getNames()}">
   name=${paramName}, value=${parameters.getParameter(paramName)}
</t:forEach>

HTH,

Chris

Christopher Oliver wrote:

> Yes, it's a bug.
>
> Jeremy Quinn wrote:
>
>>
>> On Thursday, August 21, 2003, at 02:10 AM, Christopher Oliver wrote:
>>
>>> This is how you do it:
>>>
>>> #{$parameters.getParameter("publishedJobServer")}
>>
>>
>>
>> results in :
>> org.apache.commons.jxpath.JXPathException: Invalid XPath: 
>> '$parameters.getParameter(\"publishedJobServer\")'. Syntax error 
>> after: '$p'
>>
>>
>>>
>>> ${parameters.getParameter("publishedJobServer")}
>>>
>>
>> no output
>>
>> so I guess it must be a bug?
>>
>> Thanks for your suggestions
>>
>> regards Jeremy
>>
>>
>
>
>



Mime
View raw message