liferay

How to disable default message: “Your request processed successfully”?

天涯浪子 提交于 2019-12-03 13:57:32
How would I disable this default message: "Your request processed successfully" for my plugin portlet when an add/update action is performed in my portlet? Also I would want to disable this for my custom configuration page ( configuration.jsp ), this is the configuration page which is shown when we click on the wrench icon which appears on the top-right corner of every portlet. Is there a configuration option anywhere which I can set or some code which I can write to disable it? Or else would it be possible to change the message from my custom portlet and ConfigurationActionImpl ? This message

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

匿名 (未验证) 提交于 2019-12-03 10:09:14
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: 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 = journalArticleResourceLocalServiceUtil.getArticleResourcePrimKey(groupId

Removing Custom Permissions/Actions from a Portlet

て烟熏妆下的殇ゞ 提交于 2019-12-03 08:44:31
I have been able to define custom portlet actions/permissions based on this example in Liferay Plugins SDK https://github.com/liferay/liferay-plugins/tree/master/portlets/sample-permissions-portlet I want to know the necessary steps I need to take to remove the custom portlet actions/permissions (not model permissions) from a portlet. I remember observing that when I re-deploy a portlet with modified custom actions/permissions, the old custom actions/permissions stick around. I tried deleting the portlet folder from Tomcat's webapps and it was successfully unregistered. But after I deploy the

Develop a common jar library for different liferay portlets

我的梦境 提交于 2019-12-03 07:05:33
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? 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 class-path would be ../tomcat-7.0.27/lib/ext/ . Create a simple Java project. Package it as a JAR file. Put

Liferay custom-sql using IN operator

匿名 (未验证) 提交于 2019-12-03 02:52:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am using Liferay 6.1, Tomcat and MySQL. I have a custom-sql sentence for a list portlet. The custom-sql uses two parameters: an array of groupIds and a result limit. SELECT count(articleId) as count, ... FROM comments WHERE groupId IN (?) GROUP BY articleId ORDER BY count DESC LIMIT 0, ? My FinderImpl class has this method: public List<Comment> findByMostCommented(String groupIds, long maxItems) { Session session = null; session = openSession(); String sql = CustomSQLUtil.get(FIND_MOST_COMMENTS); SQLQuery query = session.createSQLQuery(sql

What is latest proven-that-works combination of Liferay and Wicket?

匿名 (未验证) 提交于 2019-12-03 01:45:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I just tried Wicket 1.5.6 and Liferay 6.1.0 combination and that is not working out of the box, at least not for me. https://cwiki.apache.org/WICKET/wicket-examples-as-portlets.html says that examples.war should work without any problem, but for me it tells after deploy that 11 : 53 : 17 , 096 ERROR [ render_portlet_jsp : 154 ] java . lang . IllegalStateException : filter path was not configured at org . apache . wicket . protocol . http . WicketFilter . processRequest ( WicketFilter . java : 164 ) at org . apache . wicket .

Language.properties file in Liferay

匿名 (未验证) 提交于 2019-12-03 01:45:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I want to support multiple languages for my portlet application. So I: Created content package in src folder. Created Language.properties file with string Book-Name=Book Name Paste this line <supported-locale>es</supported-locale> <resource-bundle>content/Language</resource-bundle> in portlet.xml file. So could you please tell me why I still have Book-Name here?! <liferay-ui:search-container> <liferay-ui:search-container-results results="${bookListArray}" /> <liferay-ui:search-container-row className="com.softwerke.model.Book" modelVar=

Why am I getting NullPointerException in liferay?

怎甘沉沦 提交于 2019-12-02 22:39:12
问题 I am getting a NullPointerException on the following line: originalStrutsPortletAction.processAction( originalStrutsPortletAction, portletConfig, actionRequest, actionResponse); I am printing all the values: System.out.println(originalStrutsPortletAction); System.out.println(portletConfig); System.out.println(actionRequest); System.out.println(actionResponse); Output: com.liferay.portal.struts.StrutsPortletActionAdapter@2f20c4be com.liferay.portlet.PortletConfigImpl@5f4268dd com.liferay

How can I call the action method inside the MVCPortlet class onclick of the Submit button

走远了吗. 提交于 2019-12-02 21:07:35
问题 I am using Liferay 6 for development. I have added JQuery support to Liferay this way inside the file liferay-portlet.xml file <header-portlet-javascript>https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js</header-portlet-javascript> <header-portlet-javascript>https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.15/jquery-ui.min.js</header-portlet-javascript> Now I have a form with Username and password as shown below: <form> <div> <input class="default-value" type="text" name=

Color and other footer's parameters in Liferay

狂风中的少年 提交于 2019-12-02 19:31:11
问题 I need to create footer which will be just like small orange bar, and I need to make it responsive, I mean when I resized my window everything should be ok. How can I do that? <footer id="footer" role="contentinfo"> <p class="powered-by"> #language ("powered-by German") </p> </footer> This is my <footer> tag in portal_normal.vm 回答1: To make your footer responsive, you can use Liferay supported Twitter Bootstrap classes, aided by your own custom styles controlled through media queries in