AFAICT the patch you provided doesn't immediately address your
concern--it merely provides a hook to re-pull the PullTools into the
context a *second* time. Is this really what you want? I don't like
to expand interfaces without strong reasons. Finally, you
have not included patches to the VelocityService interface nor the
TurbineVelocity static wrapper class. I don't mind continuing this
discussion if you have more questions/comments.
Dan
"Youngho Cho" <[EMAIL PROTECTED]> writes:
> Hi Daniel,
>
> I think that , the proper pulling timing is just before when it need.
> In our case , it is the just before velocity use the context.
> But the orignal code ,
> when the context generates , then the pulling is happened from the begining.
> During the time period between this time and the velocity uses
> there are so many changed and it is too long time.
> For example, LoginUser action class.
> The Turbine LoginUser action class is extended from Action.
> But if we want to use it as a subclass of VelocityAction, then we have some problem
> with session / persistent scope tool.
> I have one another problem looks like this one ( suspected ) in case of request
>scope tool even.
> ( I'm investigateing the root cause now.)
>
> Therefore I think that In order to change the pulling time , I am not sure where it
>is exactly placed,
> to clear above issuses at this moment,
> But It is need to make requestPull method as a VelocityService method
> and call it from the right time and right place.
> ( Just before the velocity use it I think )
>
> Thanks,
>
> youngho.
>
> ps : sorry for my poor English.
>
>
>
> ----- Original Message -----
> From: Daniel Rall <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, June 12, 2001 2:32 AM
> Subject: Re: [patch] TurbineVelocityService.java
>
>
> > Hi Youngho. You haven't made a good enough case for inclusion of your
> > patch in CVS. If you feel strongly about it, or just think it's the
> > Right Thing, please expand on your reasoning.
> >
> > Thanks!
> >
> > Daniel
> >
> >
> > "Youngho Cho" <[EMAIL PROTECTED]> writes:
> >
> > > Hi,
> > >
> > > I'm not sure Is it a perfect place to put Pull Objects into VelocityContext at
>the beginning.
> > > when we finalize a perfect place , then we can use requestPull method as a
>interface method.
> > >
> > > Thanks
> > >
> > > youngho
> > >
> > > Index: TurbineVelocityService.java
> > > ===================================================================
> > > RCS file:
>/home/cvspublic/jakarta-turbine/src/java/org/apache/turbine/services/velocity/TurbineVelocityService.java,v
> > > retrieving revision 1.47
> > > diff -u -r1.47 TurbineVelocityService.java
> > >
> > > @@ -208,29 +208,34 @@
> > > */
> > > Context context = (Context)
> > > data.getTemplateInfo().getTemplateContext(VelocityService.CONTEXT);
> > > -
> > > +
> > > if (context == null)
> > > {
> > > context = getContext();
> > > context.put ( "data", data );
> > >
> > > - if (pullModelActive)
> > > - {
> > > - /*
> > > - * Populate the toolbox with request scope, session scope
> > > - * and persistent scope tools (global tools are already in
> > > - * the toolBoxContent which has been wrapped to construct
> > > - * this request-specific context).
> > > - */
> > > - TurbinePull.populateContext(context, data);
> > > - }
> > > -
> > > + requestPull( context , data );
> > > +
> > > data.getTemplateInfo().setTemplateContext(
> > > VelocityService.CONTEXT, context);
> > > }
> > > return context;
> > > }
> > > -
> > > +
> > > + public void requestPull(Context context , RunData data)
> > > + {
> > > + if (pullModelActive)
> > > + {
> > > + /*
> > > + * Populate the toolbox with request scope, session scope
> > > + * and persistent scope tools (global tools are already in
> > > + * the toolBoxContent which has been wrapped to construct
> > > + * this request-specific context).
> > > + */
> > > + TurbinePull.populateContext(context, data);
> > > + }
> > > + }
> > > +
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]