Our Company's Blog

...

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

...

Alfresco custom rules and actions in java

Post is dedicated to the task of rules and actions development in Alfresco Java. As an example is taken some production case which demonstrates how to implement this task.

Read More

Comments (2)

Tags: alfresco

...

Alfresco Extension Module evaluators

Since Alfresco 4 the extension modules were presented which allow to change/extend default Share components. This is very useful when we need to perform some minor changes to the graphical user interface within Alfresco. In this tutorial I will present how to implement such kind of module having as an example Share’s Site Members Dashlet that we’ll hide or show depending on user role. Evaluator logic will be implemented in Java.

Read More

Comments (1)

Tags: alfresco

...

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 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

...

Eclipse: Hot Deploy to Tomcat

Sometimes there is a need to apply java code changes without complete application rebuild and Tomcat restart. The main idea here is just to copy compiled java classes to the application directory under Tomcat.

Read More

Comments (0)

Tags: eclipse

...

CentOS 7: usb wifi (8188eu) setup

There are many complaining posts online telling about almost impossible wifi adapter installation within CentOS. After a quick look at the forums dedicated to this problem I’ve got an impression that nowadays very few adapters could be installed in CentOS and people ask which exact usb wifi will work by them for sure. In this article I’ll provide a complete approach how to install a usb wifi for your server (CentOS 7 minimal, command line only).

Read More

Comments (14)

Tags: centos

...

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

...

Build a Liferay portlet war via Maven

Most posts on the internet regarding "How to build a war file of Liferay portlet" topic, cover only Ant tool. I find Maven as a next-gen project build tool and in this post I'll show how to use it to build Liferay portlet war.

Read More

Comments (4)

Tags: liferay maven

...

AlloyUI tables in Liferay Application Display Templates (ADT)

The application display template (ADT) framework allows portal administrators to change portlet’s GUI by means of freemarker/velocity template engine on-the-fly, without portlet restart. Template engine can use standard liferay AlloyUI taglib (http://liferay.com/tld/aui) to define visual representation. That is great for sure, but current taglib does not include all often used user components. For example, there is no support of tables. In this article I’ll show how to define a table in Freemarker template using AlloyUI library and put it to portlet.

Read More

Comments (0)

Tags: alloyui liferay