You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by sebb <se...@gmail.com> on 2007/06/23 19:12:19 UTC

Texen - how to access SortTools?

I'd like to be able to use SortTools from Texen, but cannot work out
how to add the Velocity Tools so that they are accessible from Texen.

Is it possible to get access without needing to extend Texen?
For example are there some properties that need to be set?

S///

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


Re: Texen - how to access SortTools?

Posted by sebb <se...@gmail.com>.
On 24/06/07, Nathan Bubna <nb...@gmail.com> wrote:
> On 6/23/07, sebb <se...@gmail.com> wrote:
> > On 24/06/07, Nathan Bubna <nb...@gmail.com> wrote:
> > > i believe you just need to add a line like this to the texen.properties file:
> > >
> > > context.objects.sort=org.apache.velocity.tools.generic.SortTool
> >
> > Thanks - I looked at that, but the properties file is embedded in the
> > jar, and there does not seem to be any way to override it. Seems
> > rather messy to have to update the jar.
>
> ugh.  we should do something about that.  properties should always be
> overrideable.
>

+1

> > > once Tools 2.0 is out, i plan to try and find time to provide better
> > > integration between Tools and Texen/Anakia/DVSL (or examples, where
> > > the current support is sufficient)
> >
> > Perhaps the parsing of the contextProperties file could be extended to
> > behave like the internal file?
>
> not sure.  i'll try to remember to look into this.  wanna open a jira issue? :)

Will do.

Might be able to provide a patch as well.

> > As luck would have it, I have since found a hack to create the object
> > directly in the VTL script (so my problem is solved) but it would be
> > at lot nicer to be able to extend texen.properties as above.
>
> yeah, i've seen those hacks.  definitely not a long term solution. :)

But very powerful ... and easy enough to revert to the properties
solution later.

> > > On 6/23/07, sebb <se...@gmail.com> wrote:
> > > > I'd like to be able to use SortTools from Texen, but cannot work out
> > > > how to add the Velocity Tools so that they are accessible from Texen.
> > > >
> > > > Is it possible to get access without needing to extend Texen?
> > > > For example are there some properties that need to be set?

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


Re: Texen - how to access SortTools?

Posted by Nathan Bubna <nb...@gmail.com>.
On 6/23/07, sebb <se...@gmail.com> wrote:
> On 24/06/07, Nathan Bubna <nb...@gmail.com> wrote:
> > i believe you just need to add a line like this to the texen.properties file:
> >
> > context.objects.sort=org.apache.velocity.tools.generic.SortTool
>
> Thanks - I looked at that, but the properties file is embedded in the
> jar, and there does not seem to be any way to override it. Seems
> rather messy to have to update the jar.

ugh.  we should do something about that.  properties should always be
overrideable.

> > once Tools 2.0 is out, i plan to try and find time to provide better
> > integration between Tools and Texen/Anakia/DVSL (or examples, where
> > the current support is sufficient)
>
> Perhaps the parsing of the contextProperties file could be extended to
> behave like the internal file?

not sure.  i'll try to remember to look into this.  wanna open a jira issue? :)

> As luck would have it, I have since found a hack to create the object
> directly in the VTL script (so my problem is solved) but it would be
> at lot nicer to be able to extend texen.properties as above.

yeah, i've seen those hacks.  definitely not a long term solution. :)

> > On 6/23/07, sebb <se...@gmail.com> wrote:
> > > I'd like to be able to use SortTools from Texen, but cannot work out
> > > how to add the Velocity Tools so that they are accessible from Texen.
> > >
> > > Is it possible to get access without needing to extend Texen?
> > > For example are there some properties that need to be set?
> > >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
> For additional commands, e-mail: user-help@velocity.apache.org
>
>

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


Re: Texen - how to access SortTools?

Posted by sebb <se...@gmail.com>.
On 24/06/07, Nathan Bubna <nb...@gmail.com> wrote:
> i believe you just need to add a line like this to the texen.properties file:
>
> context.objects.sort=org.apache.velocity.tools.generic.SortTool

Thanks - I looked at that, but the properties file is embedded in the
jar, and there does not seem to be any way to override it. Seems
rather messy to have to update the jar.

> once Tools 2.0 is out, i plan to try and find time to provide better
> integration between Tools and Texen/Anakia/DVSL (or examples, where
> the current support is sufficient)

Perhaps the parsing of the contextProperties file could be extended to
behave like the internal file?

As luck would have it, I have since found a hack to create the object
directly in the VTL script (so my problem is solved) but it would be
at lot nicer to be able to extend texen.properties as above.

> On 6/23/07, sebb <se...@gmail.com> wrote:
> > I'd like to be able to use SortTools from Texen, but cannot work out
> > how to add the Velocity Tools so that they are accessible from Texen.
> >
> > Is it possible to get access without needing to extend Texen?
> > For example are there some properties that need to be set?
> >

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


Re: Texen - how to access SortTools?

Posted by Nathan Bubna <nb...@gmail.com>.
i believe you just need to add a line like this to the texen.properties file:

context.objects.sort=org.apache.velocity.tools.generic.SortTool

once Tools 2.0 is out, i plan to try and find time to provide better
integration between Tools and Texen/Anakia/DVSL (or examples, where
the current support is sufficient)

On 6/23/07, sebb <se...@gmail.com> wrote:
> I'd like to be able to use SortTools from Texen, but cannot work out
> how to add the Velocity Tools so that they are accessible from Texen.
>
> Is it possible to get access without needing to extend Texen?
> For example are there some properties that need to be set?
>
> S///
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
> For additional commands, e-mail: user-help@velocity.apache.org
>
>

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