liferay-7

Liferay date-input displays wrong date

断了今生、忘了曾经 提交于 2019-12-10 11:41:24
问题 I'm using Liferay 7.1 I have the following liferau-ui:input-date object and I want to pre-select a date: <% final LocalDate today = LocalDate.now(ZoneId.systemDefault()); %> <liferay-ui:input-date dayValue="<%= today.getDayOfMonth()%>" monthValue="<%=today.getMonth().getValue()%>" yearValue="<%= today.getYear()%>" </liferay-ui:input-date> When I output today 's values directly on the JSP I get the correct date for today: 3 12 2018 . When the element is rendered, it has selected the wrong date

How to support file upload in web-form Liferay 7?

拜拜、爱过 提交于 2019-12-07 02:35:37
问题 I need a simple extension for Liferay web form to enahance file attachment to data flled in a liferay 7 web form. Also need to sent this file as an attachment with the email to the registered user. I know how to achieve this functionality in liferay 6.2 but not about liferay 7. I am using liferay 7 GA-5 CE. Any help appreciated. 回答1: You need to create a custom form field type plugin, please find liferay wiki here Creating Form Field Type. and follow below steps, Change input type to file in

Liferay date-input displays wrong date

与世无争的帅哥 提交于 2019-12-06 15:32:34
I'm using Liferay 7.1 I have the following liferau-ui:input-date object and I want to pre-select a date: <% final LocalDate today = LocalDate.now(ZoneId.systemDefault()); %> <liferay-ui:input-date dayValue="<%= today.getDayOfMonth()%>" monthValue="<%=today.getMonth().getValue()%>" yearValue="<%= today.getYear()%>" </liferay-ui:input-date> When I output today 's values directly on the JSP I get the correct date for today: 3 12 2018 . When the element is rendered, it has selected the wrong date: 01/03/2019 . There is nothing further documented in the taglibdocs that I think could help. How can I

Liferay 7 not able to set the global session attribute

大城市里の小女人 提交于 2019-12-06 12:00:35
问题 I am trying to set the Session attribute [HTTP or Portlet Session] so that i can access it globally (through out the portal). But while getting the Session attribute its returning me the null instead of actual value. SETTING the Session Attribute: @Component( immediate = true, property = { "com.liferay.portlet.display-category=IPC Sender", "com.liferay.portlet.instanceable=true", "javax.portlet.display-name=IPC_Sender Portlet", "javax.portlet.init-param.template-path=/", "javax.portlet.init

How to support file upload in web-form Liferay 7?

 ̄綄美尐妖づ 提交于 2019-12-05 06:27:36
I need a simple extension for Liferay web form to enahance file attachment to data flled in a liferay 7 web form. Also need to sent this file as an attachment with the email to the registered user. I know how to achieve this functionality in liferay 6.2 but not about liferay 7. I am using liferay 7 GA-5 CE. Any help appreciated. You need to create a custom form field type plugin, please find liferay wiki here Creating Form Field Type . and follow below steps, Change input type to file in soy file path is src/main/resources/META-INF/resources/your-plugin-type-name.soy Create a fragment of

How can I disable SennaJS/SPA in Liferay 7?

微笑、不失礼 提交于 2019-12-04 23:41:33
问题 Liferay 7 uses SennaJS as its Single Page Application engine in order to load and replace certain parts of the portal page during form submission and navigation. Occasionally this feature interferes with my use case, so how can I disable it? 回答1: If you want to disable the XHR GET navigation performed by SennaJS or its handling of form submissions, you can try one of the following: If you want to disable SPA for only certain forms or links, you can add the data-senna-off="true" attribute to

How to create a Liferay 7 structure programmatically?

浪子不回头ぞ 提交于 2019-12-04 20:43:44
In Liferay 7, how to create a structure from a Java module? Here is my attempt: Map<Locale, String> nameMap = new HashMap<Locale, String>(); nameMap.put(Locale.JAPAN, "The name"); Map<Locale, String> descriptionMap = new HashMap<Locale, String>(); descriptionMap.put(Locale.JAPAN, "The description"); DDMForm ddmForm = DDMUtil.getDDMForm("<here goes my real JSON form>"); DDMFormLayout ddmFormLayout = DDMUtil.getDefaultDDMFormLayout(ddmForm); DDMStructureLocalServiceUtil.addStructure( 20156, // userId 33421, // groupId DDMStructureConstants.DEFAULT_PARENT_STRUCTURE_ID, // parentStructureId

How to integrate Liferay DXP with Apache POI?

人盡茶涼 提交于 2019-12-04 20:27:09
I'm trying to integrate Apache POI in Liferay DXP(OSGi) , but unable to resolve dependencies with POI 3.17 version in gradle project. I've created standalone project with below JAR's : poi-3.17.jar poi-ooxml-3.17.jar poi-ooxml-schemas-3.17.jar xmlbeans-2.6.0.jar commons-collections4-4.1.jar Also, I've added below gradle dependencies added in build.gradle compile group: 'org.apache.poi', name: 'poi', version: '3.17' compile group: 'org.apache.poi', name: 'poi-ooxml', version: '3.17' compile group: 'org.apache.poi', name: 'poi-ooxml-schemas', version: '3.17' compile group: 'org.apache.xmlbeans',

Liferay 7 not able to set the global session attribute

天大地大妈咪最大 提交于 2019-12-04 17:46:17
I am trying to set the Session attribute [HTTP or Portlet Session] so that i can access it globally (through out the portal). But while getting the Session attribute its returning me the null instead of actual value. SETTING the Session Attribute: @Component( immediate = true, property = { "com.liferay.portlet.display-category=IPC Sender", "com.liferay.portlet.instanceable=true", "javax.portlet.display-name=IPC_Sender Portlet", "javax.portlet.init-param.template-path=/", "javax.portlet.init-param.view-template=/view.jsp", "com.liferay.portlet.private-session-attributes=false", "javax.portlet

Freemarker does not assign staticUtil

不羁岁月 提交于 2019-12-04 04:13:42
I worked Application Display Templates on liferay 6.2, I use freemarker help pagination the dynamics data list of liferay. When I upgrade to liferay 7, it is a problem. Liferay 7 use code <#assign records = ddlDisplayTemplateHelper.getRecords(reserved_record_set_id)> for get a records. Old code: <#assign DDLRecordLocalService = serviceLocator.findService("com.liferay.portlet.dynamicdatalists.service.DDLRecordLocalService")> <#assign records = DDLRecordLocalService.getRecords(reserved_record_set_id)> <#assign totalRecord = DDLRecordLocalService.getRecordsCount(reserved_record_set_id, 0) > It