portlet

What does a portlet bridge do?

亡梦爱人 提交于 2019-12-05 15:27:04
In an interview today I mentioned that I had done some jsf work in a portlet. The interviewer asked for specifics on what the portlet-bridge does. I never looked into it all that much, just used it because I was told it would make jsf work in the portlet. All I could really say was that it allowed the requests to come from the portal to jsf in a way jsf would understand, and made it play nice. What exactly does the portlet-bridge do? From the spec linked by Jeremy Walton above. 2.1 What is a Portlet Bridge? The Java™ Portlet Specification defines a set of APIs for directly implementing a

Liferay : Portlets inside portlet

强颜欢笑 提交于 2019-12-05 14:21:18
Is it possible to create a few portlets inside a portlet? I mean a multilevel portlet. p.mesotten Yes. You can use the Nested Portlet to this purpose. This is a layout container for other portlets. You can choose the wanted layout in the configuration. Yes, definately, you can have portlet within portlet. Liferay provides taglib, thru which you can easily embed different util portlets (web content display, breadcrumb, navigation etc) within portlet NESTED-PORTLET Assuming that you are talking about a framework, a platform or something similar, yes, it's possible. Look if your framework have a

Multiple Ajax calls liferay portlets

余生长醉 提交于 2019-12-05 12:10:41
I am having liferay portlet and I need to heavily depend upon the AJAX calls. So I need to make multiple calls to serveResource method. One way to do the same is that I can pass a parameter with the URL and then differentiate the request according to that parameter. But in my case I have to call serveResource so many times due to which the method will be difficult to maintain. Is there any framework to do so? Using which the code becomes maintainable. Use Spring MVC framework and call different method based on your business logic/user action in controller, Try below code in jsp <portlet

Integration of Grails into Liferay

梦想的初衷 提交于 2019-12-05 08:08:35
问题 I wanted to integrate Grails into a Liferay portlet. I saw that a plugin for that purspose exists (http://www.grails.org/plugin/portlets-liferay) but the documentation is not very helpful. I only want to start with it, so I create a simple Hello World aplication in Grails (http://grails.org/doc/latest/guide/2.%20Getting%20Started.html#2.4 A Hello World Example) and I want to include it in a Liferay portlet. Which commands or configuration modifications have I to do? 来源: https://stackoverflow

How to share jar within multiple portlets?

瘦欲@ 提交于 2019-12-05 08:02:07
I'm using several jars in my portlets, for instance c3p0. Now I want to avoid to put the jars in every of my portlets lib folders. How can I share one jar file within multiple portlets? And how should I integrate them in the Eclipse IDE? Add an external jar or put them in one dedicated project and include them from there? Another solution would be to put them under ../liferay-portal-<version>/tomcat-<version>/webapps/ROOT/WEB-INF/lib If you place them here you can add the JAR as a dependency for your portlet in the portlets liferay-plugin-package.properties (if you're using Liferay Developer

Java : Getting the article id from a web content portlet

蹲街弑〆低调 提交于 2019-12-05 06:24:28
问题 I have two portlets on my web page : The first one is a web content portlet that allows picking up an article and displays it. The other one is the portlet I'm working on (Struts MVC). What I want to do in the second portlet is to get the article id used to display the web content in the first portlet. Is it possible ? Thank you! 回答1: You can do it using some Liferay specific APIs, though the approach is not perfect, but it'll work. You can use Liferay APIs to get list of portlets currently

Liferay DLFileEntryLocalServiceUtil.addFileEntry does not create AssetEntry record

戏子无情 提交于 2019-12-05 05:23:09
问题 I have a custom portlet which provides a form where the user can upload files. The uploaded file should be stored in the Documents and Media Portlet. I am creating the file entry using DLFileEntryLocalServiceUtil.addFileEntry . The file is succesfully uploaded and the record in DLFileEntry table is created, but in the AssetEntry table no new record is created. I suppose Liferay should create it automatically, am I wrong? Where could be the error? This is my code: DLFileEntry dlFileEntry =

Portlet: Forward a ResourceRequest to show the full portal

痞子三分冷 提交于 2019-12-05 02:24:41
问题 my intention is to process a ResourceRequest that serves a resource (A dinamically generated PDF). If something goes wrong generating this file, the whole portal with a failure message in the portlet should be rendered. Is it possible to forward a ResourceRequest to a request that renders the complete portal? I am also considering a redirect, but I will like to be able to pass some attributes/parameters along. I hope I explained my problem clear enough. Thank you. Related/Duplicate: How to

Understanding the execution of Action Phase and Render Phase

点点圈 提交于 2019-12-04 21:14:37
I am using Liferay 6 for the Portal Development . By going through Liferay Developer Guide the author explains that there are Two phases of Portlet Execution Action Phase Render Phase public class DateTimePortlet extends GenericPortlet { public void doView(RenderRequest req, RenderResponse res) throws IOException, PortletException { Object actionAttribute = req.getAttribute("datetime"); res.getWriter().println("Date Time:" + (actionAttribute != null ? actionAttribute :"Unavailable")); res.getWriter().println("<BR/>"); PortletURL u = res.createActionURL(); res.getWriter().println("<A href=" + u

Liferay: what is the relationship and difference between ActionRequest, RenderRequest and PortletRequest?

别说谁变了你拦得住时间么 提交于 2019-12-04 14:41:02
问题 What is the relationship and difference between ActionRequest , RenderRequest and PortletRequest ? Can we get instance of one from another? 回答1: The PortletRequest is the parent of both. An ActionRequest and a RenderRequest are both different types of PortletRequest objects. An ActionRequest is valid during the action processing phase of the portlet. During this phase, the portlet hasn't completely decided how it is going to render itself, be it minimized, maximized, in edit mode or in veiw