2013/5/25 Andrea Aime <[email protected]>
> On Wed, May 22, 2013 at 1:59 PM, Mauro Bartolomeoli <
> [email protected]> wrote:
>
>> Hi,
>> I think it would be useful to have access to request parameters from
>> GetFeatureInfo ftl templates, to have some form of conditional templates,
>> based on the user request.
>> My first thought went to the ENV parameter, so I tried to add the values
>> defined in it to the template context.
>> Each ENV variable would be available as env_<VARNAME>.
>>
>> So, is ENV the right parameter for this type of behaviour? Is there any
>> other request parameter that could be added to ftl input object?
>>
>
> Ciao Mauro,
> generally speaking, I'm wondering if we can just give the template the
> whole parsed KVP map,
> which can be retrieved from the Dispather.REQUEST thread local, kvp
> variable.
> Then accessing the env variables would be a matter of double map access,
> request.env.mykey,
> although right now I don't remember the exact syntax
>
> Cheers
> Andrea
>
Yes. I think this is a good idea. I only see one caveat: at the Dispatcher
level I think parameters are available only in string form (correct me if I
am wrong), so for example the ENV would not be directly available as a Map.
Maybe we should make available the GetFeatureInfoRequest properties tha are
already parsed (together with the internal GetMapRequest that holds most of
the parameter, such as ENV). Maybe we What do you think?
Mauro
--
==
GeoServer training in Milan, 6th & 7th June 2013! Visit
http://geoserver.geo-solutions.it for more information.
==
Dott. Mauro Bartolomeoli
@mauro_bart
Senior Software Engineer
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
http://www.geo-solutions.it
http://twitter.com/geosolutions_it
-------------------------------------------------------
------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel