Questions tagged [liferay]

Liferay is an open source JSR 286 compliant portal and social platform, written in Java. It provides fully functional built-in portlets (60+) and also various integration points to seamlessly integrate with other third-party softwares like Alfresco, Sharepoint etc. Make sure to also tag with the specific version that you're asking about.

Liferay is an open-source portal written in Java and a social platform. It implements JSR-286 and has various proprietary facilities.

Liferay Portal was created in 2000 as open source software. Thanks to a decade of ongoing collaboration with its active and mature open source community, Liferay's product development is the result of direct input from users with representation from all industries and organizational roles. Liferay provides a lot of integration points with other softwares like , , etc.

Liferay as a portal server is application-server agnostic, which means that Liferay can be installed on almost any Java application server.

Liferay provides more than 60+ preinstalled or built-in portlets (also known as out-of-the-box (OOTB) portlets) and the latest version Liferay 7 provides many more features like:

  1. Dynamic data lists
  2. Custom web content types
  3. Workflows for documents and media
  4. Related assets
  5. Faceted search
  6. Integration with multiple repositories
  7. Dynamic site templates
  8. Mobile device rules
  9. Bootstrap theme
  10. Advance Display Templates (ADT)

Liferay has a market-place which serves as an "app" store for the Liferay portal.

Editions

Liferay is distributed in two editions:

  1. Liferay Portal Community Edition (Liferay CE): This is supported by the Community and is free.
  2. Liferay Portal Enterprise Edition (Liferay EE): This is a licensed version of the Portal.

More about the editions can be checked out here.

Liferay Development

It is possible to customize Liferay (OOTB portlets and core) and add new features with the following plugin types using Liferay's Plugins SDK:

  1. EXT Plugin (prior to versions 6.x, it was known as the EXT Environment): To customize liferay's core classes and those things which are not customizable by hooks.

  2. Portlet Plugin: It helps in creating JSR 168 and JSR 286 compliant portlets. Liferay supports many frameworks to create portlets some of which are JSF with Liferay Faces, Spring MVC, Vaadin, Struts and for simple portlets Liferay provides a MVCPortlet class.

  3. Hook Plugin: This is used to modify Liferay's JSPs and other services

  4. Theme Plugin: This is used to customize the look and feel of the whole Portal.

  5. Layout Plugin: This is used to customize the page's layout and is one of the simplest plugins to develop. Liferay comes pre-bundled with 10 layouts.

All the plugins are packaged as .WAR files. All plugins are hot-deployable except the EXT plugin which requires server restart.

Liferay also provides Liferay IDE as an plugin to increase development productivity.

Liferay provides a rich API including many utility classes and also provides custom taglibs to ease development of JSPs, like:

  1. liferay-ui: It provides UI-related pre-styled structures and functional tools like the search container which handles search pagination.
  2. liferay-portlet: It is a wrapper around the tag and provides Liferay-specific portlet functionality.
  3. liferay-util
  4. liferay-theme
  5. liferay-security
  6. aui (AlloyUI taglib): A wrapper around Alloy UI to provide consistent UI components across the portal.

Liferay uses as the built-in Javascript library, which is a library built upon .

Liferay also provides the Service-builder, a declarative service and persistence layer code generator. The generated interfaces can also be exposed as web-services.

Known Liferay Integrations with third-party softwares

  1. Alfresco (Blog about Alfresco Integration)

Beginners' resources

  1. Liferay Developer Network: The place to start - with many tutorials
  2. Liferay Portal Wiki

Additional day to day resources

  1. Latest Liferay User Guide
  2. Latest Liferay Development Guide
  3. Liferay API Docs by version
  4. Liferay Marketplace: the place for getting plugins for all your needs
  5. Liferay Forums

Other Liferay resources

  1. Liferay Releases
  2. Previous Versions
  3. Liferay on Git-hub
  4. Alloy UI Demos
  5. Liferay in Action (official guide to Liferay development)
  6. Liferay Development Style guidelines
  7. Liferay Marketplace
  8. Liferay Portlets

Frequent/Interesting Questions

  1. To Go or Not To Go with Liferay?
  2. Restrictions/Disadvantages of developing portlets with Liferay
  3. Accessing User in Liferay Portlet
  4. Testing for custom plugin portlet
  5. Accessing logged-in User in a liferay portlet
  6. Programmatically get the url of a page in liferay
6475 questions
14
votes
1 answer

Dynamic columns in liferay-ui:search-container?

I have tried the liferay-ui:search-container to fetch and display the database table records on UI in a table/grid format. By using the liferay-ui:search-container I am getting the output as shown below, I am fetching the USER_ table records in the…
Prasad
  • 1,164
  • 1
  • 10
  • 27
14
votes
2 answers

How to set eclipse to ignore the "Classpath Dependency Validator Message" Warning

I would like it to have no warnings in my eclipse projects, but I get this one warning: Classpath entry org.eclipse.jdt.USER_LIBRARY/Liferay 6.1 GA Plugin API will not be exported or published. Runtime ClassNotFoundExceptions may result. from…
Mark
  • 17,887
  • 13
  • 66
  • 93
14
votes
3 answers

Get the current user Liferay using a simple Java code

I'm working with : Liferay 6.0.6 with JBoss 5.1 and Struts2. My question is, how to get the current user in Liferay once logged in, using a Java code.
Sabrina
  • 143
  • 1
  • 1
  • 5
13
votes
1 answer

How can a Liferay portal be placed under version control?

What's a good way to put a Liferay portal under version control? By this, I don't mean versioning the portlets we wrote, but the actual layout and configuration of a running site. When setting a new site up all changes to layout and configuration…
Edward Samson
  • 2,395
  • 2
  • 26
  • 39
13
votes
3 answers

How to deploy portlets to Liferay?

I have faced problems in trying to install new portlets to Liferay running on Glassfish domain. I figured out the flow very lately and want to share it with others also. So, please read the answer and hope this helps someone :) (Pre requisites for…
mico
  • 12,730
  • 12
  • 59
  • 99
12
votes
7 answers

How to disable Liferay portlet cache?

I am developing a portlet for Liferay Portal. I have disabled CSS and JavaScript caching by using these codes in portal-developer.properties…
rahim asgari
  • 12,197
  • 10
  • 43
  • 53
12
votes
5 answers

How to get global (company) group id in Liferay?

How to get the global (company) group id in Liferay without accessing ThemeDisplay? P.S.: with ThemeDisplay it is simple: themeDisplay.getCompanyGroupId().
Mark
  • 17,887
  • 13
  • 66
  • 93
12
votes
0 answers

What is the alternative to an enterprise portal strategy in the Java space?

**I just got my wrist slapped for not having a question that goes quite along with the spirit of stackoverflow. On the suggestion of an SO mod, I've posted this question again over at programmers stack exchange. Here it is: ** Same Question Reposted…
Cameron McKenzie
  • 3,684
  • 32
  • 28
11
votes
2 answers

JUnit and Mocks in Liferay

I need to make JUnit tests using Mockito or PowerMock or smth else but I don't know what to start with. I created testing folder, set mockito, but what should I do next? I couldn't find any examples so Im stucked with it. Can you show me how to…
Al.Boldyrev
  • 486
  • 7
  • 30
11
votes
2 answers

Change the default language in Liferay

How to change the default for language? When a user logs in for the first time, the default language is English, and I need to change that.
Kojja
  • 125
  • 1
  • 1
  • 6
10
votes
2 answers

Testing for custom plugin portlet: BeanLocatorException and Transaction roll-back for services testing

My Problems: I can test successfully for CRUD services operation. I was doing an insert on @Before [setUp()] and delete of same data on @After [tearDown()] but going forward I would need to support Transactions rather than writing code for insert…
Prakash K
  • 11,669
  • 6
  • 51
  • 109
10
votes
4 answers

How do I use autologin in liferay?

I want to login my users automatically from our application. I know liferay has an auto login feature, but I don't know how to use it. I didn't find much valuable information on the web. What do I need to do to make autologin work? I want to login a…
Luke
  • 5,771
  • 12
  • 55
  • 77
10
votes
10 answers

Liferay 6 Using Common Service Builder layer Error - BeanLocatorException - BeanLocator has not been set

We are trying to use liferay service builder as a common layer for all our portlets. We have created a separate common portlet project where we are building the service using service.xml This generates a service.jar file for us. We are copying this…
Kzvi
  • 519
  • 1
  • 6
  • 17
10
votes
1 answer

Closing a Liferay popup (in new browser window) using Selenium2 with the FirefoxDriver?

I am attempting to automate some test cases on a Liferay portal server using Selenium 2. Many Liferay actions open up new browser window pop up (like user impersonation). Here is an example link (notice the target="_blank"):
Lucas
  • 14,227
  • 9
  • 74
  • 124
10
votes
5 answers

PKIX path building failed in Eclipse

i'm working with Liferay and i'm using eclipse, and running a client/server model, using an encrypted socket (SSL). Currently, my application is running the client/server connection ok when I run the application in batch mode but when i try to…
El0din
  • 3,208
  • 3
  • 20
  • 31