Sunday, 4 October 2020

Liferay Configuration API dependencies

 I am using liferay 7.2.0 version.

Have not found:

compileOnly group: "com.liferay", name: "com.liferay.portal.configuration.metatype.api", version: "2.0.0"

Found:

compileOnly group: "com.liferay", name: "com.liferay.portal.configuration.metatype", version: "2.0.0"

Thursday, 3 September 2020

Liferay's success or failure messages for user feedback and custom aui validator

 view.jsp:

<liferay-ui:success key="entity-updated-successfully" message="successfully-updated-entity-details"/>

<liferay-ui:error key="entity-updation-failed" message="failed-updation-entity-details"/>


Custom AUI Validator:

<aui:input name="title">

<aui:validator errorMessage="please-specify-file" name="custom" >

function (val, fieldNode, ruleVal){

    return     ((val!='') || A.one('#<portlet:namespace/>file').val() != '');

}

</aui:validator>

</aui:input>


Thursday, 23 July 2020

liferay headless delivery open APIs URL

localhost:8080/o/headless-delivery/v1.0/openapi.json

Liferay 7.x inclusion of CSS or JS files into the portlet or widget

Include the below entries under portlet component properties:

"com.liferay.portlet.header-portlet-javascript":"/js/main1.js"
"com.liferay.portlet.header-portlet-javascript":"/js/main2.js"

liferay 7.x questions and answers - for certification

1. When multiple implementations are available for osgi-api which are used to identify the particular implementation for that client?
Sol : Policies & filters

2. bnd tools generate _____ file by using build.gradle entries.
Sol : MANIFEST.MF

3. what is require-capability & provide capability?

4. provide-capability vs export in osgi?

5. why we are using blade CLI in liferay development?
Sol : Blade CLI provides module project templates are mvc-portlet, service, service-builder and so on.

portlet lifecycle phases

1. init phase
2. render phase
3. action phase
4. resource phase
5. event phase
6. destroy phase

Liferay theme creation basic commands/tools to setup or configuration


Install Node.js
1.    Find the node-[version]-[os] installer from node site.
2.    Run the installer for your operating system and follow the instructions.
3.    Open a Command Prompt/Terminal window.
4.    Run node -v in your command line to verify your installation once you have installed node.js and npm.
o    The node version should be 8.x.x
5.    Run npm -version to double-check the appropriate version is installed.
o    The npm version should be 6.x.x
You can also find the Node installers at https://nodejs.org.
Install Yeoman and Gulp Dependencies
1.    Open the command line.
2.    Type npm install -g yo gulp.
o    Note: Users on OSX or Linux will need administrative access to run this command. To do this, they may need to run sudo before the command.
3.    Press Enter.
This should have installed the Yeoman and gulp global dependencies. Now we can go ahead and install the Liferay Theme Generator. If you are running Windows, you should also install Windows Build Tools before Installing the Liferay Theme Generator. Let's do this next.

Install the Liferay Theme Generator
1.    Type npm install -g generator-liferay-theme in the Command Prompt/Terminal.
o    Note: Like before, Users on OSX or Linux may need to run sudo before the command.
2.    Press Enter.
3.    Type yo in the command line to see that the generator is installed.
4.    Press Enter.
5.    Type Y or N if an initial prompt asks to collect data.
6.    Press Enter.
7.    Choose Get me out of here!.
8.    Press Enter.