10/30/2014

AlloyUI 3 has been released

Liferay just announced, that AlloyUI 3 has been released. It will be the last YUI - based release before switching over to jQuery with AlloyUI 4.

The AlloyUI (http://alloyui.com) website has already been updated with new examples and tutorials, and you can find all the release info here:

https://www.liferay.com/de/web/zeno.rocha/blog/-/blogs/alloyui-3-released-bye-bye-yui


If you have any questions, feel free to leave a comment.

BeanLocator has not been set for servlet context

If you get an exception like this:

javax.portlet.PortletException: com.liferay.portal.kernel.bean.BeanLocatorException: BeanLocator has not been set for servlet context

then take a look at the portlet you´ve written. If you portlet´s name doesn´t end with "portlet" then this might be the reason for your Exception. Create a new portlet with the correct name, import all your sources and try again.

If you have any questions, feel free to leave a comment.

10/29/2014

Showing Web Contents in a Liferay Theme

If you want to render a WebContent as part of your theme, you can do the following. Create your theme as always, and put the following inside your init_custom.vm file:


#set ($journalArticleLocalService =$serviceLocator.findService("com.liferay.portlet.journal.service.JournalArticleLocalService"))

#set ($journalContentUtil =$utiLocator.findUtil("com.liferay.portlet.journalcontent.util.JournalContentUtil"))

#set ($web-content-display-article-id = "your-article-id-here")

#set ($web-content-display-article =$journalContentUtil.getContent($group_id, $web-content-display-article-id,null,"$locale",$theme_display))


If you like this tutorial it would be very nice, if you could click on some of the google ads you see on the right side. It helps me run this block and motivates me ;)

If you have any questions, feel free to leave a comment.