Posts

Showing posts from May, 2014

Points to remember when we write the custom login portlet

Suppose you need to create the custom login portlet, which does not satisfy the default liferay's login portlet. then you need to update the following properties in the portal-ext.properties. 1. If your portlet name is "Custom login" then you need to update this property      auth.login.portlet.name= Custom login. 2. Also we need to mention the Page name(friendly URL) where this login portlet resides.      auth.login.url=/web/guest/ login

Tranaction in Liferay

Following content is Pasted from the below url http://www.liferayaddicts.net/blogs/-/blogs/transaction-management-with-liferay-service Following are the important points that a Liferay Architect must make note of in order to work with Transactions in Liferay The entry point to transaction (start of transaction boundary) in Liferay service is the <Entity>LocalServiceImpl class. Hence, while firing DML oriented methods like update, insert and delete on X Entity from Y do not use make calls to XLocalServiceUtil or XLocalService as this will result in two transaction boundaries - one for entity X and the other for entity Y. Relate the two entities through service.xml file (one to many or many to many based on your domain model) or else refer one entity in the other using <reference... in service.xml file. For e.g. if you want to make call on X entity from YLocalServiceImpl then in service.xml file while configuring Y Entity put <reference entity="X" package

Difference between InnoDB and MyISAM in MySQL?

InnoDB : is a storage engine for MySQL. MyISAM : is the default storage engine for the MySQL relational database management system versions prior to 5.5 1. The major deficiency of MyISAM is the absence of transactions support . Versions of MySQL 5.5 and greater have switched to the InnoDB engine to ensure referential integrity constraints, and higher concurrency. Ensure that your database supports transactions; yes ! this is needless to say but then if you are using MySQL, the database engine other MyISAM does not support transactions. You must use InnoDB as the database engine for your tables.

sanitizers in liferay

Liferay Uses Stanitizers to escape the XSS elements In Portal-model-hints.xml for blog title <sanitize content-type="text/plain" modes="ALL" /> In Portal.properties sanitizer.impl=com.liferay.portal.sanitizer.DummySanitizerImpl Following Links which explains how to use it 1.http://www.liferay.com/community/forums/-/message_boards/message/12668382 2.https://www.liferay.com/web/juan.fernandez/blog/-/blogs/sanitizers-in-liferay-6 We need antiSamy hook to deploy , to work as excepted.