[ 
https://issues.apache.org/jira/browse/VELTOOLS-94?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12587856#action_12587856
 ] 

Nathan Bubna commented on VELTOOLS-94:
--------------------------------------

Ok, i think #1 is fully taken care of by revision 647050.

#2 still seems trivial as it stands.   Not sure if there's something you think 
should be done there.

the usecase for #3 is still a little mysterious to me.  and no, i think you 
only need to intercept the ViewToolContext and call putToolProperty(String, 
Object) before the targeted tool(s) are created.  it shouldn't be necessary to 
subclass all those classes.  but without understanding what the goal here is, 
it's hard to be sure if that would do it.  in any case, if you say you have use 
for it, go ahead and make VelocityView.getToolboxFactory() public.  but i still 
think any changes to the ToolboxFactory need to go through the configure() 
method.    Of course, making late changes like that can only affect request 
tools or tools in subsequently created session Toolboxes, so there are limits 
to what further factory configuration can accomplish, but i suppose that should 
be obvious considering their scoping.

> Document standard use cases with J2EE filters
> ---------------------------------------------
>
>                 Key: VELTOOLS-94
>                 URL: https://issues.apache.org/jira/browse/VELTOOLS-94
>             Project: Velocity Tools
>          Issue Type: Improvement
>          Components: Documentation
>    Affects Versions: 2.0
>         Environment: all
>            Reporter: Claude Brisson
>            Priority: Minor
>
> (yet another docs reminder...)
> There are some use cases concerning J2EE filters that I'd like to 
> address/document before releasing 2.0 final:
> 1. sharing the VelocityView with filters - made very easy in 2.x, using:
> view = (VelocityView)servletContext.getAttribute(VelocityView.class.getName())
> but the loat-a-startup flag must be set on the servlets for the view to be 
> initialized at the time the filter is called.
> [BTW, the VelocityView(ServletContext) exists but is not yet fully coded - 
> init is not yet called. We should either comment it for now or refactor 
> VV.init/configure to work either with a ServletConfig or ServletContext. 
> Personally I don't need it at all.]
> 2. having a filter add objects in the context: very easy, objects should be 
> put in targeted scopes using request/session/application attributes.
> 3. having a filter add a tools property (that will be added to newly created 
> request/session tools using bean setters or configure): I'm not really sure 
> about this one. With the current codebase, it is necessary to subclass both 
> the VV and the ToolboxFactory to circumvent protected accesses to be able to 
> do sthing like this:
> VV.getToolboxFactory().putProperties(scope,props)
> I'd vote for having those two methods made public.
> [BTW, subclassing of the VV also requires for now the subclassing of the 
> VVS... maybe ServletUtils.getVelocityView could check a configuration 
> property like "velocity.tools.view.class=" containing the classname of the 
> VelocityView subclass to be used]

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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

Reply via email to