Claude said:
> Would it be possible - and how - to pass some initialization parameters to
the tools ?

that's an interesting idea.  just out of curiousity, what do you need this
for?

> We would need something like the ViewTool interface, but the
VelocityViewServlet considers implicitely that the init method of this
> interface is meant to receive the ViewContext.

yes, the VelocityViewServlet presently uses the ServletToolboxManager which
initializes tools with the ViewContext.   One option for you if you need
this ability right now, is to extend the VelocityViewServlet to use a
ToolboxManager of your own.   You would need to override VVS's
init(ServletConfig) and createContext(req, res)  methods to do this.

as for your question...  to be honest, i'm guessing that this feature
request is not likely to be needed or used by many people, and it could be
troublesome to implement in a clean, generalized manner.  i can, however,
easily imagine other people having similarly uncommon needs for their tools.
as such, there is something i considered when i rewrote the toolbox support
but didn't get around to implementing.   i think perhaps it could be cool to
give developers the option of specifying in their web.xml an alternate
ToolboxManager for VVS to use.  This would not save you from writing your
own manager or extending/modifying the ServletToolboxManager, but it would
eliminate the need to extend the VVS.  thoughts?

Nathan Bubna
[EMAIL PROTECTED]


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to