liferay-6

Changing request parameter value in Struts2 interceptor

℡╲_俬逩灬. 提交于 2019-12-31 04:39:09
问题 Does anybody know if it is possible to change/remove request parameter values in a Struts2 interceptor? The request parameter Map is an instance of UnmodifiableMap so it doesn't look like it can be manipulated with in the interceptor. UPDATE: I'm using Liferay so uParamsMap will be an UnmodifiableMap public String intercept(ActionInvocation invocation) throws Exception { final ActionContext context = invocation.getInvocationContext(); PortletRequest request = (PortletRequest) context.get

Portlet not getting deployed

ε祈祈猫儿з 提交于 2019-12-30 09:21:03
问题 I have this strange problem at which I have spent stupid amount of time. To build my portlet, I haven't used sdk and I am using my own ant script do the job. It works all well till this wierd situation. I am basically using a lot class from portal-service.jar to change role settings etc. When I include it in my build path and deploy it again. It doesn't get deployed. On shell it shows the deployment, below is the log: Copying 1 file to C:\liferay-portal\tomcat-6.0.29\webapps\ch1_HelloWorld

Portlet not getting deployed

走远了吗. 提交于 2019-12-30 09:20:13
问题 I have this strange problem at which I have spent stupid amount of time. To build my portlet, I haven't used sdk and I am using my own ant script do the job. It works all well till this wierd situation. I am basically using a lot class from portal-service.jar to change role settings etc. When I include it in my build path and deploy it again. It doesn't get deployed. On shell it shows the deployment, below is the log: Copying 1 file to C:\liferay-portal\tomcat-6.0.29\webapps\ch1_HelloWorld

How to override default Liferay Login authentication?

折月煮酒 提交于 2019-12-30 07:43:53
问题 I am using Liferay 6.1, and I want to override default Liferay Login authentication and want to set up my custom authentication. Till now what I have done is, I have created a hook-plugin and have setup following properties in portal.properties file auth.pipeline.pre=com.liferay.portal.security.auth.MyCustomAuthenticator auth.pipeline.enable.liferay.check=false where MyCustomAuthenticator is my custom authenticator class ( which implements Authenticator). Currently, Liferay checks this custom

How to add nested portlets(liferay) through code

岁酱吖の 提交于 2019-12-30 06:41:31
问题 We have something called nested portlets in liferay. I want to add this portlet dynamically through code. Does anyone know the code for adding nested portlets, and add other portlets inside it? Thanks !!! 回答1: for complete example i'll assume that you want to add nested portlet to current page using another portlets action handler. (if used from render action you would not see nested portlet until next view of the page) Add these methods to your code private static String addPortlet(final

How to close a popup window in Liferay?

与世无争的帅哥 提交于 2019-12-30 05:26:07
问题 I load the WebContent edit portlet on a Popup window using the following code: <liferay-ui:icon image="edit" label="true" message="news-edit-url" url="${oneNews.newsEditUrl}" /> editUrl: taglibEditURL = "javascript:Liferay.Util.openWindow({dialog: {width: 960}," + "id: '" + renderResponse.getNamespace() + "'," + "title: '" + LanguageUtil.format(request.getLocale(), "edit-x", HtmlUtil.escape(assetRenderer.getTitle(request.getLocale()))) + "'," + "uri:'" + HtmlUtil.escapeURL

adding custom methods in Hook environment?

不羁岁月 提交于 2019-12-29 01:27:54
问题 i am adding a new method into CalEventLocalServiceImpl using hook... my code is .. public class MyCalendarLocalServiceImpl extends CalEventLocalServiceWrapper { public MyCalendarLocalServiceImpl(CalEventLocalService calEventLocalService) { super(calEventLocalService); // TODO Auto-generated constructor stub } public List getUserData(long userId) throws SystemException{ DynamicQuery query=DynamicQueryFactoryUtil.forClass(CalEvent.class) .add(PropertyFactoryUtil.forName("userId").eq(userId));

ResourceActionsException While adding the value in database in my own portal

百般思念 提交于 2019-12-25 18:36:42
问题 I am having Following error while adding some value to database. My Error trace is as follows ... 10:06:10,730 INFO [RestaurantPortlet:35] Inside addRegistration 10:06:10,731 INFO [RestaurantPortlet:40] {Resto_ID=0, Name=KFC, Location=AHMEDABAD, Room_Count=0, Table_Count=0, userId=10196, companyId=10154, groupId=10180, Reseller_ID=0} com.liferay.portal.ResourceActionsException: There are no actions associated with the resource com.test.model.Restaurant at com.liferay.portal.service.impl

Liferay's RSS portlet

ε祈祈猫儿з 提交于 2019-12-25 12:37:06
问题 My project requires Liferay's RSS portlet to read feeds from Liferay CMS. Could someone please guide me how to achieve this? I am using Liferay 6.0.6. I scanned the internet but could not find relevant material. Thanks in advance. 回答1: Go to Control Panel. Click on Web Content from the left. Click on Feed tab. Here you can create your feed. To quickly get started, just give a name and in the target friendly url textbox give the value of a liferay page in the same community. For example if you

How can I assign a role to a user in Liferay

时光怂恿深爱的人放手 提交于 2019-12-25 12:27:05
问题 Is there any API method to find the roleId using role name? I am getting the role name(s) form an excel sheet, I need to check, whether the role name exists or not. If role exist how can I assign that role to user? If role doesn't exist, how can I create the role first and then assign that role to user? My code, if(role != null && !role.isEmpty()){ Role currentRole=RoleLocalServiceUtil.getRole(companyId,role.trim()); if(currentRole != null) { roleId = currentRole.getRoleId(); } else{ Role