Featured
-
Download multiple files from media and document in Liferay 6.2
Hello Guys, Liferay store files using media and
by bhagwan.khichar -
Hiding "My Sites" Menu in Docbar in Liferay
You can hide the "My Sites" menu from Liferay Docb
by chandan.ahluwalia
Tags
How to create cron job in liferay
Cron job is a UNIX tool, its scheduling capabilities are powerful and proven. The CronTrigger class of cron is based on the scheduling capabilities.
CronTrigger uses “cron expressions”, which are able to create firing sch...
Portlet Define Objects tag in jsp
We use Portlet Define Objects <Portlet:DefineObjects> tag in our JSP code, while developing a portlet in Liferay. We generally use this tag to inherit the predefined objects in our JSP. By doing this, we get escape to write the entire code ...
How to configure office365 email in liferay
Hello Guys
I am writting blog about configure office365 email in liferay.
Following are the office365 configuration details :
SMTP Setting :
Server name: smtp.office365.com
Port: 587
Encryption method: TLS
Follow below steps to c...
setting portlet preferences from portlet controller in liferay
Hello Guys
Portlet preferences is use for layout setup in liferay.
Here, We have setup layout from controller of the custom portlet in liferay.
Follow the below steps to setup layout:
Step 1: add below lines in Liferay-portlet.xml
...
Get screenname of current user in liferay
Hello Guys
ScreenName is nik name or unique identification of the user and we need to use screenname for user tagging and identify the user in liferay.
There are two ways to get screenname of current user :
Step 1: Get screenname ...
Get user by using screenname in liferay
Hello Guys
ScreenName is uniquely identify to user and we can use screenname as user tag name in liferay.
Here, two ways to get user by using screenname with companyId :
Step 1: Get user by using screenname in jsp(view.jsp) page...
Resolve Generic Engine spellcheck reindexing causes java.lang.NullPointerException
Hello Guys
Many times we are getting NullPointerException in our liferay server log during upload, upadte and delete files.
Error look like as below in our server log :
20:22:50,828 INFO [liferay/search_writer/SYSTEM_ENGINE-3][Ba...
How to remove borders of a portlet in liferay
Hello Guys
Now, We are removing borders of a portlet in liferay that added using tag as below :
<liferay-portlet:runtime portletName="customSocialNotifications_WAR" />
You can use below attribute available in same tag as default...
Find Layouts with the specific JournalArticle in AssetPublisher portlets
Hello Guys
Here, We find all layouts with the specific JournalArticle in AssetPublisher portlets.
With easy requirements someone publish a JournalArticle with specific Tags i.e TagA, TagB. On the other pages (Layouts) of the liferay porta...
Startup Listener or events in Liferay
Hello Guys
Liferay provide startup funcationality to deploy theme. portlet and hooks etc.
You can utilize the StartupAction. It is merely an Event of liferay, which is get triggered on startup of a plugin in liferay portal. This method wil...
Kaleo workflow in custom portlet
Liferay provide default workflow for inbuild portlets but we can use our custom portlets also.
So, I here for you to implement workflow in our custom portlets and make assist of the activity.
Add entity in portlet service.xml regarding your w...
Add nested portlets through code in liferay
Hello Guys
We can add nested portlets through code in liferay. Liferay provide this funcationlity, for complete example I will assume that you want to add nested portlet to current page using another portlets action handler.
Add these meth...
Set title of the page for view pages in liferay
Hello Guys
I here to set title of the view page in liferay. We can also set the title of the portlets.
We have many ways to set page title of the liferay page because liferay provide dynamic functionality.
You can add page title by using...
How to hide portlet in liferay by using javascript
When we add protlet on the page it by default set visible.
Now, hide the portlet or set visible false using javascript.
For this you can combine your javascript approach with the parameter approach as follows:
<%
String paramFromReque...
Create portlet configuration page in liferay
Portlet configuration page use some parameters for liferay portlet. For example I would like to select what page should a controller display when viewing it.
Below steps help you to create configuration page in liferay :
Step 1: Create con...
What is the default approach for logging in Liferay
Liferay provide default logging functionality, So you can instantiate your Log4j Log object through LogFactory, identified by the current class name, then enable the log category on the control panels "Log level" settings tab.
Following steps ...
How to add custom portlet in Liferay Control Panel section
Hello Guys
Liferay allow to create custom portlet to write own business logic or controller code. Portlet is a small application of the liferay.
When we need to define rules on the custom portlet, So we need to add custom portlet in liferay...
Accessing the user from a liferay portlet
Hello Guys
Liferay is an EMS to develop java based web application and it's have portlets to write business logics.
Liferay provide inbuilt login and other portlets, so now we need to use functionality of them in our custom portlets.
Fo...
Mailing templates in Liferay
Hello Friends, The Below code will show How you can send the mail using the mailing template in liferay.
view.jsp
<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>
<%@ taglib uri="http://liferay.com/tld/aui" pre...
Simple mailing example in liferay portlets
This Blog will explore you how you can send the email using liferay portlets. The below code will helps you to send email using liferay portlet.
Firstly you need to configure Liferay Mail Configuration:-
Login using Liferay Admin account an...
Using Javascript to access liferay services
The Below code will show you how you can create the service in Liferay and how you can call that services using javascript.
For this, First you have to create service builder(service.xml) to build service using ant build-service command.
...
Creating A PopUp Window in Liferay
The Below Code will show you how you can create the Popup Window in Liferay.we have given the id **patient-popup** to the popup window and enable that window on onclick event of link button.
View.jsp
<%@ taglib uri="http://java.sun.com/...
How to Create a Liferay Plugin project
Hello Friends,
This Video tutorial will guide and help you to create a Liferay plugin project using the eclipse IDE.
Using JSON Web Services with liferay
Liferay Plugin Portal JSON Web Services :- Liferay support the REST API. By Using That we have to create restful web services and the data format of that is JSON.
Liferay internally supports to create JSON services. it already have many portal...
Save file to Document directory in liferay 6.1 using API
File Upload in Document Library of Liferay:- First we need to create the folder in the Document Library of Liferay. In my case the folder is created with dentalnoteDocuments name.
In below code AddInfo.jsp we can take simple AUI FORM to inser...
Get the current user Liferay using a simple Java code
Get Current User in Liferay:- We can find the current logged in user in liferay using the below code Script. There are two methods to get the current User of liferay as following:
1. we can directly use the PortalUtil class in Liferay.
Por...
Using Ajax request in a Liferay portlet
Ajax Request in Liferay Portlet:- In below code we will show you how you will call the ajax request in the Liferay. We can pass the aui form values to the PatientSearch portlet then get the result from database and display records in HTML table. ...
Liferay: Enable custom password on Registration form
You can enable custom password on Registration form. Use the below steps to enable custom password on Registration form:
If portal-ext.properties is not available then you can manually create portal-ext.properties file into the /tomcat-7.0.4...
Liferay: Make screen name auto-generated on Registration
There is Screen name field on Liferay registration form, you can hide that field and make screen name auto-generated.
Use the below steps to make screen name auto-generated on Registration:
If portal-ext.properties is not available then ...
Liferay: Hide Birthday and Gender fields from Registration form
You can hide Birthday and Gender fields from Registration form. Use the below steps to hide Birthday and Gender fields from Registration form:
If portal-ext.properties is not available then you can manually create portal-ext.properties file ...
Liferay Integaration with Log4j
Liferay+Log4j:- This blog will show you how you can implement logging in Liferay with Log4j. By using this you can use the custom logging using Log4j in Lifeary. To make this possible follow the below steps:-
1. Create log4j.xml and log4j.dtd...
Liferay: Disabling the password reminder question after the first login
You can disable the password reminder question when user logs in portal for the first time after Registration. Use the below steps to hide the password reminder question screen:
If portal-ext.properties is not available then you can manually...
Liferay: How to configure MySQL in Liferay?
We can configure MySQL in Liferay very easily. The configuration for MySQL is done in the properties file named as "portal-ext.properties".
You just need to follow the below steps:
If portal-ext.properties is not available then you can m...
Liferay: Disabling Reset password screen after Registration
You can disable Reset password screen that comes on first login after Registration. Use the below steps to hide the Reset password screen:
If portal-ext.properties is not available then you can manually create portal-ext.properties file into...
Liferay: How to create Custom Action By Hook?
We can modify Liferay JSP, services, properties by using Hooks. One of the main use of Hook is we can implement our Custom Action.
So what is Custom Action?
When you see portal.properties in your liferay source code. You will see there...
Liferay: Hiding the dockbar
You can hide Dockbar from you site by creating Theme. Use the below steps to hide the dockbar:
1. Create Liferay Plugin Project of type Theme.
2. Copy and paste template folder from docroot/ to docroot/_diff/ folder.
3. Now comment the b...
How to integrate twitter with liferay?
Liferay provide us inbuild OpenSocial portal.
Follow below steps and integrate twitter with liferay.
Step 1
Open the OpenSocial configuration page in the Control Panel. First add the gadget URL i.e https://raw.github.com/dejuknow/open...
Custom portlet for email verification in liferay 6.2.
Hello Guys
Here, I am writing blog for email verification with token. When user add additional email address it's send autocratically verification link to given email address.
Follow below steps to develop custom portlet for additional emai...
how to migrate liferay theme from one installation to another
Sometime we need to migrate theme from one installation another. We can do this easily by following the below steps:
1). Create a new theme in Liferay 6.2 using this command.
./create.sh themename ThemeDisplayName
themename = The Name...
Hiding "My Sites" Menu in Docbar in Liferay
You can hide the "My Sites" menu from Liferay Docbar by creating hook. In my example i am hidding the menu option for all the users except those whose role is Administrator. You need to Hook the html/taglib/ui/my_sites/page.jsp
Add the followi...
Activate deactivated user in Liferay 6.2
Let say you deactivated account in liferay, it won't be visible in Users by default. And if you try to re-register it will give error that this user already exists. Hence in order to activate the deactivated account do following:
Go to Control...