Blog Tag Search

Entries tagged [liferay]

...

Liferay 7: override Resource Permissions

In Liferay 6 when you needed to change default permission set for some resource, then Ext plugin could be used to override such definitions. The reason of Ext using was the point that all permission definitions were stored in portal-impl.jar and Ext was the only way to override it. Starting from Liferay 7 the portal is moving to OSGi architecture where the other rules take place. Since now each OSGi module (e.g. Calendar) has its permissions defined in its own module, and not in the core of the portal. That’s why a new approach should be applied and this post shows how to achieve this.

Read More

Comments (4)

Tags: liferay

...

How to build Liferay theme using SDK and Ant

Liferay Theming is a very common Liferay technology that widely used to define the look of a portal. It consist of different sets of Javascript, CSS and HTML delivered as a single WAR-file, which should have a special folder structure and configuration files. To create and build such WAR, Liferay SDK can be used that is designed to automate the process of Liferay Theme development. This article describes how to build already existing Theme and customize it using Liferay SDK Ant builder.

Read More

Comments (0)

Tags: liferay

...

Liferay PHP Portlets: a few recommendations prior development

It’s well known, that Liferay includes special types of portlets called PHP Portlets which allow to use a standard PHP code in order to provide desired functionality. But there are some issues may occur during PHP-portlet development that are not so evident to fix and find a solution on the internet. Such common issues are covered in this post, solutions to them are also provided.

Read More

Comments (0)

Tags: liferay

...

Liferay: Play Video in Popup Window

During Liferay customizations one may need to embed playable videos to portal: to a body of a page or to a popup. There are different posts exist on the internet about how to create a popup in Liferay, but none of them covers this common task – a video within a window. And in this article we’ll see 2 short ways how we can accomplish that.

Read More

Comments (0)

Tags: liferay

...

Liferay 7 embed Language Portlet in Header

Hey there, the new Liferay 7 is out now. With this version we become a brand new concept (which implements the OSGi specification) of Liferay Plugins development and integration within a portal. Having OSGi implemented, Liferay moves from a hack-like style of Plugin management, where each Plugin is a separate web application stored as a war-file on an app server, to a much cleaner concept. There are many global changes in Liferay 7 and in this post we’ll see how to insert Language Portlet to custom Theme header in accordance with this new architecture.

Read More

Comments (4)

Tags: liferay

...

Liferay 7 alpha/beta ServiceBuilder

Hey, we are all watching with great interest to the first coming stable Liferay 7 release (link). By now alpha and even beta releases are available for testing, they include new cool features and improvements. But still some old functionality is not migrated to the new releases. In this post I’ll talk about ServiceBuilder which is still not officially published and is missing in current alphas and betas. Anyway it is possible to find and use Liferay 7 ServiceBuilder (in liferay-ce repository). In this post I’ll show how to do it.

Read More

Comments (0)

Tags: liferay

...

Invoke an action of core Liferay portlet

Liferay is shipped with a bunch of certain preinstalled portlets, such as Documents and Media, Message Boards, Asset Publisher, etc. Each of these portlets has a set of predefined struts actions (definitions can be found under ROOT/WEB-INF/struts-config.xml) which are invoked upon some user action in current portlet. During a custom portlet development there is a need may occur to call any of these actions, for example folder create/update/delete of Documents and Media (Document Library), without copying a core functionality to custom portlet. This article will demonstrate how to make it work, taking as an example Move Folder action of Documents and Media portlet.

Read More

Comments (3)

Tags: liferay

...

Liferay upload files programmatically in java

If you have a requirement to implement a file upload form in your Liferay portlet then this article for you. In this post I will provide a simple upload jsp form and java code snippet that handles file upload action and stores uploaded file to Liferay document library.

Read More

Comments (3)

Tags: liferay

...

Liferay: execute java code as administrator user

During Liferay java code development you may need to run your code as administrator user. This can happen when some user logged in with a restricted role, but it is required to execute an user action with higher privileges (admin or others). The examples of these user actions: grant permissions to some folder or file, search for content in spaces which the user does not belong to, perform system actions (create new role in portal etc.) and many others. In this blog post I’ll show how to make it possible.

Read More

Comments (0)

Tags: liferay

...

Liferay: execute java code as administrator user

During Liferay java code development you may need to run your code as administrator user. This can happen when some user logged in with a restricted role, but it is required to execute an user action with higher privileges (admin or others). The examples of these user actions: grant permissions to some folder or file, search for content in spaces which the user does not belong to, perform system actions (create new role in portal etc.) and many others. In this blog post I’ll show how to make it possible.

Read More

Comments (0)

Tags: liferay

...

Liferay get administrator user programmatically in Java

If you need to retrieve a Liferay User with Administrator role in your Java code, then this article for you.

Read More

Comments (0)

Tags: liferay

...

Liferay Spring MVC Portlet (+JPA, Maven) part.2

In previous post Liferay Spring MVC Portlet (+JPA, Maven) part.1 I wrote how to develop a Liferay Spring Portlet using Maven, in this article I’ll discuss how to inject the JPA ORM in it.

Read More

Comments (1)

Tags: liferay

...

Liferay Spring MVC Portlet (+JPA, Maven) part.1

Recently we’ve received a new request by our client to implement a Liferay Portlet that uses JPA as a primary ORM-system. Sure, Liferay provides Service Builders that enable ORM functionality in portlets, but I was always wondering why some companies prefer to develop their own frameworks instead of using already existing good solutions. So in this task we had to move from Liferay ORM + Liferay Transactions to well known and mature frameworks: Java JPA + Spring.

Read More

Comments (1)

Tags: liferay

...

Tables in Liferay Application Display Templates (ADT)

In one of my previous articles AlloyUI tables in Liferay Application Display Templates (ADT) I wrote about table creation in Liferay ADT using AlloyUI. In this article I’ll demonstrate how to do it via liferay-ui (http://liferay.com/tld/ui) and liferay-portlet (http://java.sun.com/portlet) tag libraries (tlds). The usage of tag libraries instead of AlloyUI javascript library gives a more elegant way to define tables.

Read More

Comments (0)

Tags: liferay

...

New taglib (tld) in Liferay Portlet

Sometimes in Liferay there is a necessity to implement your own jsp taglib (tld) for some portlets. At first sight this issue might seem trivial (just to follow a standard jsp tag library development process), in Liferay context it becomes not so easy. By default all Liferay jsp tags extend Liferay TagSupport class which keeps servletContext variable. The thing here is that this servletContext is a context of ROOT application. This means that all resources required for new taglib will be searched at ROOT application directory of your application container. Yes, we can store all needed resources at ROOT app, but this is a bad practice while Liferay core (ROOT app) should be always separate from customizations. In this article there is an approach and an example to overcome this issue.

Read More

Comments (0)

Tags: liferay