liferay-6

How to get Server Name and Server Port from Liferay velocity template?

强颜欢笑 提交于 2019-12-10 21:05:33
问题 In jsp page we can get Server Name and Server Port by using request.getServerName() and request.getServerPort().` As we can't get HttpServletRequest from Liferay velocity template, Is there any other way to get both Server Name and Server Port ? Please answer with a small code snippet.. 回答1: In your Liferay sources you can find com.liferay.portal.velocity.VelocityVariablesImpl . This class is placed under portal-impl/src/com/liferay/portal/velocity/VelocityVariablesImpl.java . If you check

ShouId I migrate from Liferay 6.1 to Liferay 6.2?

邮差的信 提交于 2019-12-10 17:14:12
问题 I would like to ask a question about wether or not I should do the migration to Liferay 6.2. Me and my team are working since 4 month on a portal quite big developed with Liferay 6.1 (CE edition) and now, since the project publication date is still 4-5 month ahead (so I do have time), I was wondering if doing the migration to 6.2 now is a good choice. I already tried the new version and I must say I am impressed about the new features and since now I haven't find any bugs. Anyone had any

how can we remove that Liferay Logo , Sign In Hyperlinkand Powered BY ?? from the screen

China☆狼群 提交于 2019-12-10 16:18:29
问题 I am using Liferay 6 and Tomcat for development . I have developed a Custom Login POrtlet for my Application Now on entering http://localhost:8086 , my Custom Login Page is displayed . Please see the screen shot . My question is , could anybody tell me how can we remove that Liferay Logo , Sign In Hyperlink ( Extreme right top ) and Powered BY ?? from the screen . 回答1: Actually the Logo can be changed without creating a theme. The other items require a cusotm theme however (where you will

Display data from Custom Query(Joined tables) in liferay search container

做~自己de王妃 提交于 2019-12-10 15:52:53
问题 I have followed this wiki and have successfully built a custom query. It works fine. I have used a join between tables. My question is how do I display it on a jsp using liferay search container since className in search container requires one model class. EDIT: What I have tried till now is this: <% getAttendanceData attName = new getAttendanceData(); List<Object[]> displayAttListName = AttendanceLocalServiceUtil.findAttendance(); ArrayList name = new ArrayList(); ArrayList title = new

Liferay <portlet:actionURL>

僤鯓⒐⒋嵵緔 提交于 2019-12-10 13:05:21
问题 In my jsp I have the following code: <portlet:actionURL name="addDetails" var="addDetailsURL" /> <aui:form name="addDetails" action="<%=addDetailsURL.toString() %>" method="post" > <aui:input type="text" label="name:" name="name" value="" /> <aui:input type="text" label="surname:" name="surname" value="" /> <aui:input type="text" label="age:" name="age" value="" /> <aui:button type="submit" value="addDetails" /> </aui:form> I am using liferay. I want to submit this data which will be

exception“:”java.lang.ClassCastException in liferay service builder

旧时模样 提交于 2019-12-10 10:56:24
问题 I have worked on implementation of the Entity remote service. I have created one custom service method in EntityServiceImpl,Created custom service method providing service through InstitutionServiceUtil. After deploy the portlet, while sending request to service method through from browser window,I am getting below Exception exception":"java.lang.ClassCastException: com.institutions.model.impl.InstitutionImpl cannot be cast to com.institutions.model.Institution Note: If I send the request

rendering Liferay page URLs inside of portlets Liferay 6.1

[亡魂溺海] 提交于 2019-12-09 13:28:03
问题 I'm new to liferay and I'm almost positive this is blazingly simple to do: Using velocity markup, I want to be able to generate links to pages within my Liferay website and embed them inside of my portlets on different pages. I have a vague idea of how it might be done so I searched around figuring it would be posted somewhere, but I can't find anything on it. Incidentally, I want to put whatever code I come up with inside the view.jsp of the portlet. I would use velocity markup here but I

How to replace a function on a Liferay native portlet

不想你离开。 提交于 2019-12-09 04:52:04
问题 I am making a change to a native Liferay portlet, that comes with Liferay Intallation. How can I change a function to my own implementation by a hook or similar approach? I have read how to make pre and post conditions and how to make new implementation of an interface, but I don't know how to just replace random function inside random class at a portlet that I want to keep otherwise as it is originally. 回答1: There are several ways you can modify the functionality of a native Liferay portlet.

How to make the ResourceResponse to forward the request to error page in liferay portlet

折月煮酒 提交于 2019-12-09 03:36:24
问题 I am trying to forward my request to error page when error occurs during generating excel sheet. Here is sample code below. I am not sure why it is not getting forwarded to error page when the exception is thrown, it is displaying blank page but not going to my error page for sure.` @ResourceMapping("xyz") public void generateExcelExport(ResourceRequest request, ResourceResponse response) { try { //Do all the excel related logic response.setContentType("application/vnd.openxmlformats

How to get Portlet Id using the portlet name in Liferay?

安稳与你 提交于 2019-12-09 02:51:50
问题 I have a requirement of getting resource permission using portlet name. I will have the name of the portlet not the Id. Resource Permission name for a portlet is that portlet's Id. I checked the Portlet table, it has only the Id and other info. Where will be the other attributes of portlet saved?. Is there a way I can get portlet's Id by using portlet's name. I have a workaroud to get all portlets and compare, but if I can directly get portlet's Id using portlet's name it will be helpful. Its