liferay

Get portlet/page containing web content in Liferay

荒凉一梦 提交于 2019-12-24 08:59:56
问题 I'm trying to make the Liferay (6.0.6) Asset Publisher publish all changes across multiple communities on the portal homepage. By clicking on a link the user is supposed to be redirected to another community and see the new web content. The problem is that the default behaviour of asset publisher (even with the hook to gather info from all communities) tries to get the url by searching the group of the current page (in which the content is not). I decided to change the jsp showing the page to

How to navigate from portlet to portlet

自闭症网瘾萝莉.ら 提交于 2019-12-24 08:13:56
问题 My question is how can I go from one portlet to another. My scenario is this: The user can view a specific portlet's view.jsp. When he clicks on a button then the page will show the view.jsp of another portlet. Maybe this is called portlet redirection, but I have no idea how to implement this. Maybe one solution could be different jsp files in the same portlet but I want to navigate through portlets not the jsps. It would be useful if someone could provide me a sample of code or a reference

How to remove borders of a portlet added using <liferay:runtime … /> tag

一个人想着一个人 提交于 2019-12-24 07:28:36
问题 I'm trying to add a custom portlet in a JSP using tag, here is the code: <liferay-portlet:runtime portletName="customSocialNotifications_WAR" /> That works fine! But the portlet is showing the borders, and I need to hide them. I tried to overwrite CSS, but then he removes all the borders of the portal :( Some idea? Thanks! PD: I'm using Liferay 6.2 EE ;) 回答1: You can use a attribute available in same tag as defaultPreferences <% StringBundler sb = new StringBundler(); sb.append("<portlet

How to call stored procedure in liferay?

佐手、 提交于 2019-12-24 05:46:22
问题 I am referring Using dynamic query in Liferay and using MySQL 5.5 but instead of custom queries involving multiple entities,we need to call a stored procedure. We have created a sample procedure delimiter // Create Procedure proc_check (OUT count INT) begin select count(*) into count from lg_office ; end// In default.xml,containing custom queries,we have used <sql id="de.uhh.l2g.plugins.service.persistence.ProducerFinder.findOfficeCount"> <![CDATA[ Call proc_check(@output) ]]> </sql> In the

How to get RoleId using Role Name in liferay?

安稳与你 提交于 2019-12-24 04:09:06
问题 Is there any method where I can get the RoleId using Role Name? I have created some custom roles on my portal, like "Project Manager", "Client" and "Delivery Head". Now I need to get the respective role of these custom roles programmatically using Role Name. Any suggestions? 回答1: You can use RoleLocalServiceUtil.getRole(companyId, name) method to get the role object (instance of RoleModel ). If you need the id, call role.getRoleId() . Company id can be obtained by calling ThemeDisplay

How to develop Liferay project in Eclipsce juno and built it on on Jboss

廉价感情. 提交于 2019-12-24 03:56:07
问题 I have downloaded the Liferay 6.1 with jboss 7.1.1 Bundle and Liferay IDE(Eclipsce Juno).All I have to do is to develop Liferay Project and running it on Jboss server. I can able to run and open liferay portal in localhost:8080/ I am having issues in developing Liferay portal project.As default server adapter for Liferay in IDE is Tomcat 7.0 and I couldn't able to find Jboss server adapter.I tried by running and deploy it on Tomcat and running the Jboss server by running standalone.bat file.

ajax on aui:select liferay

眉间皱痕 提交于 2019-12-24 03:31:00
问题 I know this is impossible to pass parameter from javascript to scriptlet code in jsp page So I want to use ajax to post my selected value to server and then get it in scriptlet code by request object I use <aui:select label="My Selection" name="ms" id="ms" onchange="<%= updateItem()%>" > <% for(String item : itemList){ %> <aui:option selected="<%= item.equals(selItem) %>" value="<%=item%>"><%=item%></aui:option> <%}%> </aui:select> <%! private Object updateItem() throws Exception{ //to do

Repair wrong translation

杀马特。学长 韩版系。学妹 提交于 2019-12-24 03:27:57
问题 There are a lot of places in liferay portal where translation to my language (sk_SK) is wrong. Is it possible to rewrite those bad translations with hook? (Any other idea is welcomed...) Thanks a lot. 回答1: yes you can do it. in your liferay-hook.xml file add entry for language file which you want to override, like in your case Language_sk.properties <hook> <language-properties>content/Language_sk.properties</language-properties> </hook> you can check this file in Liferay source code from

Liferay: No suitable driver found

拟墨画扇 提交于 2019-12-24 03:09:56
问题 For my current task I have to deploy our application in a liferay portal. The deployment itself was successful, but when the application is at start up a "No suitable driver" exception is thrown. Environment: Oracle 10g Express Hibernate 4 Final Liferay 6 with Tomcat 7 OJDBC 6 c3p0 0.9 Build with maven An older .war file of our app runs without any exceptions. However, there are some small differences in the environment. Old environment: Oracle 10g Express Hibernate 3 Final Liferay 6 with

Bypassing grails view resolvers?

天大地大妈咪最大 提交于 2019-12-24 03:04:15
问题 I'm trying to build a portlet within a grails application, and I've created a simple controller extending AbstractController which returns new ModelAndView('myportlet') from handleRequestInternal . I also have a standard Jstl view resolver setup for /WEB-INF/jsp but no matter what I try, when I try to view the portlet within liferay I get the following stacktrace: 13:19:39,723 ERROR [DispatcherPortlet:559] Could not complete request java.lang.ClassCastException: org.springframework.web