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 change Mailing templates in Liferay
You are independent to write your own template and put it in portal-ext.properties file. The default one can be seen by following the mentioned path. However same variable can be used in custom templates too.
Update below properties as your ...
Liferay Translating messages to multiple languages
Liferay support many languages as you need. All language specific text and storing are done by pulling out in language.properties files. Whenever a page loads, detect the language by liferay and pull up the corresponding language file then disp...
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...
Define Service Entities in liferay 6.2
Hello guys,
Entities are the heart of a service which are defined in the service.xml in the liferay portlet. It represents the map between the model objects in Java and the fields/column and tables in your database. Once your entities are defi...
How to change default theme of profile page in Liferay
Hello guys,
In the liferay portal, some of private and public layouts portal properties are disabled. So we need to define these properties as below.
layout.user.private.layouts.enabled=false
layout.user.private.layouts.auto.create=false...
Create Json Array in Liferay
Hello guys,
JSON is a collection of name/value pairs, and it's in various languages, JSON is like as an object, record, struct, dictionary, hash table, keyed list, or associative array. JSON is an ordered list of values and in many languages, ...
How to change thumbnail size of file in Liferay
Hello Guys,
We need to resize the thumbnail of file according to our requirements or for maintaining aspect ratio of an image. Now we can resize the thumbnail of file using portal properties which we will define in the portal -ext.properties f...
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.
...
Overriding Login Struts action in liferay
We can override Login Struts action by using Hook.
In the below example we are overriding struts action "/login/login". When a user login in Liferay "com.liferay.portlet.login.action.LoginAction" is the action class that calls.
Follow the b...
Create Registration URL In Liferay Theme
Hello guys
Here, I have created a URL for registration in velocity template .
Follow below steps to implement in custom liferay theme.
Step1: put below code in Portal_normal.vm file or inside your div or table in Portal_normal.vm.
#se...
Error : Cannot create a session after the response has been committed in liferay 6.2
Hello guys,
We are getting below error when we click on link in liferay 6.2 but now I have resolved this issue.
ERROR [http-bio-8080-exec-175][LanguageFilter:83] java.lang.IllegalStateException: Cannot create a session after the re...
Download multiple files from media and document in Liferay 6.2
Hello Guys,
Liferay store files using media and document which is default functionality of liferay. Liferay support all type file.
Below code download files with zip folder using "FileEntryID".
NOTE : Liferay fully support to Oracle JDK...
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/...
Using Model Hints in Liferay
Liferay Service Builder provides users a way to customize input fields and model entities by specifying related information as model hints in a single file called portlet-model-hints.xml in projects docroot/WEB-INF/src/META-INF folder. But we nee...
How to change your default database to MYSQL on eclipse with Liferay
During your first attempt of installing Liferay with eclipse, if you were unable to set your database configuration as MYSQL and it still shows the default database.Then there is a quick solution to this problem.
Steps that should be followed ...
Creating a struts action in Liferay
We can create custom Struts action in Liferay by using Hooks, these type of Hook is called as Liferay Struts Action Hook.
Follow the below steps to create a Struts Action:
Create Liferay Plugin Project of type Hook.
Write the below cod...
How to change auto logout in liferay
Hello Guys,
Liferay provide default auto log-out functionality when you are inactive 30 minutes on website, it will log-out from website. You can change this functionality according requirement.
Auto log-out functionality depends on ses...
How to get session attribute in velocity template in liferay
Hello Guys,
Here, I am writing code for get session attribute in velocity. First of all set session attribute in view.jsp or class of the portlet then get session attribute in velocity template.
Follow below steps to implement.
step : 1 ...
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.
Change password from Custom portlet in liferay
Hello
Below code will help you to implement change password from custom portlet.
Please follow below steps :
step 1 : create Action URL
<portlet:actionURL name="updatePassword" var="updatePassword"/>
step 2 : Write below c...
Change Image orientation when upload from mobile in liferay
Hello Guys,
Here I will suggest you the best coding standard to develop effective and fast application in java technology. So, now I am writing code for changing image orientation while uploading image from mobile.
For this follow below st...
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...
Explain portlet.xml, liferay-portlet.xml and liferay-display.xml
When we create a new portlet in Liferay, the folder structure is created as below:
/PORTLET-NAME/
build.xml
/docroot/
/css/
/js/
/WEB-INF/
/src/ (not created by default)
liferay-di...
How to extract HttpServletRequest object from Portlet ActionRequest object?
When we submit a form or make an AJAX call we need to extract HttpServletRequest object from Portlet ActionRequest object to get the parameter values in action method.
By writing the below lines you can easily extract HttpServletRequest object...
How to override existing Struts Action by Struts Action Hook?
We can modify Liferay JSP, services, properties by using Hooks. One of the main use of Hook is we can override existing struts actionand also we can add custom struts action, these type of Hook is called as Liferay Struts Action Hook.
I'm taki...
How to read ActionRequest parameters?
If you have defined an input field as below:
<aui:input type="text" name="emailId" value="<%= emailId %>" />
then, you can read the value of emailId parameter in action method by the following ways:
1-
HttpServletReques...
How to extract HttpServletRequest object from Portlet RenderRequest object?
Sometimes when we pass data from action method to a JSP and from JSP to a portlet's render phase then we need to extract HttpServletRequest object from Portlet RenderRequest object to get the parameter values.
By writing the below lines you ca...
How to submit aui:form with ajax in liferay 6.2?
Basically we work with Portlet Application development and need to submit form and display the data in JPS page or need to store into database.
In this blog I only illustrate simply submit the form data using ajax to portlet action methods and...
Liferay Adding actions to search container
Liferay Search Container is Liferay UI component which display data in Grid format and its also containing pagination. Search Container is just simple JSTL tag and its allow to use in JSP pages.
According our requirement we need to display res...
Liferay - Using the search container to present your data
The Liferay Search container can provide us the many features using that we can simply show the data in grid format and apply pagination on that. We can configure other multiple tags inside the search container.
Syntax:-
<liferay-ui:sea...
Liferay Validating user-submitted forms
In Liferay we can Validating the user submitted form or Validating AUI input fields. You have to add aui:validator tag and specify the appropriate attributes which we define with name property for ex: required,minLength etc . The Below Example c...
Sample Forms with Alloy UI Tag Libs
In Liferay 6.2 we can use the forms with Alloy UI tags . The Alloy UI Tags can provide the way to do activity with Simple Alloy UI forms same as HTML forms tags. By the below Example we can show how to use Forms with Alloy UI.
Example:
<...
How to give permissions to user roles from control panel in liferay 6.2?
Liferay provide inbuilt permissions feature to manage users and roles of the user, so I will guide you, how to use permissions feature in liferay control panel.
Follow below steps to manage role permissions and users : -
Step 1: First of a...
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...
How to add Calendar control to Alloy UI form in Liferay
Here we can show how you can add the calendar control in your Alloy UI form. The below example explains how you can put your calendar control on textarea in your Alloy UI form.
Example:
<script>
YUI().use(
'aui...