Recent Bloggers

Zsolt Berki

1 Publications
30 septembre 2015

Martin Yan

18 Publications
30 septembre 2015

Jorge Ferrer

64 Publications
30 septembre 2015

Neha Goyal

7 Publications
29 septembre 2015

Bryan Cheung

32 Publications
28 septembre 2015

James Falkner

110 Publications
28 septembre 2015

Olaf Kock

102 Publications
25 septembre 2015

Neil Griffin

50 Publications
25 septembre 2015

Ruud Kluivers

18 Publications
24 septembre 2015

Kyle Joseph Stiemann

4 Publications
24 septembre 2015

A perspective 3D Liferay desktop picture.

Company Blogs 5 mars 2013 Par Neil Jin Staff

This one was designed by using minecraft screenshot! When I see this, I am always feel this grand brandy! Simple, strong, stable and enough space for imagination. 

Hope you will like it. The full picture size is 1920x1080.

If anyone wants some other size, please leave a comment, I would like to make it.



Making a remote javascript library loaded dynamically by AUI and be an AUI plugin

Company Blogs 27 février 2013 Par Neil Jin Staff

    In the real world project, there are times when a team develops some feature like google map, twitter, facebook that need remote javascript library between several portlets but for the same portal. There are many similiar features that needs to resuse many codes. We want out code to be consistence and easily to be managed and more importantly we don't want to waste time on mutiple people working on the same feature that ultimate increase the cost of a project and once there's a bug or requirement modification(people love to do that), that the whole team need to change their own code, which is really frustrating for the whole team.

    TWO ways we think of to solve this (actually there are more solutions):

    1. Making a shared js and code standard that everybody can read it and copy it to each own code.  This method still can not guarantee a developer that use the right code without updating their js file to the up-to-date.

    2. Making a global portlet as a dependency of the portlets. This portlet will mainly be set layout.static.portlets.all=<portletID>  in and add a <liferay-util:html-top> tag to view.jsp page that loads the remote javascript libiary , and that all pages in the portal loaded the remote javascript library.

BUT, when using code like <script src=";libraries=places" type="text/javascript"></script>, in some network environment like some companies or countries, facebook, google does not work very well, so the whole portal pages became extreamly slow to wait the until loading timeout. In my test sample, The longest time to wait a loading of facebook script on a page that does not use any feature was 11.98s and 1m 24s for loading google map script under a total refreshing page (shift + refresh).

    Why do we have to do this, load a unused script in a page in such a poor network environment? This really ruins the work of our core engineer. Core Engineers took really huge effort on decreasing some ms of loading time, but we just can simply increase seconds of loading time by adding 2 scripts. Fanstastic devil

    We don't have to do this. We can easily get rid of the features at the requirement analysis period.

    Once the features were made sure to use, we would choose a better way to handel this. At least, not let every page to load the script that is not useful.

    So We can still make a global portlet as a dependency, and load the script that we need. BUT, this script is not from the remote site directilly. This will be an aui plugin that handels the connection when we need. So that solves the problem.

For example to load twitter's script, the summary script is like this


AUI().add('aui-twitter', function(A) {
var Lang = A.Lang,
TWITTER = 'twitter',
/*this version only support share button yet*/
'<a href="" class="twitter-share-button">Tweet</a>'
var Twitter = A.Component.create(
prototype: {
initializer: function() {
var instance = this;
_loadScript: function() {
onSuccess: function() {
//alert("load twitter script success");
createTwitterButton: function(options) {
var instance = this;
var button = A.Node.create(TWITTER_BUTTON);
var dataLang = (options.dataLang != null ? options.dataLang : instance.LANG.ENGLISH);
var dataCount = (options.dataCount != null ? options.dataCount : instance.COUNT_ALIGN.HORIZONTAL);
var dataURL = (options.dataURL != null ? options.dataURL : '');
if(options.largeButton) {
button.setAttribute('data-size', 'large');
button.setAttribute('data-lang', dataLang);
button.setAttribute('data-count', dataCount);
button.setAttribute('data-url', dataURL);;
return button;
//can add more features
HORIZONTAL: 'horizontal',
VERTICAL: 'vertical'
ARABIC: 'ar',
DUTCH: 'nl',
ENGLISH: 'en', //can add other languages
A.Twitter = Twitter;
}, '@VERSION@', {skinnable:false, requires:['aui-base', 'get']});
Once the script is loaded, if an aui object is not generated, the script won't be loaded.
In the jsp page can simply add code like:
<div id="<portlet:namespace />twitter-share"></div>
<aui:script use="aui-base, aui-twitter">
AUI().use(''aui-twitter', function(A) {
var tObj = new A.Twitter();
var btnOpt = {
contentBox: "#<portlet:namespace />twitter-share",
dataLang: tObj.LANG.ENGLISH,
largeButton: true


If AUI can have an official plugin to support those famous libraries like google and facebook and etc it would be nicer. :)

A vertial 3D Liferay desktop

Company Blogs 23 décembre 2011 Par Neil Jin Staff

Recently I tried to draw a 3D Liferay Logo with AI at home. Haven't been drawing since graduate. Maybe it just an okey job to draw this, but it can keep me thinking new ideas, create new things.

'Cause through a picture we can imagine a lot of stories. Like in this picture I can think of a boy encounters a girl in Liferay. And draw them out. And use that as my Valentine's Day's desktop. I mean it could be many ways to keep imagination.

Affichage de 3 résultat(s).