liferay

How do I get Sites of which the user is a member in Liferay theme?

邮差的信 提交于 2019-12-12 09:16:18
问题 In Liferay 6.1 custom theme - How can I get Sites for a user that it is a member of in a theme? I have seen how the dockbar Go to/My sites gets generated via the Liferay UI taglib. However, I want to get a list of user's sites and list them as part of super navigation bar separate from the dockbar options. Is this possible and what is the API call to get the user's sites in a list? Thanks in advance. 回答1: From the user object you can retrieve the groups he belongs to: $user.mySites This

Develop a common jar library for different liferay portlets

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-12 07:35:52
问题 I need some utility classes that will be common for three different Liferay portlets so I will develop them in one project that should be shared for my portlets. I am using Eclipse with Liferay IDE plugin and my question is what kind of project is that one that I need? I mean is it a simple Java project or any kind of Liferay project? 回答1: There are ways you can do this: Create a simple Java project. Package it as a JAR file. Put the JAR file in global class-path In case of tomcat the global

Mocking static Liferay method

柔情痞子 提交于 2019-12-12 04:56:51
问题 I'm trying to mock the PortalUtil.getPortal() method like so PowerMock.mockStatic(PortalUtil.class); Portal mockPortal = Mockito.mock(Portal.class); Mockito.when(PortalUtil.getPortal()).thenReturn(mockPortal); I'm getting the below error org.mockito.exceptions.misusing.MissingMethodInvocationException: when() requires an argument which has to be 'a method call on a mock'. For example: when(mock.getArticles()).thenReturn(articles); Also, this error might show up because: 1. you stub either of:

While merging code I got some conflict error in bitbucket

只愿长相守 提交于 2019-12-12 04:46:13
问题 While merging code in GIT (Bitbucket), I got an issue src/main/webapp/css/main.css (conflicts) the code is fine in Eclipse but in Bitbucket view its showing 2 more lines added in code having some text. like <<<<<<< destination:f27cd37fb7008c0d18f63514ca44ceacbaa3c658 and >>>>>>> source:95de515e0203585db3c4f1084e37ade6dcc08ed2 回答1: Take a backup of your changes Override and update (or Revert) your local file with the latest on Git Apply your changes again Try to commit and push 来源: https:/

Not able to update database due to pre-marked attendance(values) Liferay

≡放荡痞女 提交于 2019-12-12 04:38:45
问题 I have the following functions to mark attendance of an employee: public void updateDailyAttendance(ActionRequest areq, ActionResponse aRes) throws Exception { int totalEmployees = EmployeeLocalServiceUtil.getEmployeesCount(); List<Employee> employeeAttendanceDetails = MISPortalActionUtil.getEmployeeData(); String datt = areq.getParameter("datt"); String Imatt = areq.getParameter("matt"); String yatt = areq.getParameter("yatt"); int Lmatt = Integer.parseInt(Imatt); String matt = Integer

Liferay Dynamic Data Lists: How to get image URL?

时光毁灭记忆、已成空白 提交于 2019-12-12 04:37:38
问题 I am creating a custom template in velocity for a Dynamic Data Lists and I want to get the image URL for the selected image. How can I get it? The code is: #set ( $DDLRecordService = $serviceLocator.findService("com.liferay.portlet.dynamicdatalists.service.DDLRecordLocalService") ) #set ( $records = $DDLRecordService.getRecords($mathTool.toNumber($reserved_record_set_id)) ) #foreach ($record in $records) #set( $fields = $record.getFields() ) #set( $URL = $fields.get("URL").getValue() ) #set(

Liferay 7.0 - making all Portlets Borderless by default via theme

早过忘川 提交于 2019-12-12 04:34:26
问题 After searching for a solution to the problem of setting portlets default look and feel through the theme, I have tried the following in WEB-INF/liferay-look-and-feel.xml : <setting configurable="true" key="portlet-setup-show-borders-default" type="checkbox" value="false" /> However, it does not seem to work on Liferay 7.0 GA3, and have run out of places to look for a solution. My requirements are for a default portlet behavious where all decaration is disabled, i.e. borders and title and

Liferay Service Builder failing

家住魔仙堡 提交于 2019-12-12 04:27:35
问题 I'm doing some tests on Liferay. For this, I'm following the MVC tutorial, and got stuck in the services stuff. I created a simple entity for testing purposes, "Miclase": public class Miclase { int id; int num1; String string1; } Pretty simple, huh. Well, after this, I started the service builder and created a file like this, with the Overview pane: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE service-builder PUBLIC "-//Liferay//DTD Service Builder 6.2.0//EN" "http://www.liferay.com/dtd

Liferay BroadLeaf Integraion

牧云@^-^@ 提交于 2019-12-12 04:24:58
问题 Can some one tell me how to import broadleaf-commerce portlet in liferay / integration of broadleaf with liferay . I have a sample of broadleaf portlet as i see the folder structure it looks like maven project. I am importing the project as maven project. Is this approach correct..I am newbie to liferay and starting to learn. Project Structure After importing Error Log After Importing the project Keystore file 'E:\Software Backups\Coding Zone\liferayworkspace\DemoSite-Portlet-develop\admin

how to add css to change liferay basic view?

一笑奈何 提交于 2019-12-12 04:22:21
问题 I want to use some custom ui in my liferay site .How can i make it possible Like if i want to change this portion of liferay? I have made one css file for this but its just overlay this followingsection. so any way to edit this section of liferay with css? 回答1: The right way to do this is to create a theme which will have a template directory setup that will merge specific css to the ones which the system is based on. http://www.liferay.com/documentation/liferay-portal/6.0/development/-/ai