JournalVmUtil in Liferay 6.1

Disclaimer – Following is not the best or optimal solution. If you have better suggestion please write in comments

JournalVmUtil was present upto Liferay 5.2 and then deprecated in Liferay 6.0 and then completed removed in Liferay 6.1. If you are upgrading to 6.1 and make extensive use of JournalVmUtil you can do the following.

Extend VelocityTemplateParser.java. Following code example is just a sample. Feel free to add any pre-processing or post-processing as required

 

Now inject MyVelocityTemplateParserImpl in your velocity templates and just call getNodes method like this

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *