You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Si...@algorithmics.com on 2008/06/16 17:55:41 UTC

#parse and
dependency

Hi,

 

I'm experiencing the following behavior and was wondering what's causing
it and if it's a current feature or not.

 

In a contents of a template we are using another template
(TemplateApplicationLink.vm below) as a global import.  The behavior is
that the contents of the second template only becomes visible if I put a
<br> element in front of the line with the #parse statement.

 

 

Here is the enclosing template: 

 

Subject: SOX Notice: SOX Assessment Scheduled

<html>

    <body>

        SOX Assessment $domainObject.soxAssessment.name has been
scheduled, 

        which includes an Assessment for $domainObject.name.  

        <br>Please login to #parse("TemplateApplicationLink.vm") to
verify the Control Environment 

        for $domainObject.name and to select an SAE Evaluator 

        prior to $date.format('MMMM dd
yyyy',$domainObject.soxAssessment.dueDate).

    </body>

</html>

 

Here is the enclosed TemplateApplicationLink.vm template's content: 

 

#if($url)<a href="${url}">ABC</a>#else Please configure app url in
abc-config.xml#end

 

Velocity jars in use: velocity-1.5.jar, velocity-dep-1.5.jar,
velocity-tools-generic-1.4.jar.

 

Thank you in advance.

Simeon Leyzerzon

 

 


 
--------------------------------------------------------------------------
This email and any files transmitted with it are confidential and proprietary to Algorithmics Incorporated and its affiliates ("Algorithmics"). If received in error, use is prohibited. Please destroy, and notify sender. Sender does not waive confidentiality or privilege. Internet communications cannot be guaranteed to be timely, secure, error or virus-free. Algorithmics does not accept liability for any errors or omissions. Any commitment intended to bind Algorithmics must be reduced to writing and signed by an authorized signatory.
--------------------------------------------------------------------------


Re: #parse and
dependency

Posted by Ilkka Priha <ip...@norther.org>.
Simeon,

the problem may be in the previous line: '$domainObject.name.'. The last 
dot is ambiguous as it could indicate a property of the name field's 
value. Try '${domainObject.name}.' instead without the <br> tag in the 
next line.

-- Ilkka


Simeon.Leyzerzon@algorithmics.com wrote:
> Chris,
> The files were pasted in their entirety in the first email.  I'm going
> to repaste them once again here: 
> 
> 1. TemplateApplicationLink.vm - this is an enclosed template: 
> --------------
> #if($url)<a href="${url}">AAA</a>#else Please configure app url in
> aaa-config.xml#end
> --------------
> 2. Enclosing template - SAEAssessmentNotification.vm 
> 
> -----
> Subject: SOX Notice: SOX Assessment Scheduled
> <html>
>     <body>
>         SOX Assessment $domainObject.soxAssessment.name has been
> scheduled, 
>         which includes an Assessment for $domainObject.name.  
>         <br>Please login to #parse("TemplateApplicationLink.vm") to
> verify the Control Environment 
>         for $domainObject.name and to select an SAE Evaluator 
>         prior to $date.format('MMMM dd
> yyyy',$domainObject.soxAssessment.dueDate).
>     </body>
> </html>
> ------------
> 
> I've just created the simple test in my local environment, I'm seeing
> the similar behavior in it as well.
> 
> Regards,
> Simeon
> 
> 
> -----Original Message-----
> From: Christopher Schultz [mailto:chris@christopherschultz.net] 
> Sent: Monday, June 16, 2008 5:07 PM
> To: Velocity Users List
> Subject: Re: #parse and <br> dependency
> 
> Simeon,
> 
> Simeon.Leyzerzon@algorithmics.com wrote:
>> Hi Chris, thanks for the response.  Not sure about posting a test
> case,
>> I don't have a simple executable harness here as it's a part of a
>> complex app.  
> 
> If you create a simple test case out of the two templates you mentioned 
> in your OP, does it work?
> 
>> What I'm seeing is there's no enclosing document gets produced and
> since
>> it's an emailing template, the user doesn't get any email.  Hope this
> is
>> enough details.
>>
>> I'm attaching the docs I'm using.
> 
> Your attachments were removed by the mailing list.
> 
> Feel free to paste text "attachments" inline -- those should not be
> removed.
> 
> -chris
> 
> 
>  
> --------------------------------------------------------------------------
> This email and any files transmitted with it are confidential and proprietary to Algorithmics Incorporated and its affiliates ("Algorithmics"). If received in error, use is prohibited. Please destroy, and notify sender. Sender does not waive confidentiality or privilege. Internet communications cannot be guaranteed to be timely, secure, error or virus-free. Algorithmics does not accept liability for any errors or omissions. Any commitment intended to bind Algorithmics must be reduced to writing and signed by an authorized signatory.
> --------------------------------------------------------------------------
> 
> 
> ---------------------------------------------------------------------
> 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: #parse and
dependency

Posted by Si...@algorithmics.com.
Chris,
The files were pasted in their entirety in the first email.  I'm going
to repaste them once again here: 

1. TemplateApplicationLink.vm - this is an enclosed template: 
--------------
#if($url)<a href="${url}">AAA</a>#else Please configure app url in
aaa-config.xml#end
--------------
2. Enclosing template - SAEAssessmentNotification.vm 

-----
Subject: SOX Notice: SOX Assessment Scheduled
<html>
    <body>
        SOX Assessment $domainObject.soxAssessment.name has been
scheduled, 
        which includes an Assessment for $domainObject.name.  
        <br>Please login to #parse("TemplateApplicationLink.vm") to
verify the Control Environment 
        for $domainObject.name and to select an SAE Evaluator 
        prior to $date.format('MMMM dd
yyyy',$domainObject.soxAssessment.dueDate).
    </body>
</html>
------------

I've just created the simple test in my local environment, I'm seeing
the similar behavior in it as well.

Regards,
Simeon


-----Original Message-----
From: Christopher Schultz [mailto:chris@christopherschultz.net] 
Sent: Monday, June 16, 2008 5:07 PM
To: Velocity Users List
Subject: Re: #parse and <br> dependency

Simeon,

Simeon.Leyzerzon@algorithmics.com wrote:
> Hi Chris, thanks for the response.  Not sure about posting a test
case,
> I don't have a simple executable harness here as it's a part of a
> complex app.  

If you create a simple test case out of the two templates you mentioned 
in your OP, does it work?

> What I'm seeing is there's no enclosing document gets produced and
since
> it's an emailing template, the user doesn't get any email.  Hope this
is
> enough details.
> 
> I'm attaching the docs I'm using.

Your attachments were removed by the mailing list.

Feel free to paste text "attachments" inline -- those should not be
removed.

-chris


 
--------------------------------------------------------------------------
This email and any files transmitted with it are confidential and proprietary to Algorithmics Incorporated and its affiliates ("Algorithmics"). If received in error, use is prohibited. Please destroy, and notify sender. Sender does not waive confidentiality or privilege. Internet communications cannot be guaranteed to be timely, secure, error or virus-free. Algorithmics does not accept liability for any errors or omissions. Any commitment intended to bind Algorithmics must be reduced to writing and signed by an authorized signatory.
--------------------------------------------------------------------------


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


Re: #parse and
dependency

Posted by Christopher Schultz <ch...@christopherschultz.net>.
Simeon,

Simeon.Leyzerzon@algorithmics.com wrote:
> Hi Chris, thanks for the response.  Not sure about posting a test case,
> I don't have a simple executable harness here as it's a part of a
> complex app.  

If you create a simple test case out of the two templates you mentioned 
in your OP, does it work?

> What I'm seeing is there's no enclosing document gets produced and since
> it's an emailing template, the user doesn't get any email.  Hope this is
> enough details.
> 
> I'm attaching the docs I'm using.

Your attachments were removed by the mailing list.

Feel free to paste text "attachments" inline -- those should not be removed.

-chris


RE: #parse and
dependency

Posted by Si...@algorithmics.com.
Hi Chris, thanks for the response.  Not sure about posting a test case,
I don't have a simple executable harness here as it's a part of a
complex app.  

What I'm seeing is there's no enclosing document gets produced and since

it's an emailing template, the user doesn't get any email.  Hope this is
enough details.

I'm attaching the docs I'm using.

Regards,
Simeon

-----Original Message-----
From: Christopher Schultz [mailto:chris@christopherschultz.net] 
Sent: Monday, June 16, 2008 4:10 PM
To: Velocity Users List
Subject: Re: #parse and <br> dependency

Simeon,

Simeon.Leyzerzon@algorithmics.com wrote:
> In a contents of a template we are using another template
> (TemplateApplicationLink.vm below) as a global import.  The behavior
is
> that the contents of the second template only becomes visible if I put
a
> <br> element in front of the line with the #parse statement.

What do you see if no <br> is in the enclosing document? Nothing? 
#parse(...)? Something else?

Can you post a test case that is reproducible?

Thanks,
-chris



 
--------------------------------------------------------------------------
This email and any files transmitted with it are confidential and proprietary to Algorithmics Incorporated and its affiliates ("Algorithmics"). If received in error, use is prohibited. Please destroy, and notify sender. Sender does not waive confidentiality or privilege. Internet communications cannot be guaranteed to be timely, secure, error or virus-free. Algorithmics does not accept liability for any errors or omissions. Any commitment intended to bind Algorithmics must be reduced to writing and signed by an authorized signatory.
--------------------------------------------------------------------------



Re: #parse and
dependency

Posted by Christopher Schultz <ch...@christopherschultz.net>.
Simeon,

Simeon.Leyzerzon@algorithmics.com wrote:
> In a contents of a template we are using another template
> (TemplateApplicationLink.vm below) as a global import.  The behavior is
> that the contents of the second template only becomes visible if I put a
> <br> element in front of the line with the #parse statement.

What do you see if no <br> is in the enclosing document? Nothing? 
#parse(...)? Something else?

Can you post a test case that is reproducible?

Thanks,
-chris



RE: #parse and
dependency

Posted by Si...@algorithmics.com.
Hi,

 

I'm experiencing the following behavior and was wondering what's causing
it and if it's a current feature or not.

 

In a contents of a template we are using another template
(TemplateApplicationLink.vm below) as a global import.  The behavior is
that the contents of the second template only becomes visible if I put a
<br> element in front of the line with the #parse statement.

 

 

Here is the enclosing template: 

 

Subject: SOX Notice: SOX Assessment Scheduled

<html>

    <body>

        SOX Assessment $domainObject.soxAssessment.name has been
scheduled, 

        which includes an Assessment for $domainObject.name.  

        <br>Please login to #parse("TemplateApplicationLink.vm") to
verify the Control Environment 

        for $domainObject.name and to select an SAE Evaluator 

        prior to $date.format('MMMM dd
yyyy',$domainObject.soxAssessment.dueDate).

    </body>

</html>

 

Here is the enclosed TemplateApplicationLink.vm template's content: 

 

#if($url)<a href="${url}">ABC</a>#else Please configure app url in
abc-config.xml#end

 

Velocity jars in use: velocity-1.5.jar, velocity-dep-1.5.jar,
velocity-tools-generic-1.4.jar.

 

Thank you in advance.

Simeon Leyzerzon

 

 


 
--------------------------------------------------------------------------
This email and any files transmitted with it are confidential and proprietary to Algorithmics Incorporated and its affiliates ("Algorithmics"). If received in error, use is prohibited. Please destroy, and notify sender. Sender does not waive confidentiality or privilege. Internet communications cannot be guaranteed to be timely, secure, error or virus-free. Algorithmics does not accept liability for any errors or omissions. Any commitment intended to bind Algorithmics must be reduced to writing and signed by an authorized signatory.
--------------------------------------------------------------------------