Cookies help us deliver our services.

By using our services, you agree to our use of cookies. Learn more

I understand

EntityLocalServiceUtil: difference between getEntity and fetchEntity

Working with Service Builder, you'll certainly notice a lot of useful methods exposed by the persistence class EntityLocalServiceUtil; among the various generated methods, there are two of them used to retrieve an instance of a single entity starting from the primary key: getEntity and fetchEntity.

But what's the difference between these two methods?

Read more: EntityLocalServiceUtil: difference between getEntity and fetchEntity

Liferay TextFormatter class

Liferay, as you know, is full of utility classes to perform various functions; one of these classes is called TextFormatter and is extremely useful in the attribute names management, to conform to the standards imposed by Liferay.

Read more: Liferay TextFormatter class

Let's format file size

In a previous article (TextFormatter class) we have seen what is the class TextFormatter and how it works.

Now we'll see another method provided by this class, which can be used to make more human readable the size of a file or, more generally, any value that represents a size in bytes.

Read more: Let's format file size

Let's use Liferay tabs

You often have to develop applications that expose different features and it is possible to implement different solutions; one of these solutions is to put each feature within a different tab.

In this article we will learn to use, in your JSP pages, the tabs provided by Liferay taglib.

Read more: Let's use Liferay tabs