portlet

How to get parameters from URL in Liferay portlet?

霸气de小男生 提交于 2019-12-13 14:16:20
问题 I'm using jsp of out-of-box portlet like feed.jspf in Liferay 6: String articleId =null; HttpServletRequest httpReq = PortalUtil.getOriginalServletRequest(PortalUtil.getHttpServletRequest(renderRequest)); articleId = httpReq.getParameter("articleId"); It is giving a null value whether in custom portlet or in .jsp files, but it should have a value. 回答1: Sure, you can always use the standard HttpServletRequest to retrieve your parameters from. You can get this request by using the PortalUtil

Spring Portlet MVC sentRedirect and setRenderParameter

与世无争的帅哥 提交于 2019-12-13 05:39:00
问题 I am stuck with a probably simple Spring Portlet redirect and jsp render problem in Liferay. I have two Pages in Liferay page1 and page2 and one spring mvc portlet portletA with two JSPs defaultView.jsp and second.jsp . page1 and page2 both instantiate portletA. portletA loads by default the defaultView.jsp by calling the @RenderMapping() method. DefaultViewController : @RenderMapping public String renderDefaultView() { return "defaultView"; } From defaultView.jsp the liferay page2 can be

How to get portlet context in config (Liferay)?

风格不统一 提交于 2019-12-13 05:14:23
问题 I'd like to access the Context of the portlet in config mod (in my implement of ConfigurationAction interface). I try since hours to get the same Context in my ConfigurationActionImpl.processAction(PortletConfig portletConfig, ActionRequest actionRequest, ActionResponse actionResponse) as I have in my doView(RenderRequest renderRequest, RenderResponse renderResponse) , but without any good result. In my doView() , I can access my portlet Context using getPortletContext() (same as

The import package cannot be resolved

你离开我真会死。 提交于 2019-12-13 05:02:56
问题 I have a liferay portlet. I've added some external libraries using maven. In ide no errors, it can recognize, but when deploying with ant , it says no such package and class import pack.SomeClass; The import pack cannot be resolved code: import pack.SomeClass; public class MainPortlet extends MVCPortlet { public void doView(RenderRequest renderRequest,RenderResponse renderResponse) { SomeClass a = new SomeClass(); } } 回答1: If you are using maven and you have defined your dependency with scope

Getting journal articles by category: Liferay Portlet written in Python

喜你入骨 提交于 2019-12-13 04:50:41
问题 I am trying to write a simple Liferay portlet in Python. The portlet will show a list of categories and when clicked will show a list of Web Content articles (journal articles) of a certain structure. I am able to get the list of categories but cannot find a way using the liferay api to get a list of articles by category? I have searched allover but it seems to me the method should be on this page: http://docs.liferay.com/portal/6.1/javadocs/com/liferay/portlet/journal/service

extracting <table> from html string and generating pdf using

本小妞迷上赌 提交于 2019-12-13 04:39:45
问题 I am trying to extract table tags(html) from a string and output them as table on pdf which I download on my local. As the string which contains the html content is dynamic, so I can't do cell by cell or row by row mapping. For eg. private String message = "<html><body><p class=\"MsoNormal\"><b><span style=\"color: rgb(68, 84, 106);\">Dear Agent,<br><br>Please be informed that because no TRMF or reason for delay were received by the due date mentioned below, we consider the Transaction to be

Access values displayed in Search Container in another jsp

左心房为你撑大大i 提交于 2019-12-13 03:59:52
问题 I have a jsp where I display some data of some people say employees. The data of each employee is displayed as a row. I have made each row as a link so that when a user clicks on any row which gives details of a particular employee, the user is directed to a jsp which displays the same data of the employee so that further processing could be done. My question is how should I pass the data of an employee when a user clicks on the row which contains that particular employee information? What I

Liferay - display only top menu pages in navigation portlet

…衆ロ難τιáo~ 提交于 2019-12-13 03:57:51
问题 I need to use Navigation portlet (71) to display only top menu pages (level 0) . It is not possible to configure this portlet in such way through his Configuration . So, the question is, what is the best approach to solve this problem: Create new portlet (navigation-like) Hook navigation portlet Any other ideas? Thanks a lot. 回答1: Navigation portlet is using Liferays tag - liferay-ui:navigation . You can create a small jsp-hook to override /html/taglib/ui/navigation/page.jsp . In this jsp you

LAST_PATH Redirection in Custom Login Post Action in Liferay 7

纵然是瞬间 提交于 2019-12-13 03:42:11
问题 I'm implementing custom login in Liferay 7 - one module for login hook portlet and one for ActionCommand. I also generated class for post login event. The problem is redirection won't work on either this class or on JSP of login hook porlet. This is my code for LifecycleAction: @Component( immediate = true, property = { "key=login.events.post" }, service = LifecycleAction.class ) public class UserLoginPostAction implements LifecycleAction { private static final Log LOGGER = LogFactoryUtil

spring3mvcportlet populate JSON dojo select

大城市里の小女人 提交于 2019-12-13 03:34:46
问题 I am new to Spring mvc3 portlet and dojo. I am trying to populate select dropdown with JSON data when jsp is loaded. I want to use dojo and give ajax call to controller and return JSON when jsp is loaded. Any tips will be helpful. 回答1: @Controller @RequestMapping("/yourController") public class YourController { @RequestMapping(value="/combo/{id}", method=ReqestNethod.GET) public String getDropDownData(@ParamValue("id") long id) { List<Combo> combos = commonDao.getCombos(id); String json =