Sun provides implementation of portlet api which resides in portlet. This library is very smart one as it can handle normal file. Instead of trying to figure out whats wrong with your code, its usually easier to compare your portlet to a working example and find. In this tutorial, we will look into liferay 7 portlet module creation along with osgi configuration. Application context file is required if you are developing your portlet with spring in liferay. Our next portlet is going to read some configuration values from the portlet descriptor file and display it. The problem is the following markup in the docrootwebinffacesconfig. There are different types of portlet containers such as apache pluto, oracle web center and liferay. We can build and deploy it, but when we want to trigger the file download, the content type is changed and we are redirected to the curent page. Liferay is a open source platform which allows you to create websites. Do you want to develop mvcbased portlets using the java ee standard.
You can also look at the liferay faces jsf export pdf for a full portlet example to downloadexport a file. This tutorial is an extension to liferay 7 portlet tutorial. In case if you are using perties file in osgi module then using below snippet you can read property specified in perties file. This portlet is very useful to store documents so that we can use these like we provide user a facility to download the files etc. Liferay 7 jsf primefaces portlet with servicetracker amusarraliferay7jsfprimefacesportlet. In this tutorial, we will implement basic leave system application with service builder and liferay components. From the page i want to press a button to generate one pdf. Liferay 7 portlet tutorial part2,liferay 7 tutorial. Problem to display a pdf from my jsf portlet of liferay1.
Application development shows you how you can build. We would like to implement a jsf portlet which streams a file to the client from the backing bean as described here we tried the jsf 2. Remove any older versioned duplicates, align the library versions out, place the libraries just there where they belongs. If you will be using liferay portal ce in a standalone environment, we recommend downloading the tomcat bundle. Hello world spring mvc portlet with annotations pro liferay. In this post we will see how to create and deploy jsf liferay portlet on tomcat server. When creating a jsf portlet, the bridge jars are automatically downloaded into the portlet project, along with several. Jsf portlet developers must specify the facelet view in the webinf portlet. The tutorial will be using java server faces jsf 2. How to create a jsf primefaces portlet for liferay 7 with. Share, connect and manage files with simple draganddrop. Today we will discuss document and media portlet of liferay. I write a resourcehandler for the files and it works fine, but i must implement 2 spezial functionallities. Liferay supported spring based portlet and we can deploy into liferay portal server.
Just wanted to add some points in addition to what has been said already. The most simple yet hardly recommendable way to make a file available for download is to write it to a file on the server and to return an url pointing to the file. Ease communication between teachers, students and parents. Do you want to use a portlet development framework with a ui component model that makes it easy to develop sophisticated, rich uis. If you dont have it installed yet, see the developing apps with liferay ide learning path for full details. Even worse, our idea was not to embed a pdf file, but to download it. These portlets sets contenttype and contentdisposition headers to demonstrate file download scenario. Liferay portal is the most popular and widely downloaded open source portal. Many people ask how to achieve file downloads from a portlet project. Hoang hai nguyen brussels area, belgium professional. In this tutorial, youll create a jsf portlet project using liferay idedeveloper studio, so you can see just how easy it is. So liferay portlet application is also packaged as. Finally were building a portletstateaware java server faces portlet using the jsfportletbridge mechanism.
You now have a good idea of how to specify and define general descriptor files for your jsf portlet. Jsf portlets also use liferay descriptors, which you can learn more about in the liferay descriptors subsection. If the portal services installation is not within your network access, you must. Because there is one additional thing that might be interesting. Problem to display a pdf from my jsf portlet of liferay 1. Liferay push liferay push exposes a framework that lets developers send push notifications from liferay dxp to native android and ios apps. Similar to the aforementioned jsf portlet except that it uses jsf 2. This tutorial is intended to provide you a full detailed explanation for getting liferay portal up and running and deploy the same employee registration sample that we had developed in earlier tutorial. If nothing happens, download the github extension for visual studio and try again. Now that your portlet descriptors are defined, you should begin working on your jsf applications resources. Build a proof of concept a new portlet using the same old dao, process xml file definition input, to produce new financial forms, seamlessly integrate on the existing agriculture. Spring portlet mvc app conversion to portletmvc4spring requires only a few steps. Important i have a problem with fileupload component placed on webpage with twoi portlets. Lets jump into creation of sample osgi portlet module and will drag on to liferay page.
Make sure youve created a jsf portlet project that can be deployed to liferay. The need for integration stems from the fact that the documentation omits how to deal with the necessary dependencies so that it is possible to use the osgi services and correctly install the portlet. Backend java services, web services, and rest services. Service builder is an objectrelational mapper where you describe your data model in a single xml file. In the manual deployment we need to download portlet application from liferay or some other portlet application vendors then we need to deploy the application in our liferay portal. Build your project on the community supported liferay portal ce or commerce. To resolve this issue, i ended up with the following steps.
We are using liferay maven artefacts to create a new jsf primefaces portlet. At first we will create a simple portlet say its springhelloworldportlet by liferay ide. Download file, filename doesnt work in portlet stack overflow. Blog posts done by the users with my own easyblog portlet did not appear in the blog portlets but could be found with the admin portlets. If youre experiencing deployment problems with deploying a jsf portlet to liferay portal, theres a simple process you can follow to solve them. The prerequisite for this tutorial is liferay 7 development setup before creating module in liferay dxp, so please click on this link to setup the development environment in eclipse. How to read perties file in liferay dxp jitendra rajput 3. The developer section is divided into five subsections. To install the portlet applications file, you must log on to the portal with administrator privileges, and be able to access the cognosbiportlets. Icefaces facilitates developing portlets through a netbeans liferay plugin, and the icefaces framework does not rquire a jsfportlet bridge. Primefaces filedownload in liferay when i tried to use in liferay, with the simplest code shown in the demo site.
Installing the portlet applications file for liferay portal. The configurationactionclass value must be a class that implements com. Tailored solutions built fast, secure, and connected on one platform. Jsf portlets mcgrawhill education access engineering.
Problem to display a pdf from my jsf portlet of liferay. The following example snippet specifies a facelet file preferences. Howto dowloading files from a portlet liferay community. File download in jsf portlet forums liferay community.
Blog aggregation portlet based on schoold organization roles. Liferay 7 portlet tutorial java,liferay, liferay 7, soap. Download file pdf liferay user guide liferay user guide liferay user guide this is the user section, which describes the features of an installed liferay portal, how to configure its applications, and how to build your website. When we create a new portlet in liferay, the folder structure is created as below. Yet again, i was faced with the lack of clear documentation on creating jsf or icefaces based portlets for liferay. You gave her a solution by changing a param on liferayportlet.
This jar file contains classes and interfaces under javax. We checked the mime type settings both of liferay and our portlet, added. Download image slide show structure and template and we mentioned child deployment context. Liferay faces is an open source umbrella project that provides support for the javaserver faces jsf standard in webapp and portlet projects. Troubleshooting jsf portlet deployment errors liferay. Liferay portal is the worlds leading enterprise open source portal framework, offering integrated web publishing and content management, an enterprise service bus and serviceoriented architecture, and compatibility with all major it infrastructure. Liferay have provided flexibility to develop portlet with different web framework such as jsf, spring, struts and vaadin. Creating portlets using java server faces 2 and liferay. Install portlet applications in liferay portal liferay savvy. Digital experience software tailored to your needs liferay. Need tutorial on implementing a jsf resourcehandler. The easiest way to do this is by generating a new liferay jsf portlet project and migrating your code to it.
First portlet is placed as runtime in liferay theme, and the second one is normal portlet with file upload component. If you dont have one already, create a perties file in the liferay home folder, and add the following property. Liferay 7 jsf primefaces portlet with servicetracker. Using portlet preferences with jsf liferay help center.
Get support for javaserver faces jsf standard within liferay. First step is to define the privatesessionattributes property in the liferayportlet. Learn how to do a liferay ipc using portlet session inter portlet communication and pass data between portlets. Download and install java if you still dont have it installed. Configurationaction and is called to allow users to.
Possible duplicate of download file, filename doesnt work in. Copy the downloaded war file into the liferay deploy directory. Create spring portlet called newspring portlet go to filenewliferay project step 2right click on your project, create liferay service builder. Portlet tutorial, apache pluto portlet portal example tutorial, portlet request, portlet response, portlet example code, action request, action response. When the file was downloaded bevor then first a confirm dialog had to appear an ask the user shure you want to. When creating a jsf portlet on liferay 7, via command line or via ide, the dependencies are those indicated on the build.
1488 1292 117 598 1582 1013 1175 387 1419 1093 620 939 954 121 952 583 682 932 1538 147 1140 236 1303 1202 680 1152 1443 113 437 493 527 1487 34 194 790