Lesson learned

Some time ago there was a big discussion on Liferay forum and blogs about poor developer documentation of Java code. Liferay presented argument that there was a problem with not so actual comments that lead to errors. Well, if LR developers don’t update comments in javadoc it’s not our fault. We shouldn’t drop that documentation based on such argument. So every one decided that Javadocs will be updated to point where they are useful for developers. At December I saw Javadocs for Lr 6.0.5 and they were impressing.

But i still don’t know what

public java.util.List<com.liferay.portlet.journal.model.JournalArticle> findByC_G_A_V_T_D_C_T_S_T_D_S_R

means 😀

Tips & Tricks: Private Pages

As you probably know Liferay can automatically create private pages for new user. He can also use existing page as a template for new one. To do this you will need to:
1. Prepare your page using Sitemap, portles, themes etc.
2. Exports your page to lar file
3. Copy this lar to deploy/ (deploy/example.lar)
4. Add this to your portal-ext.properties
default.user.private.layouts.lar=${liferay.home}/deploy/example.lar
5. Restart application

You can also perform some tricks with this functionality. For example you want every user to have his own 3 web contents (resume, about me, my stuff). To do this just follow those steps:
1. Prepare your page using Sitemap, portles, themes etc.
2. Prepare your articles and publish them
3. Exports your page with all data to lar file
4. Copy this lar to deploy/ (deploy/example.lar)
5. Add this to your portal-ext.properties
default.user.private.layouts.lar=${liferay.home}/deploy/example.lar
6. Restart application

Now not only theme and pages are connected to private pages but Web content too. If there already is a web content with ID like on your template page Liferay will create new one changeing Owner to the user he is creating private page for. If there existssuch user in the system LR will publish those WC (Web contet) with that user as owner.