You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by Will Glass-Husain <wg...@forio.com> on 2003/10/28 15:05:42 UTC
Re: input event cartridge
Yay! I've been using this patch on my private build for some time now, and
find it quite useful.
What are you thinking regarding your comment on configuring an event
cartridge? Do you mean that there should be a "relativeload" event
cartridge that can be used at the developer's discretion?
WILL
----- Original Message -----
From: "Geir Magnusson Jr." <ge...@optonline.net>
To: "Velocity Developers List" <ve...@jakarta.apache.org>
Sent: Tuesday, October 28, 2003 3:51 AM
Subject: Re: patch requests
>
> On Sunday, October 26, 2003, at 12:33 AM, Will Glass-Husain wrote:
>
> >
> > http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20342
> > new event handler for input directives (#parse, #include)
>
> I love this idea, and there is a related suggestion :
>
> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18072
>
> which I am less of a fan of the solution, because I think you'd run
> into serious confusion especially w/ things invoked from VMs.
>
> However, I think we can combine the two ideas because the former covers
> the latter. The event handler method is natural now. In order to make
> it automatic, as Claude wants, we can look at being able to configure
> an event cartridge rather than only be able to do in code. That way
> you can modify behavior through configuration.
>
> Does that sound right?
>
> I'll start with Will's patch.
>
> --
> Geir Magnusson Jr 203-247-1713(m)
> geirm@optonline.net
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-dev-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org
Re: input event cartridge
Posted by Claude Brisson <cl...@savoirweb.com>.
Will wrote :
> That's a nice idea. Consistent with the way other plugins (like custom
> directives) are handled as well, i.e. in the Velocity properties file.
>
I agree, but I'm not sure at all that an event cartridge is pertinent for relative resource loading.
After all, it is the duty of the Ressource Manager and Loaders to perform such a relative loading : the path "." should appear as a
search path among others in the velocity.properties file, like :
[...]
webapp.resource.loader.path = .
webapp.resource.loader.path = /WEB-INF/templates/
webapp.resource.loader.path = /
[...]
Also, unless you impose absolute pathes to always start with a "/" (which is not backward compatible), a relative path is always
ambiguous (it can be interpreted as absolute or relative). If "." is listed as a search path among others, the ambiguity is resolved
with the order of precedence given by the properties (according to the given the exemple : first check relative then absolute).
But to implement it this way, the ResourceLoader, as long as the ResourceManager, needs a reference to the InternalContextAdapter
(passed to it via new versions of the getContent / getTemplate methods). It can still be backward compatible considering that if the
ICA is not specified, no relative pathname resolution will occur.
I've implemented it this way. Should I share it ?
CloD
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org
Re: input event cartridge
Posted by Will Glass-Husain <wg...@forio.com>.
That's a nice idea. Consistent with the way other plugins (like custom
directives) are handled as well, i.e. in the Velocity properties file.
WILL
----- Original Message -----
From: "Geir Magnusson Jr." <ge...@optonline.net>
To: "Velocity Developers List" <ve...@jakarta.apache.org>
Sent: Tuesday, October 28, 2003 8:49 AM
Subject: Re: input event cartridge
>
> On Tuesday, October 28, 2003, at 09:05 AM, Will Glass-Husain wrote:
>
> > Yay! I've been using this patch on my private build for some time
> > now, and
> > find it quite useful.
> >
> > What are you thinking regarding your comment on configuring an event
> > cartridge? Do you mean that there should be a "relativeload" event
> > cartridge that can be used at the developer's discretion?
>
> Well, right now, if you want to use the event handling stuff, you have
> to add an event cartridge in the code, which doesn't work if it isn't
> your code. It might be nice to configure an event cartridge via
> properties rather than code, so that you could add a input handler that
> does what claude wants, for example...
>
> >
> > WILL
> >
> >
> > ----- Original Message -----
> > From: "Geir Magnusson Jr." <ge...@optonline.net>
> > To: "Velocity Developers List" <ve...@jakarta.apache.org>
> > Sent: Tuesday, October 28, 2003 3:51 AM
> > Subject: Re: patch requests
> >
> >
> >>
> >> On Sunday, October 26, 2003, at 12:33 AM, Will Glass-Husain wrote:
> >>
> >>>
> >>> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20342
> >>> new event handler for input directives (#parse, #include)
> >>
> >> I love this idea, and there is a related suggestion :
> >>
> >> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18072
> >>
> >> which I am less of a fan of the solution, because I think you'd run
> >> into serious confusion especially w/ things invoked from VMs.
> >>
> >> However, I think we can combine the two ideas because the former
> >> covers
> >> the latter. The event handler method is natural now. In order to
> >> make
> >> it automatic, as Claude wants, we can look at being able to configure
> >> an event cartridge rather than only be able to do in code. That way
> >> you can modify behavior through configuration.
> >>
> >> Does that sound right?
> >>
> >> I'll start with Will's patch.
> >>
> >> --
> >> Geir Magnusson Jr 203-247-1713(m)
> >> geirm@optonline.net
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
> >> For additional commands, e-mail: velocity-dev-help@jakarta.apache.org
> >>
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: velocity-dev-help@jakarta.apache.org
> >
> >
> --
> Geir Magnusson Jr 203-247-1713(m)
> geirm@optonline.net
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-dev-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org
Re: input event cartridge
Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
On Tuesday, October 28, 2003, at 09:05 AM, Will Glass-Husain wrote:
> Yay! I've been using this patch on my private build for some time
> now, and
> find it quite useful.
>
> What are you thinking regarding your comment on configuring an event
> cartridge? Do you mean that there should be a "relativeload" event
> cartridge that can be used at the developer's discretion?
Well, right now, if you want to use the event handling stuff, you have
to add an event cartridge in the code, which doesn't work if it isn't
your code. It might be nice to configure an event cartridge via
properties rather than code, so that you could add a input handler that
does what claude wants, for example...
>
> WILL
>
>
> ----- Original Message -----
> From: "Geir Magnusson Jr." <ge...@optonline.net>
> To: "Velocity Developers List" <ve...@jakarta.apache.org>
> Sent: Tuesday, October 28, 2003 3:51 AM
> Subject: Re: patch requests
>
>
>>
>> On Sunday, October 26, 2003, at 12:33 AM, Will Glass-Husain wrote:
>>
>>>
>>> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20342
>>> new event handler for input directives (#parse, #include)
>>
>> I love this idea, and there is a related suggestion :
>>
>> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18072
>>
>> which I am less of a fan of the solution, because I think you'd run
>> into serious confusion especially w/ things invoked from VMs.
>>
>> However, I think we can combine the two ideas because the former
>> covers
>> the latter. The event handler method is natural now. In order to
>> make
>> it automatic, as Claude wants, we can look at being able to configure
>> an event cartridge rather than only be able to do in code. That way
>> you can modify behavior through configuration.
>>
>> Does that sound right?
>>
>> I'll start with Will's patch.
>>
>> --
>> Geir Magnusson Jr 203-247-1713(m)
>> geirm@optonline.net
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: velocity-dev-help@jakarta.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-dev-help@jakarta.apache.org
>
>
--
Geir Magnusson Jr 203-247-1713(m)
geirm@optonline.net
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org