Skip to main content

Posts

Liferay 7.1 Topics Coming Soon stay connected

1. Liferay 7.1 Service Builder 2. Rest Service and Liferay 3. Consuming SOAP service with Liferay 7.1 4. Creating Theme With Liferay 7.1 Using Liferay IDE Using NPM 5. Create Angular NPM Module 6. Web Content Management 7. OSGI Basic 8. Liferay 7.1 with more than 1 DB 9. A sample project 10. Liferay Dev Ops
Recent posts

How the portal page is loaded with respective portlets

How the portal page is loaded with respective portlets When a user requests a page with a URL, 1.    The browser sends the request to the Application Server (AS). 2.    Liferay gets the page name from the URL. 3.    It goes to the layout database table and finds the related        theme and page layout. 4.    Based on the page layout, Liferay finds the portlets added        into each area of the page layout. 5.    Liferay runs the portlet and adds the output in the        portlet.vm template. 6.    Liferay interprets the portlet.vm template and adds the output        in the page layout. 7.    Then Liferay interprets the page layout and adds the output in        the portal_normal.vm template. 8.    After that Liferay interprets the portal_normal.vm template and        returns the output, which is HTML markup, to the browser. 9.    The browser renders the HTML markup and presents the portal         page to the user.

Servlets vs Portlets

Basic Overview of servlet and portlet-: S.No Servlet Portlets 1 Servlet uses deployment descriptor (web.xml) determine how URLs map to servlets Portlets also uses web.xml file however they have additional deployment-descriptor portlet.xml, which must declare all of the portlets that will be used by the portlet container 2 Servlet uses HttpServletRequest and HttpServletResponse Instead of using HttpServletRequest and HttpServletResponse portlets uses Action Request and Action Response , Render Request and Render Response 3 Web Container creates Servlet Context at the time of deploying the project , Servlet Context can be used to get configuration information from web.xml Similar to servlet context portlet uses PortletContext. 4 Servlet uses ServletConfig to get configuration information Portlet uses PortletConfig to get configuration information 5 When a request to servlet is made its load the whole h

Service Builder 1

Service Builder uses the spring and hibernate integration Data Access Objects implementation mechanism in short we can call it as DAO implementation. Here Service Builder Tool will use the spring and hibernate technology to develop service layer to Plugin portlet. Service Layer's -: Persistence/DAO classes: Persistence or DAO classes will provide the direct data base interaction like insert, delete and update the data in table. such kind of logic will be present in this classes. Conceptually for each table we have one persistence class that will interact with table. Here actual data base interaction code will be present. As we know that to interact with database we need hibernate/jdbc in java. Persistence/DAO classes we will get the session factory object and from that we will open session, with that session object we will do all database interactions, once we finish all tasks we will close the session. Model/POJO -: The model or POJO classes wi

Basic Concept of Service Builder

What is Service Builder ? Service Builder is a model-driven code generation tool built by Liferay that allows developers to define custom object models called entities. Service Builder generates a service layer through object-relational mapping (ORM) technology that provides a clean separation between your object model and code for the underlying database. Service Builder add the necessary business logic for your application. Service Builder takes an XML file as input and generates the necessary model, persistence, and service layers for your application. Service layer is set of java classes and interfaces which implement the database interaction logic. Service Builder uses the spring and hibernate integration Data Access Objects implementation mechanism in short we can call it as DAO implementation. Service Builder Tool will use the spring and hibernate technology to develop service layer to Plugin portlet. Important operation that Service Builder perform ? Automat

Liferay Custom Field and Custom Attribute (Using Liferay UI and Programatically)

Custom fields are a way to add attributes to many types of assets in the portal. Its basically help us to add additional fields to existed models or entities. Adding some more additional attributes to existed entities or models helps us so to meet our requirements. Liferay provide two way's to allow the creation of Custom Fields. 1. Using Liferay UI 2. Programatically Lets look these both topic one by one-: Suppose you have a scenario where its needed to add few fields in your User_ Table So its simple to add using Liferay UI just you need to follow these steps-: 1. Using Liferay UI-:   Goto-> Control-Panel -> Click on Custom Field A List will be displayed-: Now you can add your custom fields for any entity in the list. Click on User Entity and a page will be displayed like this-: Now add these value in respective fields-: KEY- myContactId Type- Select Integer After adding the custom field we can view, update from the Liferay UI