portlet

AJAX on liferay portlets

限于喜欢 提交于 2021-02-11 11:52:07
问题 I am trying to send an AJAX request to a portlet, and it half works. I show you my code and after explain better: The jQuery AJAX: jQuery("#operation").click(function() { var url = '<portlet:resourceURL id="getDataResourceURL"></portlet:resourceURL>'; var operators = jQuery('#result').html(); jQuery.ajax({ url:url, dataType: "json", data:{operators:operators}, success: function(data) { jQuery('#result').html(data.result); } }); And the serveResource @Override public void serveResource

POST parameters not seen by ResourceRequest.getParameter

流过昼夜 提交于 2021-01-28 05:08:37
问题 In Liferay 7 I have a servlet that can serve a resource: @Override public void serveResource( ResourceRequest resourceRequest, ResourceResponse resourceResponse) throws PortletException { // Get the parameter log.info("Text:" + resourceRequest.getParameter("text")); // Some debug info log.info("Parameters:" + Collections.list(resourceRequest.getParameterNames())); log.info("ResourceRequest:" + resourceRequest); log.info("Private:" + resourceRequest.getPrivateParameterMap()); } I call it with

Handling Multipart request that is not an Action request?

自闭症网瘾萝莉.ら 提交于 2020-02-15 06:21:21
问题 I've been thinking if it is possible to handle Multipart request that is not an Action request. There is a reason why it seems impossible to me : Only ActionRequest implements getFile() kind of methods. I can't find any easy way how to get the file out of request other than Action request What if I don't use a html form to upload a file and I don't want a view to be rendered after action request - render phase happens always after the action phase. What if I want to create a post request

Can Liferay portlets get parameters?

百般思念 提交于 2020-01-23 02:42:29
问题 I am having trouble understanding the concept of portlets in a CMS. Let's say I write a weather portlet to display current temperature. I build it, package it in a war, deploy the war in Liferay. Now I created a page, and I want to create 2 instances of the portlet I wrote. I want to display the weather in Seattle and the weather in Miami. Can I do this? How do I pass the portlet a parameter to tell it which city to display? 回答1: Portlet has so-called EDIT-mode. You can implement EDIT mode to

Autologin firing in Liferay from a redirection

£可爱£侵袭症+ 提交于 2020-01-17 05:04:08
问题 I have a problem trying to fire up an autologin class in Liferay CE 6.1.1 when performing a redirection from a custom action method. Let me explain the scenarios. Functional scenario 1: direct POST action Let's say I have a public page A with a login form (with username and password), an autologin class to perform some checks and a private page B to show some data after proper authentication. I have a JSP with the login form in a portlet deployed in public page A, as follows (this is an

Customize permissions for Site Administrator role in Life ray?

半腔热情 提交于 2020-01-14 22:51:23
问题 I want to customize the Site Administrator Role permissions i.e, I need to enable a feature for creating the users for site administration under respective site. How can I achieve that? Do I need to achieve it with Hook OR need to create EXT? OR any other simpler way to achieve that? I need to enable the user creation and assign permission for Site Administrator under respective site. I don't want to crate users by Super admin. 回答1: Maybe you can create a custom portlet, put it in control

AEAI Portal门户平台学习路径

帅比萌擦擦* 提交于 2020-01-07 19:15:28
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 1. 概述 本文根据 AEAI Portal 的特点,为 AEAI Portal 门户平台初学者提供相对合理的学习路径,希望能帮助读者快速掌握 AEAI Portal 相关技能。 2. 认识与部署 2.1 认识 Portal 是一种 Web 应用,“ portal 是一种 web 应用,通常用来提供个性化、单点登录、聚集各个信息源的内容,并作为信息系统表现层的宿主。聚集是指将来自各个信息源的内容集成到一个 web 页面里的活动”。 AEAI Portal 是国内(沈阳数通畅联软件技术有限公司)发布的一款 Portal 产品。 2014 年 10 月 20 日其 Portal 推出第一版“ AEAI Portal 门户集成平台 v3.1 版 ” ,基于 AEAI ESB 可以搭建常规的信息门户、数据门户、应用门户。 2.2 部署 包括安装 JDK 、 MySql 、以及配置 PortalServer 。下图为 Portal Server 的配置对话框。 3. 基础配置 3.1 导航配置 在“门户管理—导航管理”中可以对导航进行管理,也可以新建一个导航。 新建一个导航,设置编码、名称、类型(登录前、登录后)、默认主题(登录后的默认主题风格)等。 在新建的导航中添加页面,如首页,其中添加 Portlet

Problem to display a pdf from my JSF Portlet of Liferay

▼魔方 西西 提交于 2020-01-07 03:16:32
问题 I use liferay 5.2 with jsf-portlet. From the page I want to press a button to generate one PDF. In managedbean i build pdf and I want to show it in response. In a ByteArrayOutputStream named outputStream i have my pdf built with JasperReport. I write: PortletResponse portletResponse = (PortletResponse)externalCtx.getResponse(); HttpServletResponse httpResponse = PortalUtil.getHttpServletResponse(portletResponse); ServletOutputStream out = httpResponse.getOutputStream(); String filename="Pdf"

Custom permission to custom portlet on specific user in liferay

笑着哭i 提交于 2020-01-06 02:50:13
问题 How can i define custom permisssion to custom portlet for specific user in liferay I used enviroment liferay 6.1.2 ga3 with jboss In my custom portlet deploy/undeploy button but how can i give specific permission to that only admin person can access that function any other can not use that check this link http://i.imgur.com/Qwfbg2H.png Can you please elaborate. I also check this link for reference and in jsp page for rendering all the datagrid data render through jeasyui and rest API Removing

Ajax not working in the portlet configuration jsp page (liferay 6.2)

一个人想着一个人 提交于 2020-01-05 12:56:16
问题 Working on a MVCPortlet (Liferay 6.2) . Is there any reason why this ajax call works on a regular jsp of my portlet, but does not work on the config page of the portlet (the jsp that opens when you click top right corner and then configuration and option). In this case, the portletURL is correctly displayed (alert), the JS returns success but the controller never received the client request. Here's the ajax call: $.ajax({ url: portletURL, type: 'POST', dataType: 'text', cache: false, data: {