This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%@page import="java.util.Locale"%> | |
<%@page import="javax.portlet.WindowState"%> | |
<%@page import="com.liferay.portlet.journal.model.JournalArticle"%> | |
<%@page import="com.liferay.portlet.journal.service.JournalArticleLocalServiceUtil"%> | |
<%@page import="com.liferay.portal.util.PortletKeys"%> | |
<%@ taglib uri="http://liferay.com/tld/portlet" prefix="liferay-portlet" %> | |
<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %> | |
<portlet:defineObjects /> | |
<% | |
JournalArticle article = JournalArticleLocalServiceUtil.getLatestArticle(11609); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %> | |
<%@page import="com.liferay.portal.kernel.util.UnicodeFormatter"%> | |
<%@ taglib uri="http://liferay.com/tld/ui" prefix="liferay-ui" %> | |
<%@ taglib uri="http://liferay.com/tld/aui" prefix="aui" %> | |
<portlet:defineObjects /> | |
<% | |
String defaultText = "This is Default text"; | |
%> | |
<!-- Action URLs --> | |
<portlet:actionURL var="submitContentURL" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%@page import="com.test.Demo"%> | |
<%@page import="com.liferay.portal.model.User"%> | |
<%@page import="java.util.List"%> | |
<%@page import="com.liferay.portal.service.UserLocalServiceUtil"%> | |
<%@ taglib uri = "http://java.sun.com/jsp/jstl/core" prefix = "c" %> | |
<% | |
List<User> userList = UserLocalServiceUtil.getUsers(1, 5); | |
request.setAttribute("userList", userList);// put in request so that we can access this in EL | |
%> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%@page import="com.liferay.portal.model.User"%> | |
<%@page import="java.util.List"%> | |
<%@page import="com.liferay.portal.service.UserLocalServiceUtil"%> | |
<%@ taglib uri = "http://java.sun.com/jsp/jstl/core" prefix = "c" %> | |
<script type="text/javascript" charset="utf8" src="https://code.jquery.com/jquery-3.3.1.js"></script> | |
<script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/1.10.16/js/jquery.dataTables.min.js"></script> | |
<script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/1.10.16/js/dataTables.jqueryui.min.js"></script> | |
<link rel="stylesheet" type="text/css" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css" /> | |
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.16/css/dataTables.jqueryui.min.css" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE DEFINER=`root`@`localhost` PROCEDURE `test`( | |
IN `Param1` INT, | |
IN `Param2` INT, | |
IN `Param3` INT | |
) | |
LANGUAGE SQL | |
NOT DETERMINISTIC | |
READS SQL DATA | |
SQL SECURITY DEFINER | |
COMMENT 'this is for testing' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try { | |
Connection connection = DataAccess.getConnection(); | |
CallableStatement stmt = connection.prepareCall("{call test(?,?,?)}"); | |
stmt.setInt(1, 10158); | |
stmt.setInt(2, 10159); | |
stmt.setInt(3, 10156); | |
boolean isResult = stmt.execute(); | |
if(isResult){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.ArrayList | |
import java.util.Iterator | |
import java.util.List | |
import java.util.ListIterator | |
import com.liferay.portal.service.ResourcePermissionLocalServiceUtil | |
import com.liferay.portal.service.RoleLocalServiceUtil | |
import com.liferay.portal.model.ResourceConstants | |
import com.liferay.portal.model.ResourcePermission | |
import com.liferay.portal.model.Role |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void changeFileEntryToGuest(DLFileEntry file) throws SystemException { | |
final long companyId = Long.parseLong(PropsUtil.get(LifemartMobileAppConstants.LIFEMART_COMPANY_ID)); | |
String dlFileFolderResourceName = DLFolder.class.getName(); | |
String folderId = String.valueOf(file.getFolderId()); | |
String[] actionIds = new String[] { ActionKeys.VIEW }; | |
String dlFileEntryResourceName = DLFileEntry.class.getName(); | |
String fileEntryId = String.valueOf(file.getFileEntryId()); | |
LOG.debug("changeFileEntryToGuest companyId:" + companyId + " folderId: " + folderId + " fileEntryId:" + fileEntryId); | |
try { | |
Role guestRole = RoleLocalServiceUtil.getRole(companyId, RoleConstants.GUEST); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.test; | |
import java.util.List; | |
import javax.portlet.ActionRequest; | |
import javax.portlet.ActionResponse; | |
import com.liferay.portal.kernel.search.BooleanQuery; | |
import com.liferay.portal.kernel.search.BooleanQueryFactoryUtil; | |
import com.liferay.portal.kernel.search.Document; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%@page import="java.util.Locale"%> | |
<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %> | |
<%@ taglib uri="http://liferay.com/tld/aui" prefix="aui" %> | |
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> | |
<portlet:defineObjects /> | |
<portlet:actionURL var="searchURL" name="searchArticle"/> | |
<aui:form action="${searchURL}" method="POST"> | |
<aui:input name="keyword" label="Search Article"/> |
NewerOlder