liferay

Liferay Cluster [closed]

…衆ロ難τιáo~ 提交于 2019-12-05 05:26:55
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . Do you know any step by step tutorial about installing Liferay cluster in Glassfish ? 回答1: Google found me this writeup called how-to-install-and-configure-a-liferay-cluster Enjoy! 回答2: I am working on the same problem, or very similar one -- deploying the Liferay WAR file to a glassfish cluster with two nodes.

Liferay DLFileEntryLocalServiceUtil.addFileEntry does not create AssetEntry record

戏子无情 提交于 2019-12-05 05:23:09
问题 I have a custom portlet which provides a form where the user can upload files. The uploaded file should be stored in the Documents and Media Portlet. I am creating the file entry using DLFileEntryLocalServiceUtil.addFileEntry . The file is succesfully uploaded and the record in DLFileEntry table is created, but in the AssetEntry table no new record is created. I suppose Liferay should create it automatically, am I wrong? Where could be the error? This is my code: DLFileEntry dlFileEntry =

Create object in velocity template

我的未来我决定 提交于 2019-12-05 03:38:24
I am writing velocity templates for my liferay theme and I am wondering, whether it is possible to create a new object inside the velocity template. The reason is that in liferay there is no contextTool registered in the context and I really want to be able to inspect the variables that are present in the template at a given time. There is a cool macro for this, but unfortunately it uses the contexttool. I'd like to do something like: #set($contextTool = new ContextTool()) Another solution would be java code that is provided with the liferay theme that is able to add stuff in the template

Including jQuery and other JS files in Liferay Theme

随声附和 提交于 2019-12-05 02:36:16
I use Liferay 6.1 and I created my theme ( sample-theme ) and I want add jQuery . How can I do that? Why I have folders: sample-theme and liferay-work and both have folders: css, js, templates? I created folder _diffs and subfolder js and there copy jQuery and add in portal_normal.vm : <script src="/html/js/jquery/jquery-1.8.2.min.js"></script> And I don't see any changes, Why? How can I add jQuery? Not only to a single portlet but for all. I don't have folder docroot I am use Maven and in src/main/webapp I created folder _diffs and inside folder js , there I add jquery.js and in _diffs

Portlet: Forward a ResourceRequest to show the full portal

痞子三分冷 提交于 2019-12-05 02:24:41
问题 my intention is to process a ResourceRequest that serves a resource (A dinamically generated PDF). If something goes wrong generating this file, the whole portal with a failure message in the portlet should be rendered. Is it possible to forward a ResourceRequest to a request that renders the complete portal? I am also considering a redirect, but I will like to be able to pass some attributes/parameters along. I hope I explained my problem clear enough. Thank you. Related/Duplicate: How to

Liferay logging level

橙三吉。 提交于 2019-12-04 23:43:20
问题 Is there a way to set Liferay's global logging level? I am aware of it's console in the Server Administration but I want to set a global level not to a package level. Thanks! 回答1: Because of the way log4j can be configured, any global setting can be overridden by a package level setting. You can remove any configuration individual packages (if you have any). Then the setting for the rootLogger will take effect. log4j.rootLogger=INFO, stdout Update To override Liferay's default logging

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

SASS and Liferay - how to use in custom themes?

青春壹個敷衍的年華 提交于 2019-12-04 23:37:22
问题 I don't really find an answer on liferay's blogs and google - so i hope anyone here can help me. I'm trying to get started with sass in a custom theme i am building in liferay 6.2. As i understand it, the approach would be this: create an empty theme, (using maven,) based off _styled this gives me a file layout like this: <theme> +-src +-main +-webapp +-css +- ... here i'll put any css overwrites develop sass stylesheets, link to main.css <theme> +-src +-main +-webapp +-css +-main.css +

Understanding the execution of Action Phase and Render Phase

点点圈 提交于 2019-12-04 21:14:37
I am using Liferay 6 for the Portal Development . By going through Liferay Developer Guide the author explains that there are Two phases of Portlet Execution Action Phase Render Phase public class DateTimePortlet extends GenericPortlet { public void doView(RenderRequest req, RenderResponse res) throws IOException, PortletException { Object actionAttribute = req.getAttribute("datetime"); res.getWriter().println("Date Time:" + (actionAttribute != null ? actionAttribute :"Unavailable")); res.getWriter().println("<BR/>"); PortletURL u = res.createActionURL(); res.getWriter().println("<A href=" + u

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