Showing posts with label Hook. Show all posts
Showing posts with label Hook. Show all posts

Tuesday, June 14, 2022

Create Application Start up Event in Liferay DXP (7.3)

    

Today we will see how we can create application start up events in Liferay 7.3 . By using this we can create our configuration on start up of your module. So we don't need to create Custom Fields, Structure, templates etc using Control Panel. As soon as module is deployed code will run automatically. 

So lets start this step by step :-


Continue Reading...

Saturday, June 17, 2017

Model Listener in Liferay 6.2


Today we will see how to create Model Listener in Liferay 6.2 .I write Listener for Web Content ie Journal Article .So when a Journal Article is created  we will do some processing. 

so lets start this Step by Step:-


Continue Reading...

Saturday, November 28, 2015

Custom Field/Attribute or Expando in Liferay Programmatically


We already know how to create custom field using control panel . 
Lets consider a scenario we create 40 custom fields in our local server using control panel . When i deployed my application to production server we need to create all custom fields again in production server . What if as soon as our application start and all custom fields create automatically????

Continue Reading...

Wednesday, August 5, 2015

Fetch/Retrive a Document with its Metadata Programmatically in Liferay


In my previous blogs we see how to upload a file with metadata. Now its time to fetch all the data Programmatically .Before reading this blog you must know how to create metadata sets and document type for this you can read my previous blog Save Document with Metadata in Liferay
Continue Reading...

Monday, May 25, 2015

Use of Custom Field/Attribute or Expando in Jsp (Hook)


Today we will discuss how to use Custom Attribute in Jsp.Before reading this, you must read my previous blog on Custom Field in Liferay and Jsp Hook in Liferay.

Here we create a Jsp hook for create account page , so when user fill the form for create account he also provide maritial status and on click of submit button maritial status is also save with the User .

So Lets start this step by step:- 
Continue Reading...

Wednesday, May 6, 2015

Index Post Processor Hook in Liferay


Today we will discuss about Index Post Processor Hook  in Liferay. In Liferay if you want to providing indexing on some column for searching ,sorting etc. than you can use Index Post Processor Hook.

Ex-Sign in-->Admin -->Control panel-->Users and organization--> all users. Than try to search user by First Name, Last Name,Screen Name you can search easily but than try to search user by Job Title than no result is found.So today we apply indexing on Job Title by using Index Post Processor Hook.
Continue Reading...

Monday, April 27, 2015

Custom Action(Events) Hook in Liferay


Today we will discuss about Custom Action Hook  in Liferay. In portal.properties file their are some properties which have multiple values and some have only one value like true/false.

a)For single value like true/false we override the property see 
Portal Properties hook in Liferay.

b)For multiple values properties like application.startup.events   any values you specify in a hook don’t override the list defined in the portal, but rather are appended to that list.Your actions will then fire when Liferay Portal starts in addition to the list of actions that are specified in the default Liferay installation

Continue Reading...

Friday, April 24, 2015

Adding Struts Action by Hook in Liferay


Today we will discuss about Adding Struts action in Liferay by using Hook.Before reading this blog you must read my previous blog on  Override Struts Action by Hook in Liferay. Adding Struts action is similar to overriding Struts Action but the difference is :-

For Overriding we extends BaseStrutsPortletAction Class.
For Adding we extends BaseStrutsAction Class.
Continue Reading...

Wednesday, April 22, 2015

Override Struts Action by Hook in Liferay


Today we will discuss about Struts Action hook.By using Struts Action hook we can achieve two things:-
1)Overriding existing struts Action
2)Add new Struts Action

Today we will discuss about Overriding existing struts Action. Every time you login a Struts Action is called.Struts use a file called struts-config.xml you can find this file inside WEB-INF .

For overriding Struts Action your custom class must extend BaseStrutsPortletAction which implements  StrutsPortletAction which  contain processAction().
Continue Reading...

Tuesday, April 21, 2015

Language Properties Hook in Liferay


Today we will discuss about Language Properties hook.Language property hook are used to overriding the existed portal language properties like Language_en.properties file for overriding of english language file.We can also add new properties by using Language Property hook.

Today we change :-
1) Button text Sign In  to Login .
2)Error message This Field is required to Please enter this field.
Continue Reading...

Monday, April 20, 2015

Portal Properties Hook in Liferay

Today we will discuss about Portal Properties hook.When we Create Account in liferay we have to provide the value of captcha today we disable the captcha field using Portal Properties hook.

We have portal.properties file inside portal-impl (\ROOT\WEB-INF\lib) which contain some properties.Here some properties have multiple values and some have only one value like true/false.
Continue Reading...

Thursday, January 15, 2015

Liferay Jsp Hook for override login jsp

Today we write a Hook for overriding default Login Page. Here we remove the openID, Create Account and Forgot Password links

Continue Reading...

Sunday, January 4, 2015

Liferay Service Hook to override Liferay Existing Service


Today we will see how to write service wrapper in Liferay 6.2. We override User service getUserCount().Here we create a class that extend the particular wrapper class and just provide the entries of our custom class in liferay-hook.xml so that liferay use our services instead of Original.


Continue Reading...

Total Pageviews

Number Of Unique Visitor

Free counters!