You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Pa...@lntinfotech.com on 2009/06/17 08:46:08 UTC
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.
______________________________________________________________________
Re: How to use Velocity Template Engine in OFBiz
Posted by Ashish Vijaywargiya <vi...@gmail.com>.
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 <sc...@hotwaxmedia.com>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
>
>
Re: How to use Velocity Template Engine in OFBiz
Posted by Pa...@lntinfotech.com.
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" <ja...@les7arts.com>
06/17/2009 05:33 PM
Please respond to
user@ofbiz.apache.org
To
<us...@ofbiz.apache.org>
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" <vi...@gmail.com>
> +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
<sc...@hotwaxmedia.com>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
>>
>
______________________________________________________________________
______________________________________________________________________
Re: How to use Velocity Template Engine in OFBiz
Posted by Jacques Le Roux <ja...@les7arts.com>.
BTW, Velocity was used in OFBiz before Freemaker replaced it some years ago...
Jacques
From: "Ashish Vijaywargiya" <vi...@gmail.com>
> +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 <sc...@hotwaxmedia.com>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
>>
>
Re: How to use Velocity Template Engine in OFBiz
Posted by Ashish Vijaywargiya <vi...@gmail.com>.
+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 <sc...@hotwaxmedia.com>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
>
Re: How to use Velocity Template Engine in OFBiz
Posted by Scott Gray <sc...@hotwaxmedia.com>.
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, Pardeep.Ruhil@lntinfotech.com 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 <sc...@hotwaxmedia.com>
> 06/17/2009 02:23 PM
> Please respond to
> user@ofbiz.apache.org
>
>
> To
> user@ofbiz.apache.org
> 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" <Pa...@lntinfotech.com>
> To: user@ofbiz.apache.org
> 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.
>
> ______________________________________________________________________
>
> ______________________________________________________________________
>
>
>
> ______________________________________________________________________
Re: How to use Velocity Template Engine in OFBiz
Posted by Pa...@lntinfotech.com.
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 <sc...@hotwaxmedia.com>
06/17/2009 02:23 PM
Please respond to
user@ofbiz.apache.org
To
user@ofbiz.apache.org
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" <Pa...@lntinfotech.com>
To: user@ofbiz.apache.org
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.
______________________________________________________________________
______________________________________________________________________
______________________________________________________________________
Re: How to use Velocity Template Engine in OFBiz
Posted by Scott Gray <sc...@hotwaxmedia.com>.
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" <Pa...@lntinfotech.com>
To: user@ofbiz.apache.org
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.
______________________________________________________________________