liferay

Liferay + Spring + Spring Web Mvc - @Autowired dont work

≯℡__Kan透↙ 提交于 2020-01-24 13:58:08
问题 using: liferay 6.1 spring 3.1 spring-portlet-mvc We tried to inject spring beans with @Autowired and it seems that this doesnt work with liferay 6.1 ? Known bug? Workaround? here my applicationContext.xml: <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:util="http://www.springframework.org/schema/util" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www

Is it possible in Liferay to add custom Resource-Actions to my portlet?

独自空忆成欢 提交于 2020-01-24 08:51:07
问题 I create my portlet with Liferay (sdk 6.1), by deploy the portlet gets some default resource-actions, but I need some actions more. Because I want implement some complex permission based portlet. And I don't want create a Ext-Plugin to customize '../resource-actions/default.xml'. 回答1: Did you see this liferay wiki post and this SO question. If you did and those were not helpful please give more details. 回答2: You can set your own user action permissions on the portlet you have created. This

Is it possible in Liferay to add custom Resource-Actions to my portlet?

喜你入骨 提交于 2020-01-24 08:50:05
问题 I create my portlet with Liferay (sdk 6.1), by deploy the portlet gets some default resource-actions, but I need some actions more. Because I want implement some complex permission based portlet. And I don't want create a Ext-Plugin to customize '../resource-actions/default.xml'. 回答1: Did you see this liferay wiki post and this SO question. If you did and those were not helpful please give more details. 回答2: You can set your own user action permissions on the portlet you have created. This

How to upload file in relative directory

十年热恋 提交于 2020-01-23 17:00:11
问题 I have made a application where we can upload any file which will save in our local given directory. I want to modify it, i want to add a drop down (with multiple option i.e floor, store, section) for department. i.e if we want to upload a file in 'Store' folder, we can choose 'Store' option and the file will uploaded to the 'Store' folder. Same for 'Floor' and 'Section'. I just need any example link for that. i have made it in liferay. import org.apache.commons.io.FileUtils; import com

Liferay Scheduler not working after server restart

前提是你 提交于 2020-01-23 07:46:29
问题 I am scheduling a job using the code below. @Controller @RequestMapping("VIEW") public class MyController { @RenderMapping public String defaultView() { try { String cronText = "0 30 12 1/1 * ? *"; String description = "Message Scheduler Description"; String destinationName = DestinationNames.SCHEDULER_DISPATCH; int exceptionsMaxSize = 0; String portletId = "portletId"; Message message = new Message(); message.put(SchedulerEngine.MESSAGE_LISTENER_CLASS_NAME,SchedulerListener.class.getName());

Liferay Scheduler not working after server restart

痴心易碎 提交于 2020-01-23 07:46:02
问题 I am scheduling a job using the code below. @Controller @RequestMapping("VIEW") public class MyController { @RenderMapping public String defaultView() { try { String cronText = "0 30 12 1/1 * ? *"; String description = "Message Scheduler Description"; String destinationName = DestinationNames.SCHEDULER_DISPATCH; int exceptionsMaxSize = 0; String portletId = "portletId"; Message message = new Message(); message.put(SchedulerEngine.MESSAGE_LISTENER_CLASS_NAME,SchedulerListener.class.getName());

Liferay: what is the default approach for logging in Liferay?

╄→尐↘猪︶ㄣ 提交于 2020-01-23 06:48:18
问题 By development of portlets, hooks etc. I have seen different approaches for logging in Liferay. Is there default logging approach - The Liferay Way - that I can use. 1.How to initialize the logger? 2.How to config the logging levels? I have seen that the logging level can be modified direct in Liferay - Control Panel, is it good? How can I combine it with config file? 回答1: You can find the basic logging information you need in Liferay Documentation. Summarized: you should instantiate your

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

How to add Twitter support for Opensocial on a Apache Tomcat (Liferay)?

╄→гoц情女王★ 提交于 2020-01-17 07:28:01
问题 i recently upgraded to Liferay 6.1(b4 from the trunk 17.11.2011) to test the Opensocial support. Now i wanted to make a Twitter Oauth request, but i am not able to do this. I first tested if Opensocial works with some sample gadgets, but i get a error from every gadget. Error: 403 Error, OAuth error: NOT_OWNER, Non-Secure Owner Page. Only page owners can grant OAuth approval ==== Original request: GET /1/account/verify_credentials.json Host: api.twitter.com X-Shindig-AuthType: oauth X

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