How to view our portlet in Liferay - liferay

I created a project in Eclipse and generated .war file of the same. I have uploaded the .war file in Liferay5.2.3 with Admin credentials using Upload File tab. Now i want to view the content of my .war file as a portlet in Liferay. What should i do..?

Once a new portlet is created (developed) and described in the xml file, it will automatically be seen in the drop down list which you have on the top right side of the liferay(once you login to liferay with admin credentials).
Select Add/undefined/'your portlet name'/add.

Related

How to show a file browser and Select files from Liferay Document Library in my custom portlet using ItemSelector

I want to display a file browser to show the Liferay Document Library files and folders and let the user select or upload his files, in my custom portlet.
There is such implementation in the Liferay portal itself now, but I could not find its source code in the Liferay portal source code. (see attached photo)
I need to have both the frontend and backend implementation of ItemSelector for such a use case. I searched Liferay documents but did not find any examples.
I use Liferay 7.3, React and PrimeReact components in the front-end and REST Services in the back-end and have not used JSP in the back-end. (should I use JSP to open the selection modal in the front-end?)

How to support file upload in web-form Liferay 7?

I need a simple extension for Liferay web form to enahance file attachment to data flled in a liferay 7 web form.
Also need to sent this file as an attachment with the email to the registered user.
I know how to achieve this functionality in liferay 6.2 but not about liferay 7. I am using liferay 7 GA-5 CE.
Any help appreciated.
You need to create a custom form field type plugin, please find liferay wiki here Creating Form Field Type. and follow below steps,
Change input type to file in soy file path is
src/main/resources/META-INF/resources/your-plugin-type-name.soy
Create a fragment of dynamic.data.list.form.web bundle and override display/view.jsp to accept the file i.e. multipart data.
Override AddRecordMVCActionCommand action command to store the selected file as you required.
Build and deploy all 3 plugins
Hope this will help you.

Why does liferay published unedited specific journal article?

I am using liferay 6.1. I have many journal articles(Web content). When I publish to remote server. Liferay publish one specific article despite no changes in it. I have written Listener on journal article.
It is liferay problem. If we place journal article on web content display portlet and place on particular page e.g. Home page. If we publish on remote server with selecting the home page It will publish that webcontent as well despite no change in it.
The webcontent will not publish if you select any other page and publish If you not updated that webcontent.

Web Content Portlet data not imported from Liferay Lar file

I have created a liferay portal website with web content portlets on each page and each page having theme.
I am able to export the lar file successfully but when I am importing it on another system, I get an error if I import the file without changing any options. It says that transfer has failed. And if I uncheck all applications and uncheck all COntent before importing, the lar file is successfully imported but while running it, only the theme is displayed and data from web content portlets is not present. THis I think is because I had unchecked web content portlet option in both Content and Applications. But without unchecking all these options,the transfer fails everytime.
What should be done?
If it is fine to overwrite in target environment, then choose select box "Delete portlet data before Importing". That will delete existed data and imports new data.
Note: Take backup of database before trying above solution.

Setting up a new website with Liferay Portal - basic steps?

I know this is not specifically a programming question, but programmers will often have to do this work.
How do I create a website with Liferay portal - the docs are pretty light on this fundamental issue and are all for version 4.4. I am using version 5.2 and the docs don't seem to be relevant.
Do you know what the basic steps are. So far I have logged in as the bruno user and can see the 7cogs website and edit it. But I now need to create my own website (for my company) and be able to develop portlets to add to the parts of the page.
Further I notice that the docs talk about doing work in Eclipse. If our website is all static HTML, (the reason we want liferay is mainly so that we can edit content items using its content management tools), then will there be any need for Java dev, or will it all be drag n drop and clicking to get setup. Any guidance will be much appreciated.
Liferay can be used as a simple CMS, without much Java knowledge : creating, editing and positioning of web content fragments are drag'n'drop and use of the included rich text editor.
But to start using Liferay for your company, there are two main steps : a technical configuration (database, etc.), and a look'n'feel customization.
The technical part
First of all, you should get rid of the 7cogs website : this is called a hook in the Liferay wording. To do that, if you are using Tomcat for the application server, just delete the 7cogs directory as stated here.
You can now create the configuration file for your installation : it's a simple text properties file, named portal-ext.properties and placed in the webapps/ROOT/WEB-INF/classes folder of your tomcat installation.
This file handles most of the configuration of the Liferay portal, for example :
the name of your company
if you want to display a terms of use page on first login
if you want anybody to be able to create an account on your portal
the database where the data will be stored
To do this, the properties in the portal-ext.properties override default properties found in a embedded portal.properties file located in the jar file portal-impl.jar, in the webapps/ROOT/WEB-INF/lib directory. Just unzip the jar file in a temporary folder to access the portal.properties file.
A sample portal-ext.properties file :
company.default.web.id=yourcompany.com
terms.of.use.required=false
company.security.strangers=false
jdbc.default.driverClassName=com.mysql.jdbc.Driver
jdbc.default.url=jdbc:mysql://localhost/lportal?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
jdbc.default.username=root
jdbc.default.password=root
Once done, you can startup your application server. As the default admin (named test, something you can change in the portal-ext.properties file), you can access to the centralized web "control center", located in the "dock" (the strange menu labelled "welcome Test" in the upper right part of any page once logged in).
I would advise you to read the administration guide, useful for most administrative tasks.
The "branding" part
Liferay uses "Themes" to automatically decorate the portal pages (logo, navigation, portlet borders...) using images, CSS, Javascript (JQuery) and the templating language Velocity. The themes are bundled in a .war file, like a standard web application, and deployed on the fly either via the control center or by dropping the file in the deploy directory of the server.
Liferay can use several themes at the same time, one for each community (a group of pages, users and content) for example.
Creating your own theme can be done afterwards, using the "Plugins SDK".
The Wiki, forums and blogs can be very useful.

Resources