velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nathan Bubna" <>
Subject Re: VELTOOLS - App scope items?
Date Wed, 10 Jul 2002 14:24:27 GMT
Tim said:
> How would I disallow an HTML designer from invoking any public method
> they please on that $application variable? (ex.
> $application.removeAttribute("it_would_be_bad_to_remove_me")

uh... don't tell them that $application is there? :-)

ok, actually, this is good question.  i'm sure it would be best to have some
sort of configurable ChainedContext or make the ViewContext used by VVS
pluggable (with some prepackaged options perhaps).
but, as an easier and more immediate solution, would it be enough if we
changed the search order in ChainedContext's internalGet(String) method to
put the request/response/session/application at the end?   That would allow
you to override the key "application" with an application-scope ViewTool
that wraps the ServletContext and only exposes the methods you feel
comfortable giving to the designer.   I'm thinking a search order for
ChainedContext like:

request attributes
session attributes
application attributes

Nathan Bubna

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message