
Errata for the Liferay Portal 5.2 Systems Development
Table of Contents [-]
- Introducing Liferay Portal Architecture and Framework
- Working with JSR-286 Portlets
- ServiceBuilder and Development Environments
- Experiencing Struts Portlets
- Managing Pages
- Customizing the WYSIWYG Editor
- Customizing CMS and WCM
- Building a Personalized Community
- Developing Layout Templates and Themes
- Building My Social Office
- Staging and Publishing
- Using Common API
Liferay Book: Liferay Portal 5.2 Systems Development
Preface
in page 4,
Geronimo + T0omcatshould be
Geronimo + Tomcat
Introducing Liferay Portal Architecture and Framework #
Working with JSR-286 Portlets #
ServiceBuilder and Development Environments #
In page 66,
-Xms128m -Xmx1024m -XX:MaxPermSize=128mshould be
-Xms128m -Xmx1024m -XX:MaxPermSize=128m -Dfile.encoding=UTF8 -Duser.timezone=GMT-Dorg.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES=false}}} (refer to http://issues.liferay.com/browse/LPS-4338 )
In page 71,
-Xms128m -Xmx1024m -XX:MaxPermSize=128m -Dfile.encoding=UTF8 -Duser.timezone=GMTshould be
-Xms128m -Xmx1024m -XX:MaxPermSize=128m -Dfile.encoding=UTF8 -Duser.timezone=GMT-Dorg.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES=false}}}
Page 75 says "copy build.${user.name}.properties to the ext project from the portal project". This sentence should be removed, since there is no need to copy build.${user.name}.properties to the ext project from the portal project. It works in Eclipse IDE, but it raises issue in NetBeans.
Page 80, "struts-config.xm" should be "struts-config.xml".
In page 90, "For example, if the plugin is a portlet called ipc-faqportlet, then the plugin context file must be called ipc-faq-portlet.xml," should be "For example, if the plugin is a portlet called ipc-faq-portlet, then the plugin context file must be called ipc-faq-portlet.xml in the folder $PLUGINS_SDK_HOME/portlets/ipc-faq-portlet/,"
Experiencing Struts Portlets #
In pages 95, 101 (and 138, 152, 232, 240, 249, 478), remove following lines
<resource-bundle>com.liferay.portlet.StrutsResourceBundle </resource-bundle>}}}
When using downloading code, do the same.
The "com.liferay.portlet.StrutsResourceBundle" is no longer in use for portlets as plugins, although it is working fine for portlets in the Ext. Obviously, it does not cause any issues in 5.2; but it will throw exceptions in 5.3 or above.
In page 109,
ActionMapping mapping, ActionForm form, ortletConfigshould be
ActionMapping mapping, ActionForm form, PortletConfig
In page 114,
com.ext.portlet.reports.model.implcom.ext.portlet.reports.service.base com.ext.portlet.reports.service.http}}} should be
com.ext.portlet.bookreports.model.implcom.ext.portlet.bookreports.service.base com.ext.portlet.bookreports.service.http }}}
In page 115,
com.ext.portlet.reports.service.implcom.ext.portlet.reports.service.persistence }}} should be
com.ext.portlet.bookreports.service.implcom.ext.portlet.bookreports.service.persistence }}}
public static ReportsEntry addBook(ActionRequest req)should be
public static BookReportsEntry addBook(ActionRequest req)
Page 122, the BookReportsEntry method is missing the “entryId” declaration.
Page 129, "com.ext.portlet.reports.model.ReportsEntry" should be "com.ext.portlet.bookreports.model.BookReportsEntry".
Page 131, “addEntryResources(ReportsEntry book” should be “addEntryResources(BookReportsEntry book".
Page 131, “ReportsEntry.class.getName()” should be “BookReportsEntry.class.getName()”.
Page 141, “portlonfig” should be “portletConfig”.
Page 145, "modifierUserId" is incorrectly typed as a String. It should be a long; and remove the line ‘<column name=”creator” type=”String” />’.
Page 160, "ExtEditLayoutAction.java" should be "ExtEditPagesAction.java".
Page 161, “0extLayout” should be “extLayout”.
Managing Pages #
Customizing the WYSIWYG Editor #
In page 181, "By the way, the default toolbar sets Default and Basic in the /fckconfig.js folder besides the fckconfig.jsp file."
should be
"By the way, the default toolbar sets Default and Basic in fckconfig.js file besides the fckconfig.jsp file."
In pages 181 and 182, "FCKeditor/" should be "fckeditor/";
In page 183, "FCKeditor.jsp" should be "fckconfig.jsp";
/ext/ext-web/docroot/html/js/editor/FCKeditorshould be
/ext/ext-web/docroot/html/js/editor/fckeditor
In page 186, it mentions the theme book-street-theme, but the code is available only in the chapter 9. It should add code about book-street-theme in chapter 6, too.
In page 197 the following line should be removed.
<link href="alternatives.css" type="text/css" rel="stylesheet" />
in page 222, it should add detailed information - how to install cms_sercies.war and bookpub.sql after the line "Note that the default database name is bookpub and the default account on this database is lportal/lportal. MySQL is the default database."
(for cms services)
download cms_services.war at http://liferay.cignex.com/palm_tree/book/ copy cms_sercies.war to the folder $TOMCAT_HOME/webapps
(for database)
download bookpub.sql at http://liferay.cignex.com/palm_tree/book/ mysql>create database bookpub; mysql>grant all on bookpub.* to 'lportal'@'localhost' identified by 'lportal' with grant option; mysql>grant all on bookpub.* to 'lportal'@'localhost.localdomain' identified by 'lportal' with grant option; >mysql -u lportal -plportal -f bookpub <bookpub.sql
Customizing CMS and WCM #
Page 232, the following lines should be removed.
<supports><mime-type>application/vnd.wap.xhtml+xml</mime-type> </supports>}}}
Page 233,
<configuration-action-class>com.portlet.journalcontent.action.ConfigurationActionImpl </configuration-action-class>}}}
should be
<configuration-action-class>com.liferay.portlet.journalcontent.action.ConfigurationActionImpl </configuration-action-class>}}}
Page 242, the following line should be removed.
GroupLocalServiceUtil.getGroup(groupId);
Page 243, following lines
if(type == null || type.length() == 0){ type = (String) renderRequest.getAttribute("articleType"); }
should be
<% if(type == null || type.length() == 0){ type = (String) renderRequest.getAttribute("articleType"); } %>
The download code is correct.
On page 254:
viewFullContentURL.setParameter("urlTitle", articleDisplay.getArticleId());
should be:
viewFullContentURL.setParameter("urlTitle", articleDisplay.getUrlTitle());
In page 253, why do we add this as a comment? it is going to make the form "Add Asset ..." invisible, according to the requirements mentioned in this chapter. You may need this form for your requirements - just uncomment the form.
Page 254, "bstract.jsp" should be "abstract.jsp".
Page 256 , “Create a package named com.ext.portal.service.impl in the /ext/extimpl/ src folder; create a class ExtVelocityToolServiceImpl, and then add service methods implementation as follows:”
should be
“Create a package named com.ext.portal.service.impl in the /ext/extimpl/ src folder; create a class ExtVelocityToolServiceImpl, which implements ExtVelocityToolService, and then add service methods implementation as follows:”
The downloading code is correct like:
public class ExtVelocityToolServiceImpl implements ExtVelocityToolService { ...
Page 263,
public List<TagsAsset> getRelatedArticles(String companyId, String groupId, String articleId, int limit){ return _extVelocityToolService.getRelatedArticles(companyId, groupId, articleId, limit);}
should be
Public List<JournalArticle> getRecentArticles(String companyId, String groupId, String articleId, int limit){ return _extVelocityToolService.getRelatedArticles(companyId, groupId, articleId, limit);}
Building a Personalized Community #
In page 312, "Create an XML file service.xml in the package com.ext.portlet.comment and open it." should be "Create an XML file service.xml in the package com.ext.portlet.user and open it."
Developing Layout Templates and Themes #
Building My Social Office #
In pages 377 and 378,
/ext/ext-impl/docroot/html/should be
/ext/ext-web/docroot/html/and
/portal/portal-impl/docroot/html/should be
/portal/portal-web/docroot/html/
In page 388,
"%><p><%= subc1 %></p><p><%= subc3 %></p><p><%= subc3 %></p><%"should be
"%><p><%= subc1 %></p><p><%= subc2 %></p><p><%= subc3 %></p><%".
The code attached is correct.
In page 390,
"The code above shows registration of the book-street-theme theme"
should be
"The code above shows registration of the so-theme theme"
In page 412, a set of .portal.jsp files cannot be generated in runtime properly. The so-portlet throws exceptions.
<liferay-util:include page="/html/portlet/calendar/ view_event.portal.jsp" />
The same issue exists in the downloading code. This issue will get fixed shortly.
Finally updates of so-portlet and so-theme are available (for 5.2.x) at
http://liferay.cignex.com/palm_tree/book/so-portlet.war
http://liferay.cignex.com/palm_tree/book/so-theme.war
Or use Liferay-portal 5.2.3 plus SO portlet and SO theme from http://liferay.cignex.com/palm_tree/book/liferay-portal-5.2.3-so.zip
Note that the port: 9090; account: admin/admin
Staging and Publishing #
Using Common API #
In pages 476,
/portal/portal-web/docroot/html/portal/enterprise_adminshould be
/portal/portal-web/docroot/html/portlet/enterprise_admin
Additional links:
[Full Integration - Liferay, Alfresco, SSO and LDAP]
[Integrate Solr with Liferay portal]
[Errata for the Liferay Portal 6 Enterprise Intranets]