velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nathan Bubna" <nat...@esha.com>
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:

toolboxContext.get(key)
super.internalGet(key)
request/response/session/application
request attributes
session attributes
application attributes

Nathan Bubna
nathan@esha.com


--
To unsubscribe, e-mail:   <mailto:velocity-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:velocity-user-help@jakarta.apache.org>


Mime
View raw message