liferay

Liferay velocity template showing only first image for repeatable image field

纵饮孤独 提交于 2020-01-17 04:59:26
问题 I have created structures and template for adding the events. The input I have taken is: year with month, image for the event, description for the event. All the data is displaying properly except image. The image which I have given first is displaying for each event. Can any one help me? <root available-locales="en_US" default-locale="en_US"> <dynamic-element dataType="html" fieldNamespace="ddm" indexType="keyword" name="about_fe" readOnly="false" repeatable="false" required="false"

Different jsp rendering in Liferay

拥有回忆 提交于 2020-01-17 03:46:26
问题 I need to make following construction: String pageName = request.getParameter("pageName"); if ("some_parameter".equals("pageName")) { include("html/one.jsp", request, response); } if ("third_parameter".equals("pageName")) { include("html/two.jsp", request, response); } But I always have troubles like NullPointerException. I mean I try to make different renderURL show different jsps but I don't know how. If you don't undestand what Im about but have knowledge in this theme please write smth in

Scheduled Tasks in Liferay with Autowired

佐手、 提交于 2020-01-17 01:41:56
问题 im trying to create scheduled task in liferay portlet. Liferay: 6.2 Spring: 3.1.4.RELEASE With <scheduler-entry> <scheduler-description>test-scheduler</scheduler-description> <scheduler-event-listener-class> project.ScheduledProcesser </scheduler-event-listener-class> <trigger> <simple> <simple-trigger-value> 1 </simple-trigger-value> <time-unit>minute</time-unit> </simple> </trigger> </scheduler-entry> and the corrensponding class @Component public class ScheduledProcesser implements

Liferay 7 JSF actions not triggered

╄→尐↘猪︶ㄣ 提交于 2020-01-16 06:32:06
问题 I have a liferay portlet application written in JSF 2 Richfaces deployed under weblogic. Pages are rendered fine, and it seems that EL resolver does it's job well. However as soon as I initiate any kind of submit the page simply reloads and nothing happens. I've found several solutions on the Internet, most of them came down to this solution: Why isn't Liferay Faces processing JSF portlet action events? I've also found these liferay-porlet.xml settings in Liferay's official JSF richfaces

How to assign site roles for user group programatically in liferay

折月煮酒 提交于 2020-01-16 00:35:06
问题 I am able to assign the site roles for user programatically by following API call, UserGroupRoleLocalServiceUtil.addUserGroupRoles(userIds, mySite, SiteroleIds); In the similar fashion can any one tell me that how can I assign the site roles for UserGroup programatically? I have both usergroupID and SiteRoleId in my method so what API method should I need to call to assign the site roles for the user group? 回答1: You can use addUserGroupGroupRoles(long userGroupId, long groupId, long[] roleIds

Custom Authentication Web Service

微笑、不失礼 提交于 2020-01-15 04:26:31
问题 I want to use authentication web services that is exposed by my legacy client. But I cannot copy those user information in to liferay database. Can any one help me to write a custom authentication service OR a hook/plugin to reuse my own implementation for authentication? 回答1: I want to use authentication web services that is exposed by my legacy client. You need to implement Liferay's com.liferay.portal.security.auth.Authenticator class to use your own custom authenticator that would call

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

Liferay - Creating PDF and outputing to stream

我怕爱的太早我们不能终老 提交于 2020-01-14 04:12:19
问题 Having a little trouble here. Basic premise is that I need to hit a button, generate HTML, create PDF, and throw into output-stream for download: <ice:commandButton title="Download" image="/images/dl.png" value="Download" action="#{bean.downloadPDF}"> </ice:commandButton> public void downloadPDF() throws IOException { PD4ML pdf = new PD4ML(); pdf.setPageSize(PD4Constants.LETTER); pdf.setPageInsets(new Insets(0, 0, 0, 0)); pdf.setHtmlWidth(1000); pdf.enableImgSplit(false); pdf.generateOutlines

Liferay 7 Freemarker Template. staticUtil has evaluated to NULL or missing - Tried to get JournalArticle's Categories

孤者浪人 提交于 2020-01-13 19:29:28
问题 Hi fellow Liferay'ers, I'm trying to get the categories of a journalArticle with a Freemarker template. I tried this code: <#assign journalArticleId = .vars['reserved-article-id'].data> <#assign journalArticleResourceLocalServiceUtil = staticUtil["com.liferay.portlet.journal.service.JournalArticleResourceLocalServiceUtil"]> <#assign assetCategoryLocalServiceUtil = staticUtil["com.liferay.portlet.asset.service.AssetCategoryLocalServiceUtil"]> <#assign articleResourcePK =

Deploy .war file on a server (Liferay+Tomcat Bundle)

一个人想着一个人 提交于 2020-01-13 13:51:09
问题 I have my new Liferay site ready and trying to test it in a real environment. I just got Tomcat-Liferay bundle installed on my server successfully and copied the .war file into the deploy directory next to tomcat according to instructions from some forums and comments; but after going to the URL, I still see the default Liferay page and my page doesn't get diplayed. What an I doing wrong here? Thanks in advance! 回答1: Deploying a theme or portlet plugin doesnt change the way the portal looks