Creato da
Share My Page
My Social Accounts
Account FaceBook Account LinkedIn Account Twitter Account Google Plus Account Git Hub

Some Liferay Hacks

Liferay liferay-ui:search-container with iteratorURL and jsp:useBean fire pagination problem

If you have this pagination problem with: liferay-ui:search-container jsp:useBean You must edit a little your code with this instructions: <% YourEntity something = ( YourEntity  ) request.getAttribute(" something "); if( something  == null){ String  somethingId  = (String)request.getParameter(" somethingId "); something  =  YourEntity LocalServiceUtil.getYourEntityItem(new Long(...

Liferay - Java compiler issue about Createprocess error=206; the filename or extension is too long

If you have this issue in Liferay Eclipse IDE you should set false java fork property in theese files: [LIFERAY_SDK]/portlet/build-common-portlet.xml [LIFERAY_SDK]/themes/build-common-theme.xml And that's it.  

Portlet RenderURL issue, Portlet RenderURL href to NULL? You should set this properties in your<your domain host> redirect.url.ips.allowed=,<your server local ip> or ...

How to use checkbox in Liferay/Java

In J SP: <input name="checkedItems" id=" checkedItems " type="hidden" value="" /> <% for (MyClass item: lista) { %> <input name="serviziUtente" class="chkItems" type="checkbox" size="45" value="<%=item.getCode()%>" /><%=item.getDescrizione() %><br> <%} %>   In JavScript/jQuery part:    $(". chkItems ").change(function() {    ...

How to increment Private Key about Custom Entity in Liferay

You can use: long pk = CounterLocalServiceUtil .increment( YourEntity .class.getName()); or long pk =  counterLocalService .increment( YourEntity .class.getName());

Issue TYPE and TYPE_ in Liferay

In Liferay type is created as TYPE_ field in the database. The entity, however, treats him as a "TYPE". So the Finder treats him as "TYPE" and this generates a SQLGrammarException if you define a "TYPE" field. In a nutshell, you need to use in your custom table TYPE_ and map it as a "TYPE" or to avoid all these problems, use "TIPO" ;);)

How to manage Shibboleth SSO with Liferay AutoLogin

How to disbale Password Request in First Login and Password Reminder in Liferay

You have to set in : passwords.default.policy.change.required=false users.reminder.queries.enabled=false users.reminder.queries.custom.question.enabled=false By Code: user.setPasswordReset(false); UserLocalServiceUtil.updateUser(user); Maybe you can use this code in a custom listener class that override default PreLogin/PostLogin class through a Hook.

How to share ad-hoc Java classes through different Liferay plugins

We know that Liferay, through the build-service JDK lets you create a jar of exportable classes only part of the service (service.xml). Instead, for other share classes, for example the famous with which leans inside portlets and jsp of the same plugin?    Very simple, what you should do is to collect all the custom classes in the same package and then generate a jar file using Eclipse (with only. Classes) of that package. Then you have to import it...

How to use Liferay Multiple Virtual Host in one portal Application Server?

Prior to version 6 of Liferay, you had to follow the "Virtual Host" on this link:   Since version 6, the procedure is greatly simplified:  1)  Create a Virtual Host:  Control Panel -> Server -> Portal Instances -> add, enter all the data  2)  Select Sites under the main portal  and...

Add Event types for Liferay Calendar/Agenda portlet

In the add this lines:   # Set the list of event types.    calendar.event.types=anniversary,appointment, bill-payment,birthday,breakfast,call,chat,class, club-event,concert,dinner,event,graduation, happy-hour,holiday,interview,lunch,meeting,movie, net-event,other,party,performance,press-release,reunion, sports-event,training,travel,tv-show,vacation,wedding #The display text of each of the event types...

Search container with pagination problem

<% PortletURL currentIteratorURL = renderResponse.createRenderURL(); currentIteratorURL.setParameter("jspPage", "/folder/myListEntries.jsp"); %> <liferay-ui:search-container emptyResultsMessage="mylistentries-empty" delta="10" iteratorURL="<%=currentIteratorURL %>" >   With this code you can resolve problems about pagination when you use other JSP (different from the default JSP portlet) with search-conatiner.