liferay

Liferay: changing locales for a site programmatically

杀马特。学长 韩版系。学妹 提交于 2019-12-12 04:18:03
问题 Is there a way to change the status of site´s locales programatically? I have to make a script that implies changing locales for some sites of our portal. In other words, having an object Group, I´d like to change the locales in its settings. http://i.stack.imgur.com/Xypas.png Note we are using Liferay Portal 6.2. Thanks in advance. EDIT for clarifying: I´m executing the script through Control Panel -> Server admin -> Script. Here is where I have the problem commented: /

Accessing pagination info from liferay search-container in SpringMVC Controller

≡放荡痞女 提交于 2019-12-12 04:09:53
问题 I am developing a Portlet with Liferay (using liferay-ui in the JSP) and SpringMVC. I have the following code in my JSP: <liferay-ui:search-container delta="5" emptyResultsMessage="no books!"> <% List<Book> bookList = (List<Book>)request.getAttribute("bookList"); List<Book> bookListView = ListUtil.subList(bookList, searchContainer.getStart(), searchContainer.getEnd()); %> <liferay-ui:search-container-results results="<%= bookListView %>" total="${numberOfBooks}"> </liferay-ui:search-container

ClassCastException while implementing Many to many mapping with Liferay Service Builder

与世无争的帅哥 提交于 2019-12-12 04:01:35
问题 I am trying to implement many to many mapping with liferay service builder. I have found one blog on liferay savvy which explains how to implement it and provides a war file as well. You can download from here. It gets deployed successfully and also allows you to create student and courses along with their mapping. After adding some dummy data when I try to fetch courses based on student id with List<Course> studentCourseList = CourseLocalServiceUtil.getStudentCourses(xxxx) where xxxx is

How to call a Liferay calendar portlet from my own portlet

半腔热情 提交于 2019-12-12 03:48:53
问题 I have a requirement that i have to call the liferay calendar portlet from my portlet.Can anybody give me any idea that how it can be achieved? I am doing this to my view.jsp <script src="http://localhost:8080/html/js/liferay/widget.js" type="text/javascript"></script> <script type="text/javascript"> Liferay.Widget({ url: 'http://localhost:8080/widget/web/guest/interview-availibility/-/calendar'}); </script> but it is not working .Please somebody help 回答1: There are two options available for

Liferay 6.2 adding a new ckeditor

安稳与你 提交于 2019-12-12 03:45:48
问题 I want to add a new ckeditor to my liferay because we need to limit the functionality of the one available. However, I do not want to change the original one because we migth later on need it in a different form. How can I add a new ckeditor that can be used to create a structure for webcontent articles? Do I need to create a new Theme for liferay or something like this? Info: Our liferay runs on a Jboss server EDIT: I have created a hook that overrides the html\js\editor\ckeditor\ckconfig

Liferay Web content Display Portlet : Look and Feel - Portlet Configuration

人走茶凉 提交于 2019-12-12 03:43:58
问题 After adding web content display portlet , click on Look and Feel - Portlet Configuration - Show Borders. If i uncheck Show Borders, it display three links as per below screenshot Can anyone tell this three links code contains in which file? I want to remove close link only from all the portlet 回答1: Those portlet options come from below files: portal-web\docroot\html\themes\_unstyled\templates\portlet.vm portlet.vm uses $theme.portletIconOptions() to include different options (configuration,

Adding custom field to User programmatically through liferay.expando

假如想象 提交于 2019-12-12 03:43:11
问题 I am trying to add fields to com.liferay.portal.model.User , an extra attribute using Expando . Can someone explain to me how this method is adding a field because docs don't have much description. private void addUserCustomAttribute(long companyId, ExpandoTable userExpandoTable, String attributeName, int type) throws PortalException, SystemException { ExpandoColumnLocalServiceUtil.getColumn(userExpandoTable.getTableId(), attributeName); //should be addColumn(long tableId, String name, int

Can't get to Liferay's (Spring Portlet MVC's) controller from JS by doing the following:

让人想犯罪 __ 提交于 2019-12-12 03:37:31
问题 Here's the JSP from where my Javascript function is being called: JSP code <div class="modal-footer"> <button type="button" class="btn btn-primary" id="continueTour" onclick="showTutorial()">Take a Quick Tour</button> <a href="javascript:disableTutorial();" id="skipTour" class="textanchor" style="padding-left:30px;">Skip Tour</a> </div> Here's the Javascript function from where I need to render another JSP, and hence need to get to the Render method in the controller. Notice the 'simulate'

Defining resourceUrl of another portlet's controller in current portlet's JSP

送分小仙女□ 提交于 2019-12-12 03:34:29
问题 I have two portlets with some set of controllers defined. We are using Spring MVC. In the View i.e JSP we defining some resourceUrls like <portlet:resourceURL var="ListResourceUrl" id="getList" ></portlet:resourceURL> this refers to the controller which I have defined as @ResourceMapping("getList") @ResponseBody public ModelAndView getList(ResourceRequest request,ResourceResponse response) throws IOException { ......... } Now I want to define another resourceUrl referring to a controller

How to pass values from JSP to Servlet without performing event?

大兔子大兔子 提交于 2019-12-12 03:07:35
问题 I have crated a portlet, Where I am doing my business logic in servlet. But I am getting the liferay login user details in the jsp page. So Now I need to pass the user details while hitting the servlet. This is my JSP code, <% String fullname= user.getFullName(); out.println("Full name is: "+fullname+ "..."); long id = themeDisplay.getLayout().getGroupId(); out.println("Site ID is: "+id+ "..."); long userId = themeDisplay.getUserId(); out.println("User ID is: "+userId+ "..."); %> I need to