Setting-up global velocimacro with different name

"Artem Orlov" <[email protected]> Fri, 30 Apr 2004 19:22:58 +0500
Newsgroups gmane.comp.java.jpublish.devel
Message-ID <[email protected]>
This is a multi-part message in MIME format.

------=_NextPart_000_0006_01C42EE8.8BABF7D0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit

Hi,

 

I have a problem, trying to setup global velocimacro library file:

 

The string constant VM_GLOBAL_LIBRARY exists in class
org.jpublish.view.velocity.JPublishResourceLoader and while loading
velocimacro library it compares name of loading template with this constant.
I guess it should be done by other way: ResourceLoader can compare
requesting resource name with velocimacro.library property of velocity
engine.

 

And one more question here: I want to locate all my templates in "templates"
folder, so want my global template setting be something as
"template::/library.vm" and I can't do it using current code, isn't it? Is
it possible to use DefaultTemplateManager class at the initialization stage?

 

Artem


------=_NextPart_000_0006_01C42EE8.8BABF7D0
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns=3D"http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii">
<meta name=3DGenerator content=3D"Microsoft Word 11 (filtered medium)">
<style>
<!--
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman";}
a:link, span.MsoHyperlink
	{color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{color:purple;
	text-decoration:underline;}
span.EmailStyle17
	{mso-style-type:personal-compose;
	font-family:Arial;
	color:windowtext;}
@page Section1
	{size:595.3pt 841.9pt;
	margin:2.0cm 42.5pt 2.0cm 3.0cm;}
div.Section1
	{page:Section1;}
-->
</style>

</head>

<body lang=3DRU link=3Dblue vlink=3Dpurple>

<div class=3DSection1>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-US =
style=3D'font-size:
10.0pt;font-family:Arial'>Hi,<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-US =
style=3D'font-size:
10.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-US =
style=3D'font-size:
10.0pt;font-family:Arial'>I have a problem, trying to setup global =
velocimacro library
file:<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-US =
style=3D'font-size:
10.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-US =
style=3D'font-size:
10.0pt;font-family:Arial'>The string constant VM_GLOBAL_LIBRARY exists =
in class
<i><span =
style=3D'font-style:italic'>org.jpublish.view.velocity.JPublishResourceLo=
ader</span></i>
and while loading velocimacro library it compares name of loading =
template with
this constant. I guess it should be done by other way: ResourceLoader =
can
compare requesting resource name with <i><span =
style=3D'font-style:italic'>velocimacro.library</span></i>
property of velocity engine.<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-US =
style=3D'font-size:
10.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-US =
style=3D'font-size:
10.0pt;font-family:Arial'>And one more question here: I want to locate =
all my
templates in &#8220;templates&#8221; folder, so want my global template =
setting
be something as &#8220;template::/library.vm&#8221; and I can&#8217;t do =
it
using current code, isn&#8217;t it? Is it possible to use <i><span
style=3D'font-style:italic'>DefaultTemplateManager</span></i> class at =
the initialization
stage?<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-US =
style=3D'font-size:
10.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-US =
style=3D'font-size:
10.0pt;font-family:Arial'>Artem<o:p></o:p></span></font></p>

</div>

</body>

</html>

------=_NextPart_000_0006_01C42EE8.8BABF7D0--



-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE. 
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click