How to use Velocity Template Engine in OFBiz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

How to use Velocity Template Engine in OFBiz

pradeepruhil85
Hi,
I am trying to use Velocity as template engine instead of FTL in OFBiz.
My problem is  how can I call a velocity file from a screen widget as we
call a Ftl file  by writing this
 <platform-specific>
   <html><html-template location=
"component://manufacturing/webapp/manufacturing/jobshopmgt/MrpReports.ftl"
/></html>
 </platform-specific>

What are the steps that need to be taken for this.
Please help me to get through the situation.


Thanks & Regards

Pardeep Ruhil
L&T Infotech Ltd
Mumbai


Larsen & Toubro Infotech Ltd.
www.Lntinfotech.com

This Document is classified as:

L&T Infotech Proprietary   L&T Infotech Confidential   L&T Infotech
Internal Use Only   L&T Infotech General Business

This Email may contain confidential or privileged information for the
intended recipient (s) If you are not the intended recipient, please do
not use or disseminate the information, notify the sender and delete it
from your system.

______________________________________________________________________
Reply | Threaded
Open this post in threaded view
|

Re: How to use Velocity Template Engine in OFBiz

Scott Gray-2
Velocity isn't supported by the framework, you'll either need to use freemarker or be prepared to add the support which will not be a simple task.

Regards
Scott

HotWax Media
http://www.hotwaxmedia.com
801.657.2909

----- Original Message -----
From: "Pardeep Ruhil" <[hidden email]>
To: [hidden email]
Sent: Wednesday, June 17, 2009 4:46:08 PM (GMT+1000) Auto-Detected
Subject: How to use Velocity Template Engine in OFBiz

Hi,
I am trying to use Velocity as template engine instead of FTL in OFBiz.
My problem is  how can I call a velocity file from a screen widget as we
call a Ftl file  by writing this
 <platform-specific>
   <html><html-template location=
"component://manufacturing/webapp/manufacturing/jobshopmgt/MrpReports.ftl"
/></html>
 </platform-specific>

What are the steps that need to be taken for this.
Please help me to get through the situation.


Thanks & Regards

Pardeep Ruhil
L&T Infotech Ltd
Mumbai


Larsen & Toubro Infotech Ltd.
www.Lntinfotech.com

This Document is classified as:

L&T Infotech Proprietary   L&T Infotech Confidential   L&T Infotech
Internal Use Only   L&T Infotech General Business

This Email may contain confidential or privileged information for the
intended recipient (s) If you are not the intended recipient, please do
not use or disseminate the information, notify the sender and delete it
from your system.

______________________________________________________________________
Reply | Threaded
Open this post in threaded view
|

Re: How to use Velocity Template Engine in OFBiz

pradeepruhil85
Hi,

Thanks for your reply,  but I have finished of calling a velocity page
directly from controller.xml  using the
VelocityViewHandler.java. But from this I am able to see the static data
on the page,  not the dynamic one.

So  for that I need to call this velocity page from Screens xml file, but
as you said it not implemented, so can you just tell me
how can I proceed to achieve this.


Thanks & Regards

Pardeep Ruhil
L&T Infotech Ltd
Mumbai
Ph: +919820283884

Larsen & Toubro Infotech Ltd.
www.Lntinfotech.com

This Document is classified as:

L&T Infotech Proprietary   L&T Infotech Confidential   L&T Infotech
Internal Use Only   L&T Infotech General Business

This Email may contain confidential or privileged information for the
intended recipient (s) If you are not the intended recipient, please do
not use or disseminate the information, notify the sender and delete it
from your system.



Scott Gray <[hidden email]>
06/17/2009 02:23 PM
Please respond to
[hidden email]


To
[hidden email]
cc

Subject
Re: How to use Velocity Template Engine in OFBiz






Velocity isn't supported by the framework, you'll either need to use
freemarker or be prepared to add the support which will not be a simple
task.

Regards
Scott

HotWax Media
http://www.hotwaxmedia.com
801.657.2909

----- Original Message -----
From: "Pardeep Ruhil" <[hidden email]>
To: [hidden email]
Sent: Wednesday, June 17, 2009 4:46:08 PM (GMT+1000) Auto-Detected
Subject: How to use Velocity Template Engine in OFBiz

Hi,
I am trying to use Velocity as template engine instead of FTL in OFBiz.
My problem is  how can I call a velocity file from a screen widget as we
call a Ftl file  by writing this
 <platform-specific>
   <html><html-template location=
"component://manufacturing/webapp/manufacturing/jobshopmgt/MrpReports.ftl"
/></html>
 </platform-specific>

What are the steps that need to be taken for this.
Please help me to get through the situation.


Thanks & Regards

Pardeep Ruhil
L&T Infotech Ltd
Mumbai


Larsen & Toubro Infotech Ltd.
www.Lntinfotech.com

This Document is classified as:

L&T Infotech Proprietary   L&T Infotech Confidential   L&T Infotech
Internal Use Only   L&T Infotech General Business

This Email may contain confidential or privileged information for the
intended recipient (s) If you are not the intended recipient, please do
not use or disseminate the information, notify the sender and delete it
from your system.

______________________________________________________________________

______________________________________________________________________



______________________________________________________________________
Reply | Threaded
Open this post in threaded view
|

Re: How to use Velocity Template Engine in OFBiz

Scott Gray-2
All I can suggest is to look at how freemarker support was implemented  
and to follow a similar approach.  Like I said it is not a simple task  
and if I were you I would spend some time considering why freemarker  
doesn't meet your templating needs (personally I think freemarker is  
more powerful).

Regards
Scott

HotWax Media
http://www.hotwaxmedia.com

On 17/06/2009, at 8:37 PM, [hidden email] wrote:

> Hi,
>
> Thanks for your reply,  but I have finished of calling a velocity page
> directly from controller.xml  using the
> VelocityViewHandler.java. But from this I am able to see the static  
> data
> on the page,  not the dynamic one.
>
> So  for that I need to call this velocity page from Screens xml  
> file, but
> as you said it not implemented, so can you just tell me
> how can I proceed to achieve this.
>
>
> Thanks & Regards
>
> Pardeep Ruhil
> L&T Infotech Ltd
> Mumbai
> Ph: +919820283884
>
> Larsen & Toubro Infotech Ltd.
> www.Lntinfotech.com
>
> This Document is classified as:
>
> L&T Infotech Proprietary   L&T Infotech Confidential   L&T Infotech
> Internal Use Only   L&T Infotech General Business
>
> This Email may contain confidential or privileged information for the
> intended recipient (s) If you are not the intended recipient, please  
> do
> not use or disseminate the information, notify the sender and delete  
> it
> from your system.
>
>
>
> Scott Gray <[hidden email]>
> 06/17/2009 02:23 PM
> Please respond to
> [hidden email]
>
>
> To
> [hidden email]
> cc
>
> Subject
> Re: How to use Velocity Template Engine in OFBiz
>
>
>
>
>
>
> Velocity isn't supported by the framework, you'll either need to use
> freemarker or be prepared to add the support which will not be a  
> simple
> task.
>
> Regards
> Scott
>
> HotWax Media
> http://www.hotwaxmedia.com
> 801.657.2909
>
> ----- Original Message -----
> From: "Pardeep Ruhil" <[hidden email]>
> To: [hidden email]
> Sent: Wednesday, June 17, 2009 4:46:08 PM (GMT+1000) Auto-Detected
> Subject: How to use Velocity Template Engine in OFBiz
>
> Hi,
> I am trying to use Velocity as template engine instead of FTL in  
> OFBiz.
> My problem is  how can I call a velocity file from a screen widget  
> as we
> call a Ftl file  by writing this
> <platform-specific>
>   <html><html-template location=
> "component://manufacturing/webapp/manufacturing/jobshopmgt/
> MrpReports.ftl"
> /></html>
> </platform-specific>
>
> What are the steps that need to be taken for this.
> Please help me to get through the situation.
>
>
> Thanks & Regards
>
> Pardeep Ruhil
> L&T Infotech Ltd
> Mumbai
>
>
> Larsen & Toubro Infotech Ltd.
> www.Lntinfotech.com
>
> This Document is classified as:
>
> L&T Infotech Proprietary   L&T Infotech Confidential   L&T Infotech
> Internal Use Only   L&T Infotech General Business
>
> This Email may contain confidential or privileged information for the
> intended recipient (s) If you are not the intended recipient, please  
> do
> not use or disseminate the information, notify the sender and delete  
> it
> from your system.
>
> ______________________________________________________________________
>
> ______________________________________________________________________
>
>
>
> ______________________________________________________________________


smime.p7s (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: How to use Velocity Template Engine in OFBiz

Ashish Vijaywargiya
+1 on Scott's comment.
I also think that Freemarker is more powerful then Velocity.

--
Ashish

On Wed, Jun 17, 2009 at 4:53 PM, Scott Gray <[hidden email]>wrote:

> All I can suggest is to look at how freemarker support was implemented and
> to follow a similar approach.  Like I said it is not a simple task and if I
> were you I would spend some time considering why freemarker doesn't meet
> your templating needs (personally I think freemarker is more powerful).
>
> Regards
> Scott
>
> HotWax Media
> http://www.hotwaxmedia.com
>
Reply | Threaded
Open this post in threaded view
|

Re: How to use Velocity Template Engine in OFBiz

Ashish Vijaywargiya
In reply to this post by Scott Gray-2
Interesting article:

http://freemarker.org/fmVsVel.html
&
http://www.theserverside.com/tt/blogs/showblog.tss?id=FreeMarkerVelocity.
One of the good thing about freemarker is shown below and it is taken from
the article (This point is also available on the freemarker comparison link
shown above):

--------------------------------------
The one thing I really like about FreeMarker over Velocity is the ability to
use JSP Tags in your template. To me, this is very powerful since
displaytag<http://displaytag.sourceforge.net/>and struts
menu <http://struts-menu.sourceforge.net/> are my primary reasons for
sticking with JSP. After implementing JSP 2.0, Velocity and FreeMarker -
it's funny to see how the variable rendering syntax - ${...} - is very
similar in all three. Even after implementing Velocity and FreeMarker, I
think I'll stick with JSP (2.0) - it just seems a lot more powerful. No
limitations if you will.
--------------------------------------

--
Ashish


On Wed, Jun 17, 2009 at 4:53 PM, Scott Gray <[hidden email]>wrote:

> All I can suggest is to look at how freemarker support was implemented and
> to follow a similar approach.  Like I said it is not a simple task and if I
> were you I would spend some time considering why freemarker doesn't meet
> your templating needs (personally I think freemarker is more powerful).
>
> Regards
> Scott
>
> HotWax Media
> http://www.hotwaxmedia.com
>
>
Reply | Threaded
Open this post in threaded view
|

Re: How to use Velocity Template Engine in OFBiz

Jacques Le Roux
Administrator
In reply to this post by Ashish Vijaywargiya
BTW, Velocity was used in OFBiz before Freemaker replaced it some years ago...

Jacques

From: "Ashish Vijaywargiya" <[hidden email]>

> +1 on Scott's comment.
> I also think that Freemarker is more powerful then Velocity.
>
> --
> Ashish
>
> On Wed, Jun 17, 2009 at 4:53 PM, Scott Gray <[hidden email]>wrote:
>
>> All I can suggest is to look at how freemarker support was implemented and
>> to follow a similar approach.  Like I said it is not a simple task and if I
>> were you I would spend some time considering why freemarker doesn't meet
>> your templating needs (personally I think freemarker is more powerful).
>>
>> Regards
>> Scott
>>
>> HotWax Media
>> http://www.hotwaxmedia.com
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: How to use Velocity Template Engine in OFBiz

pradeepruhil85
Thank you all for giving me the useful information.
Hope to see more in future. :)


Thanks & Regards

Pardeep Ruhil
L&T Infotech Ltd
Mumbai
Ph: +919820283884

Larsen & Toubro Infotech Ltd.
www.Lntinfotech.com

This Document is classified as:

L&T Infotech Proprietary   L&T Infotech Confidential   L&T Infotech
Internal Use Only   L&T Infotech General Business

This Email may contain confidential or privileged information for the
intended recipient (s) If you are not the intended recipient, please do
not use or disseminate the information, notify the sender and delete it
from your system.



"Jacques Le Roux" <[hidden email]>
06/17/2009 05:33 PM
Please respond to
[hidden email]


To
<[hidden email]>
cc

Subject
Re: How to use Velocity Template Engine in OFBiz






BTW, Velocity was used in OFBiz before Freemaker replaced it some years
ago...

Jacques

From: "Ashish Vijaywargiya" <[hidden email]>
> +1 on Scott's comment.
> I also think that Freemarker is more powerful then Velocity.
>
> --
> Ashish
>
> On Wed, Jun 17, 2009 at 4:53 PM, Scott Gray
<[hidden email]>wrote:
>
>> All I can suggest is to look at how freemarker support was implemented
and
>> to follow a similar approach.  Like I said it is not a simple task and
if I
>> were you I would spend some time considering why freemarker doesn't
meet
>> your templating needs (personally I think freemarker is more powerful).
>>
>> Regards
>> Scott
>>
>> HotWax Media
>> http://www.hotwaxmedia.com
>>
>


______________________________________________________________________



______________________________________________________________________