<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>Liferay.com</title>
  <link rel="alternate" href="" />
  <subtitle>Liferay.com</subtitle>
  <entry>
    <title>Integrating Alfresco Repository to Liferay Documents and Media Portlet</title>
    <link rel="alternate" href="http://www.liferay.com/c/blogs/find_entry?entryId=24969685" />
    <author>
      <name>Navin Agarwal</name>
    </author>
    <id>http://www.liferay.com/c/blogs/find_entry?entryId=24969685</id>
    <updated>2013-05-22T17:11:06Z</updated>
    <published>2013-05-22T16:35:36Z</published>
    <summary type="html">&lt;p&gt;
	&lt;span style="line-height: 1.5;"&gt;We can integrate Alfresco Repository with Liferay Documents and Media Portlet by using CMIS feature. Liferay 6.1 provides with the very simple configuration management for cmis settings.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
	Let&amp;rsquo;s follow few steps for configuration of CMIS in Document and Media portlet.&lt;/p&gt;
&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;
&lt;div&gt;
	&lt;p&gt;
		&lt;span style="color: rgb(51,51,51);"&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; If you are not using any SSO for both servers, Make sure you create a same user admin/admin in Liferay. Doing this you will have common user in both environment.&lt;/span&gt;&lt;/p&gt;
	&lt;p&gt;
		&lt;span style="line-height: 1.5;"&gt;1. Login with the admin user, go to Control Panel and check your site content setting, which site it is referring, make sure it refers to your desirer site. And Click Documents and Media Portlet.&lt;/span&gt;&lt;/p&gt;
	&lt;p&gt;
		&lt;span style="line-height: 1.5;"&gt;2. Now In Documents and Media Portlet go to add button and click repository, New Repository page will open. Fill the bellow settings.&lt;/span&gt;&lt;/p&gt;
	&lt;p&gt;
		&lt;strong&gt;Name:&lt;/strong&gt; Alfresco Repository&lt;/p&gt;
	&lt;p&gt;
		&lt;strong&gt;Description:&lt;/strong&gt; Alfresco Repository&lt;/p&gt;
	&lt;p&gt;
		&lt;strong&gt;Repository Type:&lt;/strong&gt; CMIS Repository (AtomPub)&lt;/p&gt;
	&lt;p&gt;
		&lt;strong&gt;Repository URL:&lt;/strong&gt; http://localhost:8080/alfresco/service/cmis&lt;/p&gt;
	&lt;p&gt;
		&lt;strong&gt;And Save it&amp;nbsp;&lt;/strong&gt;&lt;/p&gt;
	&lt;p&gt;
		&lt;strong&gt;&lt;img alt="" src="http://www.liferay.com/documents/7188303/24966116/repository.png/e237cd45-badb-4100-8eb1-b1a737c708e8?t=1369240620447" style="width: 600.0px;height: 494.0px;"&gt;&lt;/strong&gt;&lt;/p&gt;
	&lt;p&gt;
		&lt;span style="line-height: 1.5;"&gt;After all done, you will be seeing the &lt;strong&gt;Alfresco Repository (Company Home) &lt;/strong&gt;inside &lt;strong&gt;Documents and Media Portlet&lt;/strong&gt;.&lt;/span&gt;&lt;/p&gt;
	&lt;p&gt;
		&amp;nbsp;&lt;/p&gt;
	&lt;p&gt;
		&lt;span style="line-height: 1.5;"&gt;&lt;a href="http://www.liferay.com/documents/7188303/24966116/Alfresco_repository_Documents_and_Media_Portlet.png/bc698b1e-2023-47a3-a7c7-4bcb17f70518?t=1369240630216"&gt;&lt;img alt="" src="http://www.liferay.com/documents/7188303/24966116/Alfresco_repository_Documents_and_Media_Portlet.png/bc698b1e-2023-47a3-a7c7-4bcb17f70518?t=1369240630216" style="width: 634.0px;height: 559.0px;"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
	&lt;p&gt;
		Now you can place the Documents and Media Portlet any page where you want the users should access.&lt;/p&gt;
	&lt;h4&gt;
		&lt;strong&gt;Other related Blog :&lt;/strong&gt; &lt;a href="http://www.liferay.com/web/navin.agarwal11/blog/-/blogs/integration-with-alfresco-4-x-and-liferay-6-1"&gt;Integration with alfresco 4.x and Liferay 6.1&lt;/a&gt;&lt;/h4&gt;
&lt;/div&gt;</summary>
    <dc:creator>Navin Agarwal</dc:creator>
    <dc:date>2013-05-22T16:35:36Z</dc:date>
  </entry>
  <entry>
    <title>Integration with alfresco 4.x and Liferay 6.1</title>
    <link rel="alternate" href="http://www.liferay.com/c/blogs/find_entry?entryId=24961581" />
    <author>
      <name>Navin Agarwal</name>
    </author>
    <id>http://www.liferay.com/c/blogs/find_entry?entryId=24961581</id>
    <updated>2013-05-22T17:13:34Z</updated>
    <published>2013-05-22T12:52:59Z</published>
    <summary type="html">&lt;p&gt;
	We will be seeing here the proper way of intregrating&lt;strong&gt; Alfresco 4.x &lt;/strong&gt;with &lt;strong&gt;Liferay 6.1&lt;/strong&gt; version. So, here I have given details process, How you can achive the integration.&lt;/p&gt;
&lt;p&gt;
	&lt;span style="line-height: 1.5;"&gt;Let&amp;rsquo;s do some few steps for integrating Alfresco 4.x with Liferay 6.1.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
	As we can have assumption that you might have installed the Alfresco and Liferay Tomcat bundles into separate directories. Let&amp;rsquo;s say as&amp;nbsp;&lt;strong&gt;&amp;lt;ALFRESCO_HOME&amp;gt;&lt;/strong&gt;&amp;nbsp;and&lt;strong&gt;&amp;lt;LIFERAY_HOME&amp;gt;.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;span style="font-size: 14.0px;"&gt;&lt;span style="color: rgb(51,51,51);"&gt;&lt;span style="line-height: 1.5;"&gt;&lt;strong&gt;NOTE&lt;/strong&gt;: If you are not using any SSO for both servers, Make sure you create a same user admin/admin in Liferay. Doing this you will have common user in both environment.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;span style="line-height: 1.5;"&gt;1. You need to have different ports number for Alfresco and Liferay running on to resolve port conflicts, Say Alfresco is running on 8080 and Liferay on 5050. So, you can configure the Liferay port in Tomcat server by editing &lt;/span&gt;&lt;strong style="line-height: 1.5;"&gt;&amp;lt;LIFERAY_HOME&amp;gt;/&amp;lt;tomcat&amp;gt;/conf/server.xml&lt;/strong&gt;&lt;/p&gt;
&lt;div style="margin-left: 0.5in;"&gt;
	&lt;pre&gt;
&lt;span style="color: rgb(105,105,105);"&gt;&lt;span style="font-size: 11.0px;"&gt;&lt;code&gt;...&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
	&lt;pre&gt;
&lt;span style="color: rgb(105,105,105);"&gt;&lt;span style="font-size: 11.0px;"&gt;&lt;code&gt;&amp;lt;Server port=&amp;quot;5005&amp;quot; shutdown=&amp;quot;SHUTDOWN&amp;quot;&amp;gt;
&lt;span style="line-height: 1.5;"&gt;...
&lt;/span&gt;&lt;span style="line-height: 1.5;"&gt;&amp;lt;Connector port=&amp;quot;5050&amp;quot; protocol=&amp;quot;HTTP/1.1&amp;quot;&lt;/span&gt;&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
	&lt;pre&gt;
&lt;span style="color: rgb(105,105,105);"&gt;&lt;span style="font-size: 11.0px;"&gt;&lt;code&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; connectionTimeout=&amp;quot;20000&amp;quot;&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
	&lt;pre&gt;
&lt;span style="color: rgb(105,105,105);"&gt;&lt;span style="font-size: 11.0px;"&gt;&lt;code&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; redirectPort=&amp;quot;5443&amp;quot; URIEncoding=&amp;quot;UTF-8&amp;quot; /&amp;gt;
&lt;span style="line-height: 1.5;"&gt;...&lt;/span&gt;&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
	&lt;pre&gt;
&lt;span style="color: rgb(105,105,105);"&gt;&lt;span style="font-size: 11.0px;"&gt;&lt;code&gt;&amp;lt;Connector port=&amp;quot;5009&amp;quot; protocol=&amp;quot;AJP/1.3&amp;quot; redirectPort=&amp;quot;5443&amp;quot; URIEncoding=&amp;quot;UTF-8&amp;quot; /&amp;gt;&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
	&lt;pre&gt;
&lt;span style="color: rgb(105,105,105);"&gt;&lt;span style="font-size: 11.0px;"&gt;&lt;code&gt;...&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
	&lt;span style="line-height: 1.5;"&gt;2. &amp;nbsp;Now, You need to change the Share Loader by editing&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;strong style="line-height: 1.5;"&gt;LIFERAY_HOME&amp;gt;/&amp;lt;tomcat&amp;gt;/conf/catalina.properties&lt;/strong&gt;&lt;span style="line-height: 1.5;"&gt;&amp;nbsp;and locate the &amp;quot;shared.loader&amp;quot; entry and replace it with this:&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin-left: 120.0px;"&gt;
	&lt;strong style="line-height: 1.5;"&gt;shared.loader&lt;/strong&gt;&lt;span style="line-height: 1.5;"&gt;=${catalina.base}/shared/classes,${catalina.base}/shared/lib/*.jar&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;span style="line-height: 1.5;"&gt;These will load the alfresco custom and extension configuration with respect to the XML and other properties files. And also if you have the custom jar files.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;span style="font-size: 1.166em;line-height: 1.5;"&gt;3. You have to enable the external authenticate services of alfresco, we can do that by editing &lt;strong&gt;&amp;lt;ALFRESCO_HOME&amp;gt;/tomcat/shared/classes/alfresco-global.properties&lt;/strong&gt;&amp;nbsp;and add to file.&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin-left: 0.5in;"&gt;
	Add the following line at the end of the file&lt;/p&gt;
&lt;div style="margin-left: 45.0pt;"&gt;
	&lt;pre&gt;
&lt;span style="color: rgb(105,105,105);"&gt;&lt;code&gt;authentication.chain=alfrescoNtlm1:alfrescoNtlm,external1:external&lt;/code&gt;&lt;/span&gt;&lt;/pre&gt;
	&lt;p&gt;
		&lt;span style="color: rgb(105,105,105);"&gt;&lt;code&gt;external.authentication.proxyUserName=&lt;/code&gt;&lt;/span&gt;&lt;/p&gt;
	&lt;p&gt;
		&lt;span style="color: rgb(51,51,51);"&gt;&lt;strong style="font-size: 1.0em;line-height: 1.5;"&gt;Note:&lt;/strong&gt;&lt;span style="font-size: 1.0em;line-height: 1.5;"&gt; Leave the value of proxyUserName blank&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;
&lt;p&gt;
	4. &amp;nbsp;You can deploy the share.war file in Liferay deploy folder.&lt;/p&gt;
&lt;p&gt;
	Copy&amp;nbsp;&lt;strong&gt;&amp;lt;ALFRESCO_HOME&amp;gt;/tomcat/webapps/share.war&lt;/strong&gt;&amp;nbsp;to&amp;nbsp;&lt;strong&gt;&amp;lt;LIFERAY_HOME&amp;gt;/deploy&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;span style="line-height: 1.5;"&gt;5. &amp;nbsp;As you set the share loader in &lt;strong&gt;catalina.properties&lt;/strong&gt; inside Liferay tomcat. You need to copy the Share Loader from Alfresco to Liferay. Let copy the entire folder&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;strong&gt;&amp;lt;ALFRESCO_HOME&amp;gt;/tomcat/shared &amp;nbsp;&lt;/strong&gt;directory to &amp;nbsp;&lt;strong&gt;&amp;lt;LIFERAY_HOME&amp;gt;/&amp;lt;tomcat&amp;gt;/&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;span style="color: rgb(51,51,51);"&gt;&lt;strong&gt;Note:&lt;/strong&gt; Alfresco requirement is to copy the &lt;em&gt;shared/classes/alfresco/web-extension/ &lt;/em&gt;directory where all the custom xml configuration files are placed, to have a common bridge between Liferay and Alfresco.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
	So, it&amp;rsquo;s convenient task to copy entire folder.&lt;/p&gt;
&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;
&lt;p&gt;
	6. Finally you need to configure SSO, what we called as Bridge.&lt;/p&gt;
&lt;p&gt;
	Create a file &lt;strong&gt;&amp;lt;LIFERAY_HOME&amp;gt;/&amp;lt;tomcat&amp;gt;hared/classes/alfresco/web-extension/share-config-custom.xml&lt;/strong&gt;, and copy the below code to enable remote authenticator. shared/classes/alfresco/web-extension/share-config-custom.xml&lt;/p&gt;
&lt;p&gt;
	&lt;span style="font-size: 10.0px;"&gt;&lt;code&gt;&lt;span style="line-height: 1.5;"&gt;&amp;lt;alfresco-config&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;span style="font-size: 10.0px;"&gt;&lt;code&gt;&lt;span style="line-height: 1.5;"&gt;&amp;lt;!-- Overriding endpoints to reference a remote Alfresco server --&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;span style="font-size: 10.0px;"&gt;&lt;code&gt;&amp;nbsp; &amp;lt;config evaluator=&amp;quot;string-compare&amp;quot; condition=&amp;quot;Remote&amp;quot;&amp;gt;&lt;/code&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;span style="font-size: 10.0px;"&gt;&lt;code&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;remote&amp;gt;&lt;/code&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;span style="font-size: 10.0px;"&gt;&lt;code&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;endpoint&amp;gt;&lt;/code&gt;&lt;span style="line-height: 1.5;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;span style="font-size: 10.0px;"&gt;&lt;span style="line-height: 1.5;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;id&amp;gt;alfresco-noauth&amp;lt;/id&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;span style="font-size: 10.0px;"&gt;&lt;code&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;name&amp;gt;Alfresco - unauthenticated access&amp;lt;/name&amp;gt;&lt;/code&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;span style="font-size: 10.0px;"&gt;&lt;code&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;description&amp;gt;Access to Alfresco Repository WebScripts that do not require authentication&amp;lt;/description&amp;gt;&lt;/code&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;span style="font-size: 10.0px;"&gt;&lt;code&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;connector-id&amp;gt;alfresco&amp;lt;/connector-id&amp;gt;&lt;/code&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;span style="font-size: 10.0px;"&gt;&lt;code&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;endpoint-url&amp;gt;http://localhost:8080/alfresco/s&amp;lt;/endpoint-url&amp;gt;&lt;/code&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;span style="font-size: 10.0px;"&gt;&lt;code&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;identity&amp;gt;none&amp;lt;/identity&amp;gt;&lt;/code&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;span style="font-size: 10.0px;"&gt;&lt;code&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/endpoint&amp;gt;&lt;/code&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;span style="font-size: 10.0px;"&gt;&lt;code&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;/span&gt;&lt;span style="font-size: 10.0px;line-height: 1.5;"&gt;&amp;lt;endpoint&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;span style="font-size: 10.0px;"&gt;&lt;code&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;id&amp;gt;alfresco-feed&amp;lt;/id&amp;gt;&lt;/code&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;span style="font-size: 10.0px;"&gt;&lt;code&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;name&amp;gt;Alfresco Feed&amp;lt;/name&amp;gt;&lt;/code&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;span style="font-size: 10.0px;"&gt;&lt;code&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;description&amp;gt;Alfresco Feed - supports basic HTTP authentication&amp;lt;/description&amp;gt;&lt;/code&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;span style="font-size: 10.0px;"&gt;&lt;code&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;connector-id&amp;gt;http&amp;lt;/connector-id&amp;gt;&lt;/code&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;span style="font-size: 10.0px;"&gt;&lt;code&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;endpoint-url&amp;gt;http://localhost:8080/alfresco/s&amp;lt;/endpoint-url&amp;gt;&lt;/code&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;span style="font-size: 10.0px;"&gt;&lt;code&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;basic-auth&amp;gt;true&amp;lt;/basic-auth&amp;gt;&lt;/code&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;span style="font-size: 10.0px;"&gt;&lt;code&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;identity&amp;gt;user&amp;lt;/identity&amp;gt;&lt;/code&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;span style="font-size: 10.0px;"&gt;&lt;code&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/endpoint&amp;gt;&lt;/code&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;span style="font-size: 10.0px;"&gt;&lt;code&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;/span&gt;&lt;span style="font-size: 10.0px;line-height: 1.5;"&gt;&amp;lt;connector&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;span style="font-size: 10.0px;"&gt;&lt;code&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;id&amp;gt;alfrescoCookie&amp;lt;/id&amp;gt;&lt;/code&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;span style="font-size: 10.0px;"&gt;&lt;code&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;name&amp;gt;Alfresco Connector&amp;lt;/name&amp;gt;&lt;/code&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;span style="font-size: 10.0px;"&gt;&lt;code&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;description&amp;gt;Connects to an Alfresco instance using cookie-based authentication&amp;lt;/description&amp;gt;&lt;/code&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;span style="font-size: 10.0px;"&gt;&lt;code&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;class&amp;gt;org.springframework.extensions.webscripts.connector.AlfrescoConnector&amp;lt;/class&amp;gt;&lt;/code&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;span style="font-size: 10.0px;"&gt;&lt;code&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/connector&amp;gt;&lt;/code&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;span style="font-size: 10.0px;"&gt;&lt;code&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;/span&gt;&lt;span style="font-size: 10.0px;line-height: 1.5;"&gt;&amp;lt;endpoint&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;span style="font-size: 10.0px;"&gt;&lt;code&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;id&amp;gt;alfresco&amp;lt;/id&amp;gt;&lt;/code&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;span style="font-size: 10.0px;"&gt;&lt;code&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;name&amp;gt;Alfresco - user access&amp;lt;/name&amp;gt;&lt;/code&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;span style="font-size: 10.0px;"&gt;&lt;code&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;description&amp;gt;Access to Alfresco Repository WebScripts that require user authentication&amp;lt;/description&amp;gt;&lt;/code&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;span style="font-size: 10.0px;"&gt;&lt;code&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;connector-id&amp;gt;alfrescoCookie&amp;lt;/connector-id&amp;gt;&lt;/code&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;span style="font-size: 10.0px;"&gt;&lt;code&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;endpoint-url&amp;gt;http://localhost:8080/alfresco/wcs&amp;lt;/endpoint-url&amp;gt;&lt;/code&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;span style="font-size: 10.0px;"&gt;&lt;code&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;identity&amp;gt;user&amp;lt;/identity&amp;gt;&lt;/code&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;span style="font-size: 10.0px;"&gt;&lt;code&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;external-auth&amp;gt;true&amp;lt;/external-auth&amp;gt;&lt;/code&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;span style="font-size: 10.0px;"&gt;&lt;code&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/endpoint&amp;gt;&lt;/code&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;span style="font-size: 10.0px;"&gt;&lt;code&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/remote&amp;gt;&lt;/code&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;span style="font-size: 10.0px;"&gt;&lt;code&gt;&amp;nbsp; &amp;lt;/config&amp;gt;&lt;/code&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;span style="font-size: 10.0px;"&gt;&lt;code&gt;&amp;lt;/alfresco-config&amp;gt;&lt;/code&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;strong style="color: rgb(51,51,51);line-height: 1.5;"&gt;NOTE: &lt;/strong&gt;&lt;span style="color: rgb(51,51,51);line-height: 1.5;"&gt;If you're running Alfresco's Tomcat server on a different host or port, please change the corresponding endpoint.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;span style="line-height: 1.5;"&gt;7. &amp;nbsp;Last but not the least, you can startup both the servers Liferay and Alfresco&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
	8. &amp;nbsp;Now you can able to see the 3 portlets under Alfresco category in Dock bar menu | Add portlet in Liferay. Try to add the Share Document library portlet in Liferay Page.&lt;/p&gt;
&lt;p&gt;
	&lt;img alt="" src="http://www.liferay.com/documents/7188303/24966116/Alfresco_Repository.png/d5ee32a1-2e9b-47d6-8b2e-0fe9fbb1afb2?t=1369234960767" style="width: 800.0px;height: 588.0px;"&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;span style="line-height: 1.5;"&gt;Reference Site :&amp;nbsp;&lt;/span&gt;&lt;a href="http://wiki.alfresco.com/wiki/Portlets" style="line-height: 1.5;"&gt;http://wiki.alfresco.com/wiki/Portlets&lt;/a&gt;&lt;/p&gt;
&lt;h4&gt;
	Other related link :&amp;nbsp;&lt;a href="http://www.liferay.com/web/navin.agarwal11/blog/-/blogs/integrating-alfresco-repository-to-liferay-documents-and-media-portlet"&gt;Integrating Alfresco Repository to Liferay Documents and Media Portlet&lt;/a&gt;&lt;/h4&gt;</summary>
    <dc:creator>Navin Agarwal</dc:creator>
    <dc:date>2013-05-22T12:52:59Z</dc:date>
  </entry>
  <entry>
    <title>Radio Liferay Episode 26: Ville Ingman (Vaadin)</title>
    <link rel="alternate" href="http://www.liferay.com/c/blogs/find_entry?entryId=24915020" />
    <author>
      <name>Olaf Kock</name>
    </author>
    <id>http://www.liferay.com/c/blogs/find_entry?entryId=24915020</id>
    <updated>2013-05-21T12:08:54Z</updated>
    <published>2013-05-21T11:16:20Z</published>
    <summary type="html">&lt;p&gt;
	&lt;a href="http://feedproxy.google.com/~r/RadioLiferay/~5/8FFjHZujnOQ/rl026-ville-ingman.mp3" style="text-decoration: none;" title="Radio Liferay Episode 26 - Ville Ingman on Vaadin"&gt;&amp;nbsp;&lt;/a&gt;&lt;a href="http://vaadin.com"&gt;&lt;img alt="Vaadin Logo" src="https://www.liferay.com/documents/1339770/10143824/vaadin.png/3afb7c0b-b60c-4e7e-9f03-070667058f46?t=1369136451968" style="width: 80.0px;height: 80.0px;float: right;margin: 0.0px 5.0px;"&gt;&lt;/a&gt;At this year's Jax I met &lt;a href="http://vaadin.com/ville"&gt;Ville Ingmann&lt;/a&gt;, &amp;quot;Your Business Buddy&amp;quot; at &lt;a href="http://vaadin.com"&gt;Vaadin&lt;/a&gt; (the business card says &amp;quot;VP of German Operations&amp;quot;). With some inadvertent background noise (sorry) we talk about the history of Vaadin in Liferay, the meaning of the name, which also explains the logo, and the integration of Vaadin in Liferay (Vaadin is technology partner of Liferay, the library comes bundled with your Liferay installation and is available in the &amp;quot;New Project&amp;quot; wizard of Liferay IDE).&lt;/p&gt;
&lt;p&gt;
	&lt;a href="https://www.liferay.com/radio"&gt;&lt;img alt="podcast-logo" class="logo" src="https://www.liferay.com/image/image_gallery?uuid=2a48beb8-1689-4765-90a3-91ef069eef49&amp;groupId=1339770&amp;t=1317471498392" style="float: right;border-width: 0.0px;border-style: solid;margin-left: 10.0px;" title="Radio Liferay"&gt;&lt;/a&gt;We talk about&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;
		&lt;a href="http://goo.gl/maps/yCZxi"&gt;Turku&lt;/a&gt;, Finland
	&lt;li&gt;
		When to use Vaadin vs. the other available technologies
	&lt;li&gt;
		How Vaadin differs from GWT (hint: GWT is used for front-end UI rendering, but generally processes server-side
	&lt;li&gt;
		A performance comparison and benchmarks that have been executed with Vaadin - and how it will change further with Server-Push in Vaadin 7.1
	&lt;li&gt;
		The Devoxx-Talk &amp;quot;&lt;a href="http://www.devoxx.com/display/DV11/WWW++World+Wide+Wait++A+Performance+Comparison+of+Java+Web+Frameworks"&gt;World Wide Wait&lt;/a&gt;&amp;quot; included Vaadin in its comparison as the fastest server-side solution.
	&lt;li&gt;
		Vaadin recently released version 7 which is a huge step forward, unfortunately not 100% backward compatible with the version that ships with Liferay (6.x) but 6.x continues to be maintained. The backward compatibility for version 7 depends on the technology used by the applications, for regular applications it should be ok though.
	&lt;li&gt;
		Arcusys, a Liferay Partner in Finland, picked up the development for the &lt;a href="https://github.com/arcusys/liferay-vaadin-plugin"&gt;Vaadin controlpanel&lt;/a&gt;
	&lt;li&gt;
		Vaadin is licensed under the Apache 2.0 license, despite the main product being available for free (like Liferay), Vaadin has built quite a good business around the product. The company is sized at ~60 employees, offering services, consulting, training and some extra components that we briefly talk about.
	&lt;li&gt;
		&lt;a href="http://www.flickr.com/photos/teresaling/2348437455/"&gt;Eating your own dogfood&lt;/a&gt; vs. &lt;a href="http://www.flickr.com/photos/eannieb/3201083662"&gt;drinking your own champagne&lt;/a&gt;.
	&lt;li&gt;
		Vaadin supports &lt;a href="http://sass-lang.com/"&gt;SASS&lt;/a&gt; and integrates easily with external javascript
	&lt;li&gt;
		Widgets
	&lt;li&gt;
		The Vaadin repository is hosted on &lt;a href="https://github.com/vaadin"&gt;github&lt;/a&gt; - go ahead, fork and collaborate
&lt;/ul&gt;
&lt;p&gt;
	Follow &lt;a href="https://twitter.com/villeingman"&gt;Ville&lt;/a&gt;, &lt;a href="https://twitter.com/RadioLiferay"&gt;RadioLiferay&lt;/a&gt; or &lt;a href="https://twitter.com/olafk"&gt;me&lt;/a&gt; on twitter&lt;br&gt;
	&lt;br&gt;
	Thanks a lot to &lt;a href="https://auphonic.com/"&gt;Auphonic&lt;/a&gt; for improving the sound quality drastically - this is the first episode I had processed by them and it's been a really good experience - especially given the recording cirumstances.&lt;/p&gt;
&lt;p&gt;
	You'll find this episode - and make sure that you don't miss any of the future episodes - by subscribing to&amp;nbsp; &lt;a href="http://feeds.feedburner.com/RadioLiferay"&gt;http://feeds.feedburner.com/RadioLiferay&lt;/a&gt;. You can also subscribe on itunes.: Just search for &amp;quot;Radio Liferay&amp;quot; or just &amp;quot;Liferay&amp;quot; in the podcast directory.&lt;/p&gt;
&lt;p&gt;
	&lt;a href="http://feedproxy.google.com/~r/RadioLiferay/~5/8FFjHZujnOQ/rl026-ville-ingman.mp3" title="Radio Liferay Episode 26 - Ville Ingman on Vaadin"&gt;&lt;img alt="download audio file" src="https://www.liferay.com/documents/1339770/10143824/audio-mp3.png" style="width: 80.0px;height: 15.0px;border-width: 0.0px;border-style: solid;"&gt;&lt;/a&gt;&lt;/p&gt;</summary>
    <dc:creator>Olaf Kock</dc:creator>
    <dc:date>2013-05-21T11:16:20Z</dc:date>
  </entry>
  <entry>
    <title>Behavioral Analytics: Who moved my coffee cup?</title>
    <link rel="alternate" href="http://www.liferay.com/c/blogs/find_entry?entryId=24857210" />
    <author>
      <name>Ronald Sarayudej</name>
    </author>
    <id>http://www.liferay.com/c/blogs/find_entry?entryId=24857210</id>
    <updated>2013-05-20T17:16:08Z</updated>
    <published>2013-05-19T00:34:50Z</published>
    <summary type="html">&lt;p&gt;
	I would like to bring attention to a hot topic around the Liferay offices lately, and one that you should definitely consider for the websites that you are working on: &lt;strong&gt;behavioral analytics&lt;/strong&gt;. &amp;nbsp;I'd like to explain this with a small example that you might be able to relate to:&lt;/p&gt;
&lt;p&gt;
	Let's all start with a lovely place that I call &lt;strong&gt;Cup Island&lt;/strong&gt;:&lt;/p&gt;
&lt;p&gt;
	&lt;img src="http://www.liferay.com/documents/1879763/24857185/island.jpg/b822cb0a-d6ab-4d2d-a1e4-fcf013d307f6" style="width: 100.0%;"&gt;&lt;/p&gt;
&lt;p&gt;
	I took this photo in the Liferay LA office last Friday morning. &amp;nbsp;This is one of the small tables downstairs near our lounge/reading area. &amp;nbsp;You can see this table immediately when you enter our North entrance. &amp;nbsp;It is usually dotted with different mugs and glasses throughout the day. &amp;nbsp;This is Cup Island.&lt;/p&gt;
&lt;p&gt;
	&lt;img src="http://www.liferay.com/documents/1879763/24857185/shannon.jpg/6c0b2aff-5863-4c6b-b2a6-eb288dd0825d" style="float: left;padding-right: 10.0px;"&gt; As I was taking this photo, Shannon from our Marketing department said to me, &amp;quot;why are people leaving their used cups around? &amp;nbsp;Someone should probably put them away.&amp;quot;&lt;/p&gt;
&lt;p&gt;
	And to someone who notices Cup Island for the first time, this is the natural response. &amp;nbsp;In fact, I have left a cup here before, and had it disappear into the hands of the facilities cleaning team (which they kindly gave back to me after panicking over its disappearance).&lt;/p&gt;
&lt;p&gt;
	&lt;img src="http://www.liferay.com/documents/1879763/24857185/ron.jpg/9d339ca7-5af5-4bcb-bd79-101d46e8060d?t=1368924797000" style="float: right;padding-left: 10.0px;"&gt; But I explained to Shannon the purpose of Cup Island. &amp;nbsp;&amp;quot;Don't worry, these cups aren't left here to die,&amp;quot; (I'm paraphrasing a little bit), &amp;quot;this is a temporarily holding place until their owners come back for them.&amp;quot;&lt;/p&gt;
&lt;p&gt;
	You see, the reason that Shannon didn't realize this is because she is a woman. &amp;nbsp;Wait - I don't mean this in a bad way - what I mean is, Cup Island only exists near the men's restroom.&lt;/p&gt;
&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;
&lt;p&gt;
	&lt;img src="http://www.liferay.com/documents/1879763/24857185/island2.jpg/47421f2a-4786-4b3d-89cd-980f739ffaed?t=1368985030191" style="float: left;padding-right: 10.0px;"&gt;&lt;/p&gt;
&lt;p&gt;
	So that is the purpose of Cup Island - a convenient place to put cups when using the restroom. &amp;nbsp;To other people, this might only be Decorative Plant Island. &amp;nbsp;It really depends on why you use the table.&lt;/p&gt;
&lt;p&gt;
	So why use it to hold cups? &amp;nbsp;Let's understand the audience. &amp;nbsp;This restroom is near the kitchen, the only kitchen at our office, and the only place to get drinks from. &amp;nbsp;And more than half of the employees at Liferay don't work on this side of the building, but instead work either upstairs or in another wing.&lt;/p&gt;
&lt;p&gt;
	So when an engineer who sits upstairs needs to use the restroom, they are probably thinking, &amp;quot;I should also bring my cup with me so I can visit the kitchen in one trip.&amp;quot; &amp;nbsp;And right before they go into the restroom, they see this table, leave their cup, and pick it up when they exit the restroom.&lt;/p&gt;
&lt;p&gt;
	So how can we improve this situation? &amp;nbsp;Well, it depends on what we want to achieve. &amp;nbsp;We cannot ask employees to stop drinking water, or to stop using the restroom (some of you may be thinking that asking for one may lead to the other anyway, but after a while our employees would cease to exist).&lt;/p&gt;
&lt;p&gt;
	&lt;strong&gt;If our goal is to stop people from leaving cups on the island&lt;/strong&gt;, we could&amp;nbsp;try providing larger cups, so refills might not be as necessary. &amp;nbsp;Or we could build a kitcken that is closer to the employees (or move employees closer to the kitchen). &amp;nbsp;Or we could simply just remove the table. &amp;nbsp;Employees may leave their cups further away, or just take two trips from their desks, which might cost them convenience and time.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;
	&lt;strong&gt;If our goal is to make Cup Island easier to use&lt;/strong&gt;, we could remove the huge plant and make more cup space. &amp;nbsp;Or we could turn it into a Super Cup Island, with more capacity and a handy labeling system so people never get their cups confused.&lt;/p&gt;
&lt;p&gt;
	Whatever we choose, these needs still exist: (1) everyone needs to drink water, and (2) everyone needs to use the restroom. &amp;nbsp;But behavioral analytics tells us that the kitchen or bathroom may be too far away.&lt;/p&gt;
&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;
&lt;p&gt;
	&lt;span style="font-size: 18.0px;"&gt;Learning to improve websites based on user behavior&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
	For the redesign of liferay.com, we are trying to study where people are leaving their &amp;quot;cups&amp;quot; on our website. &amp;nbsp;We know that there are community members, enterprise customers, trainees, partners, event goers, internal staff, liferay newbies, and evaluators - each of us enjoying the site, or fighting with it. &amp;nbsp;We are studying how people use the site, where they are clicking, and trying to figure out why. &amp;nbsp;If we can really understand our users, only then can we improve their experience. &amp;nbsp;We're playing around with Crazy Egg, Google Analytics, and some other marketing tools. &amp;nbsp;We're suggesting to the core product team that it would be killer to bake web analytics directly into Liferay Portal. &amp;nbsp;Hey, it would make my job a lot easier.&lt;/p&gt;
&lt;p&gt;
	Admittedly, this is not a new subject at all. &amp;nbsp;Admittedly, Liferay has lots of room for improvement (the webteam would know, as we are working on our instance of 6.1 day in and day out). &amp;nbsp;For Portal 6.2, we've started doing in-house user testing - I know this because I was just tested last week! &amp;nbsp;And we've begun to make incremental improvements to the website. &amp;nbsp;I already have examples of some small victories we've had lately, but I will save that for the next post.&lt;/p&gt;
&lt;p&gt;
	We do have some lovely UI and content changes on the way. &amp;nbsp;Just to prove how serious I am: the code is already committed and was approved by Brian Chan himself (well, he approves everyone's code). &amp;nbsp;Stay tuned, same web time, same web channel.&lt;/p&gt;
&lt;p&gt;
	- Ron&lt;/p&gt;</summary>
    <dc:creator>Ronald Sarayudej</dc:creator>
    <dc:date>2013-05-19T00:34:50Z</dc:date>
  </entry>
  <entry>
    <title>Create an upgrade process in 6.2</title>
    <link rel="alternate" href="http://www.liferay.com/c/blogs/find_entry?entryId=24808331" />
    <author>
      <name>Roberto Díaz</name>
    </author>
    <id>http://www.liferay.com/c/blogs/find_entry?entryId=24808331</id>
    <updated>2013-05-18T20:09:11Z</updated>
    <published>2013-05-16T23:27:17Z</published>
    <summary type="html">&lt;h1&gt;
	Introduction&lt;/h1&gt;
&lt;hr&gt;
&lt;p&gt;
	Recently I've been working in some new features regarding to internacionalization the name and description of DLFileEntryType entity. I create all the logic and everithing was fine. Everthing went smoothly.&lt;/p&gt;
&lt;p&gt;
	&lt;span style="line-height: 1.5;"&gt;Due I was changing a DB table I had to create an upgrade process &amp;nbsp;and the things became a litle bit hard (it's my very fist time creating an upgrade)... Why? Because I found &amp;nbsp;an absolute lack of &amp;nbsp;updated documentation about this kind of process.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;span style="line-height: 1.5;"&gt;It's true that I found a few wikis but it was a little messy (It was very funny to see five core engineers in the LA office triying to decode the [obsolete] documentation, true story...) So I've decided to create my fist blog entry regarding&amp;nbsp;&lt;/span&gt;&lt;span style="line-height: 1.5;"&gt;this.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
	But first of all... &lt;strong&gt;What is an upgrade process??&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;span style="line-height: 1.5;"&gt;&lt;strong&gt;What we try to do in a upgrade process is guarantee that Liferay can upgrade from any previous version to any newer version&lt;/strong&gt;. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;span style="line-height: 1.5;"&gt;We can see this in the following example.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;span style="line-height: 1.5;"&gt;I'm going to explain (based in the &amp;nbsp;develop I made) the whole process, explaining how did I upgrade the &amp;nbsp;DLFileEntryType entity by adding a new column called fileEntryTypeKey and changing the name and the description columns introducing localization properties.&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;
	Step 1 - Modify an entity&lt;/h2&gt;
&lt;hr&gt;
&lt;p&gt;
	The first thing to do is to perfome all the required changes in the entity. It will give you the basis for the rest of the process. Not very much to explain, edit the service.xml ...&lt;/p&gt;
&lt;script src="https://gist.github.com/robertoDiaz/5594368.js"&gt;&lt;/script&gt;
&lt;p&gt;
	...Then run...&lt;/p&gt;
&lt;script src="https://gist.github.com/robertoDiaz/5594393.js"&gt;&lt;/script&gt;
&lt;p&gt;
	... and modifiy the Impl classes you need. Nothing special&lt;/p&gt;
&lt;h2&gt;
	Step 2 - Change .ftl if needed&lt;/h2&gt;
&lt;hr&gt;
&lt;p&gt;
	If the entity has some default objects (i.e. DLFileentryType has 5 default types) maybe you'll need to change its &lt;em&gt;.ftl&lt;/em&gt; file :&lt;/p&gt;
&lt;script src="https://gist.github.com/robertoDiaz/5594437.js"&gt;&lt;/script&gt;
&lt;h2&gt;
	Step 3 - Create some UpgradeProcess classes&lt;/h2&gt;
&lt;hr&gt;
&lt;p&gt;
	Go to the proper version UpgradeProcess[XXX].java file (for us it's UpgradeProcess_6_2_0.java) and search for the right Upgrade[XXX].java (in this case is UpgradeDocumentLibrary). In this class (wich extends UpgradeProcess) you must introduce and override the doUpgrade() method like this:&lt;/p&gt;
&lt;script src="https://gist.github.com/robertoDiaz/5594494.js"&gt;&lt;/script&gt;
&lt;p&gt;
	As you can see we are directly using pure sql to perform the database upgrade. This clauses are surrounded by a try&amp;hellip;catch that calls the method upgradeTable(few params) if something goes wrong...&lt;/p&gt;
&lt;p&gt;
	Let's see that method deeply:&lt;/p&gt;
&lt;script src="https://gist.github.com/robertoDiaz/5594550.js"&gt;&lt;/script&gt;
&lt;p&gt;
	In there we are creating an UpgradeTable.java instance and we pass some values regarding the table we are modifiying. We get this values from an autogenerated class called XXXTable.java (DLFileEntryTypeTable.java for us).&lt;/p&gt;
&lt;h2&gt;
	Step 4 - Create the [XXX]Table class&lt;/h2&gt;
&lt;hr&gt;
&lt;p&gt;
	Create this class is as simple as make its skeleton, modify portlet-model-hints.xml to define the configuraiton of the columns...&lt;/p&gt;
&lt;script src="https://gist.github.com/robertoDiaz/5594784.js"&gt;&lt;/script&gt;
&lt;p&gt;
	...and then run...&lt;/p&gt;
&lt;script src="https://gist.github.com/robertoDiaz/5594592.js"&gt;&lt;/script&gt;
&lt;p&gt;
	This is the generated class:&lt;/p&gt;
&lt;script src="https://gist.github.com/robertoDiaz/5594598.js"&gt;&lt;/script&gt;
&lt;h2&gt;
	Step 5 - Create some logic to format and persist the current data&lt;/h2&gt;
&lt;hr&gt;
&lt;p&gt;
	The last method that we can see in doUpgrade() is:&lt;/p&gt;
&lt;script src="https://gist.github.com/robertoDiaz/5594622.js"&gt;&lt;/script&gt;
&lt;p&gt;
	Here we are getting the previous values and we pass them to...&lt;/p&gt;
&lt;script src="https://gist.github.com/robertoDiaz/5594630.js"&gt;&lt;/script&gt;
&lt;p&gt;
	...where we will reuse them in the modified table.&lt;/p&gt;
&lt;h2&gt;
	Step 6 - Regenerate all the service and TEST!&lt;/h2&gt;
&lt;hr&gt;
&lt;p&gt;
	This is the final step. All you got to do:&lt;/p&gt;
&lt;script src="https://gist.github.com/robertoDiaz/5595862.js"&gt;&lt;/script&gt;
&lt;h2&gt;
	VERY IMPORTANT!!&lt;/h2&gt;
&lt;p&gt;
	Run &lt;script src="https://gist.github.com/robertoDiaz/5595907.js"&gt;&lt;/script&gt;&lt;/p&gt;
&lt;p&gt;
	Doing this you could be sure you are not breaking the default data.&lt;/p&gt;
&lt;p&gt;
	And that's all!!!&lt;/p&gt;</summary>
    <dc:creator>Roberto Díaz</dc:creator>
    <dc:date>2013-05-16T23:27:17Z</dc:date>
  </entry>
  <entry>
    <title>Managing Liferay through the Gogo shell</title>
    <link rel="alternate" href="http://www.liferay.com/c/blogs/find_entry?entryId=24728195" />
    <author>
      <name>Miguel Pastor Olivar</name>
    </author>
    <id>http://www.liferay.com/c/blogs/find_entry?entryId=24728195</id>
    <updated>2013-05-15T00:04:24Z</updated>
    <published>2013-05-14T21:46:33Z</published>
    <summary type="html">&lt;p&gt;
	I have done a huge refactor for most of our OSGi related work, moving the majority of its components to the Liferay plugins SDK. Everything except the graphical admin UI is already in the master branch of the &lt;a href="https://github.com/liferay/liferay-plugins"&gt;official repo&lt;/a&gt; so you can play with it; we would love to hear your feedback.&lt;/p&gt;
&lt;p&gt;
	My goal with this post is to show you how create a new OSGi bundle in the plugins SDK using a practical example: &lt;strong&gt;extending the OSGi shell&lt;/strong&gt; (we have spoken about it &lt;a href="http://www.liferay.com/web/raymond.auge/blog/-/blogs/liferay-osgi-and-shell-access-via-gogo-shell"&gt;sometime ago&lt;/a&gt;). Let's try to do it:&lt;/p&gt;
&lt;h2&gt;
	Basic project structure&lt;/h2&gt;
&lt;p&gt;
	Currently there is no target in the SDK which allows you to create a bundle (I will push it soon) so you can use this example (or the other modules as &lt;a href="https://github.com/liferay/liferay-plugins/tree/master/shared/http-service-shared"&gt;http-service-shared&lt;/a&gt; or l&lt;a href="https://github.com/liferay/liferay-plugins/tree/master/shared/log-bridge-shared"&gt;og-bridge-shared&lt;/a&gt;) as the basic skeleton for your tests:&lt;/p&gt;
&lt;p style="text-align: center;"&gt;
	&lt;img alt="Basic OSGi bundle skeleton" src="http://www.liferay.com/documents/7715976/0/BasicOSGiBundleSkeleton.png/92827e75-e094-4853-abc9-d5e1418ebb64?t=1368569019315" style="width: 291.0px;height: 350.0px;"&gt;&lt;/p&gt;
&lt;p&gt;
	As you can see, the structure is very simple; let my try to highlight the main OSGi related points:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;
		All the new OSGi plugins will be based in the great &lt;a href="http://www.aqute.biz/Code/Bnd"&gt;bnd tool&lt;/a&gt;&amp;nbsp;. You can configure all your bundle requirement through the &lt;strong&gt;bnd.bnd&lt;/strong&gt; file
	&lt;li&gt;
		The &lt;strong&gt;build.xml&lt;/strong&gt; of the plugin must import the &lt;strong&gt;build-common-osgi-plugin.xml&lt;/strong&gt; build file: &lt;code&gt;&amp;lt;import file=&amp;quot;../../build-common-osgi-plugin.xml&amp;quot; /&amp;gt;&lt;/code&gt;&lt;span style="line-height: 1.5;"&gt;&amp;nbsp;&lt;/span&gt;
&lt;/ul&gt;
&lt;p&gt;
	As I have told you before I will include an Ant target to create this basic skeletons, but, until then, you need to do this by hand. Sorry about that :(.&lt;/p&gt;
&lt;h2&gt;
	Writing Gogo shell custom commands&lt;/h2&gt;
&lt;p&gt;
	As we have stated at the beginning of the post, we are going to write a bunch of custom commands for the Gogo shell. As you will see, this is an extremely easy task.&lt;/p&gt;
&lt;p&gt;
	&lt;span style="line-height: 1.5;"&gt;This commands can be created using a simple OSGi service with a couple of custom properties. We will use the OSGi declarative services approach in order to register our commands (Liferay already includes an implementation of the Declarative Services specification in the final bundle, so you don't need to deploy it by yourself).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;span style="line-height: 1.5;"&gt;At this point, we are ready to write our first command: the ListUsersCommand:&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;script src="https://gist.github.com/migue/5580178.js"&gt;&lt;/script&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;span style="line-height: 1.5;"&gt;The @Component annotation let us to define a new OSGi service in an extremely easy way. The Gogo commands are registered in the console using the properties &lt;strong&gt;osgi.command.function&lt;/strong&gt; and the &lt;strong&gt;osgi.command.scope.&amp;nbsp;&lt;/strong&gt;The first one establishes the name of the namespace where the command will be allocated (in order to prevent name collisions) while the latter specifies the name of the command. It is important to note that the Declarative Service annotations I am using does not support inheritance, so everything you declare in a base class will not be inherited down in the hierarchy.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;span style="line-height: 1.5;"&gt;And, how do I write the implementation of my new command? You just need to write a new public method named as the value written in the &lt;strong&gt;osgi.command.function&lt;/strong&gt;. If your command needs some argument you will need to specify as a parameter of your method (an the console will do the coercion of the basic types). In our example we are creating a usermanagment namespace, with a command called listByCompany which expects the companyId (long) as the unique parameter.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;span style="line-height: 1.5;"&gt;Easy, isn't it?&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;
	Consuming Liferay services&lt;/h2&gt;
&lt;p&gt;
	I would like to highlight the implementation of the listByCompany command (I am sure you have already guessed the previous command retrieves all the users of a certain company).&lt;/p&gt;
&lt;p&gt;
	In order to get all this info we need to call the corresponding method in the users service. We could do something like &lt;em&gt;UserLocalServiceUtil.getCompanyUsers(companyId)&lt;/em&gt; but this is not a good approach, so we are to going to get all the benefits of having all the Liferay services as OSGi services. We just need to grab a reference to the &lt;strong&gt;UserLocalService&lt;/strong&gt; bean:&lt;/p&gt;
&lt;pre class="line-pre" style="font-size: 12.0px;line-height: 16.0px;font-family: Consolas , &amp;quot;Liberation Mono&amp;quot; , Courier , monospace;white-space: pre;width: 744.0px;margin-top: 0.0px;margin-bottom: 0.0px;padding: 0.0px;color: rgb(0,0,0);background-color: rgb(255,255,255);"&gt;
&lt;/pre&gt;
&lt;div class="line" id="file-listuserscommand-java-LC30"&gt;
	&lt;code&gt;&lt;span class="nd"&gt;@Reference&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div class="line" id="file-listuserscommand-java-LC31"&gt;
	&lt;code&gt;&lt;span class="kd" style="font-weight: bold;"&gt;public&lt;/span&gt; &lt;span class="kt" style="color: rgb(68,85,136);font-weight: bold;"&gt;void&lt;/span&gt; &lt;span class="nf" style="color: rgb(153,0,0);font-weight: bold;"&gt;setUserLocalService&lt;/span&gt;&lt;span class="o" style="font-weight: bold;"&gt;(&lt;/span&gt;&lt;span class="n" style="color: rgb(51,51,51);"&gt;UserLocalService&lt;/span&gt; &lt;span class="n" style="color: rgb(51,51,51);"&gt;userLocaService&lt;/span&gt;&lt;span class="o" style="font-weight: bold;"&gt;)&lt;/span&gt; &lt;span class="o" style="font-weight: bold;"&gt;{&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div class="line" id="file-listuserscommand-java-LC32"&gt;
	&lt;code&gt;&lt;span class="n" style="color: rgb(51,51,51);"&gt;&amp;nbsp; &amp;nbsp;_userLocalService&lt;/span&gt; &lt;span class="o" style="font-weight: bold;"&gt;=&lt;/span&gt; &lt;span class="n" style="color: rgb(51,51,51);"&gt;userLocaService&lt;/span&gt;&lt;span class="o" style="font-weight: bold;"&gt;;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div class="line" id="file-listuserscommand-java-LC33"&gt;
	&lt;code&gt;&lt;span class="o" style="font-weight: bold;"&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div class="line"&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div class="line"&gt;
	&lt;code&gt;&lt;span style="line-height: 1.5;"&gt;protected UserLocalService _userLocalService;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div class="line"&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;h2 class="line"&gt;
	Building and running the bundle&lt;/h2&gt;
&lt;div class="line"&gt;
	Once we have written our command we need to build our final artifact: just type &lt;code&gt;ant jar&lt;/code&gt;&amp;nbsp;in the project folder and you will get the final jar file into the dist folder. Before deploying our new bundle let's connect to the Gogo shell in order to check which bundles we have already installed:&lt;/div&gt;
&lt;div class="line"&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div class="line" style="text-align: center;"&gt;
	&lt;img alt="" src="http://www.liferay.com/documents/7715976/0/GogoShellInstalledBundles.png/c43de98a-3c41-460f-aea0-96797cd3655e?t=1368572253900" style="width: 604.0px;height: 237.0px;"&gt;&lt;/div&gt;
&lt;div class="line"&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div class="line"&gt;
	As you see, we have already a bunch of bundles running but nothing about the new commands we are writing. What commands are currently available in the console? Just type &lt;em&gt;help&lt;/em&gt; in the console&lt;/div&gt;
&lt;div class="line"&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div class="line" style="text-align: center;"&gt;
	&lt;img alt="Gogo shell available commands" src="http://www.liferay.com/documents/7715976/0/GogoShellAvailableCommands.png/e294b63e-1151-4a50-8ebb-0603c5d50946?t=1368572559154" style="width: 173.0px;height: 719.0px;"&gt;&lt;/div&gt;
&lt;div class="line"&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div class="line"&gt;
	Now we have to deploy our new bundle. To do that, we just need to copy it to the folder &lt;em&gt;$liferay.home/data/osgi/deploy&lt;/em&gt; (it is the default folder, you can change it in the properties). You can use the deploy Ant task our just copy the folder into the previous folder. Once the bundle is deployed we should see it in the bundles list:&lt;/div&gt;
&lt;div class="line"&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div class="line" style="text-align: center;"&gt;
	&lt;img alt="Available bundles once the custom command has been installed" src="http://www.liferay.com/documents/7715976/0/GogoShellInstalledBundlesCustomCommand.png/e765370c-69e7-4412-a9c6-b202c9399ca1?t=1368574279217" style="width: 607.0px;height: 261.0px;"&gt;&lt;/div&gt;
&lt;div class="line"&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div class="line"&gt;
	Take a look to the last line; you will see our bundle has been deployed and it is, hopefully, running. Let's see which commands we do have available once our new bundle is already installed.&lt;/div&gt;
&lt;div class="line" style="text-align: center;"&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div class="line" style="text-align: center;"&gt;
	&lt;img alt="" src="http://www.liferay.com/documents/7715976/0/GogoShellAvailableCommandsCustomCommandInstalled.png/d52bcc42-0158-40a4-abd6-8e8c6831cbea?t=1368574544046" style="width: 232.0px;height: 702.0px;"&gt;&lt;/div&gt;
&lt;div class="line"&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div class="line"&gt;
	Do you see the last two lines? These are the commands we have written (in this post we only have described one command, you can find the other one in the companion source code). So, if I type &lt;code&gt;listByCompany ID_OF_A_COMPANY (mine is 10153)&lt;/code&gt; (since there is no collision I don't need to prefix the command with the namespace) you should get an output similar to this:&lt;/div&gt;
&lt;div class="line"&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div class="line"&gt;
	&lt;div&gt;
		&lt;code&gt;&lt;cite&gt;&lt;span style="line-height: 1.5;"&gt;Users of the company 10153&lt;/span&gt;&lt;/cite&gt;&lt;/code&gt;&lt;/div&gt;
	&lt;div&gt;
		&lt;code&gt;&lt;cite&gt;&amp;nbsp; &amp;nbsp; User default@liferay.comwith id 10157&lt;/cite&gt;&lt;/code&gt;&lt;/div&gt;
	&lt;div&gt;
		&lt;code&gt;&lt;cite&gt;&amp;nbsp; &amp;nbsp; User test@liferay.comwith id 10195&lt;/cite&gt;&lt;/code&gt;&lt;/div&gt;
	&lt;div&gt;
		&amp;nbsp;&lt;/div&gt;
	&lt;div&gt;
		Along this post we have seen how we can extend the Gogo shell creating new commands, consuming Liferay services and building a basic OSGi bundle in the plugins SDK. It is not a big deal but I think it is a good starting point to get used to the new OSGi abilities. Hopefully I will be able to push some more complex examples in the near future.&lt;/div&gt;
	&lt;div&gt;
		&amp;nbsp;&lt;/div&gt;
	&lt;div&gt;
		You can find the whole source code in the &lt;strong&gt;shared/gogo-commands-shared&lt;/strong&gt; folder at my &lt;a href="https://github.com/migue/liferay-plugins/tree/osgi-gogo-commands"&gt;plugins repo&lt;/a&gt;.&lt;/div&gt;
&lt;/div&gt;</summary>
    <dc:creator>Miguel Pastor Olivar</dc:creator>
    <dc:date>2013-05-14T21:46:33Z</dc:date>
  </entry>
  <entry>
    <title>Mavenize Liferay Plugins SDK - Using Maven</title>
    <link rel="alternate" href="http://www.liferay.com/c/blogs/find_entry?entryId=24695846" />
    <author>
      <name>Kamesh Sampath</name>
    </author>
    <id>http://www.liferay.com/c/blogs/find_entry?entryId=24695846</id>
    <updated>2013-05-14T04:27:40Z</updated>
    <published>2013-05-14T04:27:21Z</published>
    <summary type="html">&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;
&lt;div class="ExternalClass44785586EC394E9F8B168C586A4CB38D" style="color: rgb(51,51,51);font-family: Georgia , &amp;quot;Times New Roman&amp;quot; , &amp;quot;Bitstream Charter&amp;quot; , Times , serif;font-size: 13.0px;line-height: 19.0px;"&gt;
	&lt;h2 id="Overview" style="font-size: 1.5em;"&gt;
		&lt;span style="font-size: large;"&gt;Overview&lt;/span&gt;&lt;/h2&gt;
	&lt;p&gt;
		When working with&amp;nbsp;&lt;a href="http://www.liferay.com/"&gt;Liferay&lt;/a&gt;&amp;nbsp;projects using&amp;nbsp;&lt;a href="http://www.liferay.com/downloads/liferay-projects/liferay-ide"&gt;Liferay IDE&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="http://www.liferay.com/downloads/liferay-portal/additional-files"&gt;Plugins SDK&lt;/a&gt;&amp;nbsp;it becomes highly difficult to manage dependencies, as&amp;nbsp;&lt;a href="http://www.liferay.com/downloads/liferay-projects/liferay-ide"&gt;Liferay IDE&lt;/a&gt;&amp;nbsp;or&amp;nbsp;&lt;a href="http://www.liferay.com/downloads/liferay-portal/additional-files"&gt;Plugins SDK&lt;/a&gt;&amp;nbsp;by default uses&amp;nbsp;&lt;a href="http://ant.apache.org/"&gt;Ant&lt;/a&gt;&amp;nbsp;for building and deploying, though Liferay does support&amp;nbsp;&lt;a href="http://maven.apache.org/"&gt;Maven&lt;/a&gt;&amp;nbsp;based Plugins but as a seasoned Liferay Developer we will be inclined to use&amp;nbsp;&lt;a href="http://ant.apache.org/"&gt;Ant&lt;/a&gt;&amp;nbsp;preferred to&amp;nbsp;&lt;a href="http://maven.apache.org/"&gt;Maven&lt;/a&gt;.&lt;br&gt;
		The problem rather I call it a difficulty arises when,&lt;/p&gt;
	&lt;ul&gt;
		&lt;li&gt;
			The number of dependencies for our Portlet project increases and we need to maintain a version based configuration
		&lt;li&gt;
			We need to use or integrate our Portlet application with an existing Maven based application from an Organizational build repository
	&lt;/ul&gt;
	&lt;p&gt;
		In this article we will look at how we can use&amp;nbsp;&lt;a href="http://maven.apache.org/"&gt;Maven&lt;/a&gt;&amp;nbsp;dependency management in&amp;nbsp;&lt;a href="http://www.liferay.com/downloads/liferay-portal/additional-files"&gt;Plugins SDK&lt;/a&gt;&amp;nbsp;by still using the default&amp;nbsp;&lt;a href="http://ant.apache.org/"&gt;Ant&lt;/a&gt;&amp;nbsp;based Liferay SDK build, you can use any of your existing Liferay Plugins SDK project which has external dependencies.&lt;/p&gt;
	&lt;h2 id="TechnicalPlatform" style="font-size: 1.5em;"&gt;
		&lt;span style="font-size: large;"&gt;Technical Platform&lt;/span&gt;&lt;/h2&gt;
	&lt;p&gt;
		I have tested this application on the following technical platform, this works irrespective of Operating System.&lt;/p&gt;
	&lt;table class="mceItemTable" style="cursor: default;"&gt;
		&lt;tbody&gt;
			&lt;tr&gt;
				&lt;th style=""&gt;
					Software&lt;/th&gt;
				&lt;th style=""&gt;
					Version&lt;/th&gt;
				&lt;th style=""&gt;
					Download Link&lt;/th&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
				&lt;td style="color: rgb(0,0,0);font-family: Verdana , Arial , Helvetica , sans-serif;font-size: 11.0px;margin: 8.0px;"&gt;
					Liferay CE Portal Server (Tomcat)&lt;/td&gt;
				&lt;td style="color: rgb(0,0,0);font-family: Verdana , Arial , Helvetica , sans-serif;font-size: 11.0px;margin: 8.0px;"&gt;
					6.0.x&lt;/td&gt;
				&lt;td style="color: rgb(0,0,0);font-family: Verdana , Arial , Helvetica , sans-serif;font-size: 11.0px;margin: 8.0px;"&gt;
					&lt;a href="http://sourceforge.net/projects/lportal/files/Liferay%20Portal/6.0.6/liferay-portal-tomcat-6.0.6-20110225.zip/download"&gt;http://sourceforge.net/projects/lportal/files/Liferay%20Portal/6.0.6/liferay-portal-tomcat-6.0.6-20110225.zip/download&lt;/a&gt;&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
				&lt;td style="color: rgb(0,0,0);font-family: Verdana , Arial , Helvetica , sans-serif;font-size: 11.0px;margin: 8.0px;"&gt;
					Liferay CE Plugins&lt;/td&gt;
				&lt;td style="color: rgb(0,0,0);font-family: Verdana , Arial , Helvetica , sans-serif;font-size: 11.0px;margin: 8.0px;"&gt;
					SDK 6.0.x&lt;/td&gt;
				&lt;td style="color: rgb(0,0,0);font-family: Verdana , Arial , Helvetica , sans-serif;font-size: 11.0px;margin: 8.0px;"&gt;
					&lt;a href="http://sourceforge.net/projects/lportal/files/Liferay%20Portal/6.0.6/liferay-plugins-sdk-6.0.6-20110225.zip/download"&gt;http://sourceforge.net/projects/lportal/files/Liferay%20Portal/6.0.6/liferay-plugins-sdk-6.0.6-20110225.zip/download&lt;/a&gt;&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
				&lt;td style="color: rgb(0,0,0);font-family: Verdana , Arial , Helvetica , sans-serif;font-size: 11.0px;margin: 8.0px;"&gt;
					Apache Ant&lt;/td&gt;
				&lt;td style="color: rgb(0,0,0);font-family: Verdana , Arial , Helvetica , sans-serif;font-size: 11.0px;margin: 8.0px;"&gt;
					1.7.x or above, preferred 1.8.x&lt;/td&gt;
				&lt;td style="color: rgb(0,0,0);font-family: Verdana , Arial , Helvetica , sans-serif;font-size: 11.0px;margin: 8.0px;"&gt;
					&lt;a href="http://ant.apache.org/bindownload.cgi"&gt;http://ant.apache.org/bindownload.cgi&lt;/a&gt;&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
				&lt;td style="color: rgb(0,0,0);font-family: Verdana , Arial , Helvetica , sans-serif;font-size: 11.0px;margin: 8.0px;"&gt;
					Apache Maven&lt;/td&gt;
				&lt;td style="color: rgb(0,0,0);font-family: Verdana , Arial , Helvetica , sans-serif;font-size: 11.0px;margin: 8.0px;"&gt;
					2.2.1 or above, preferred 3.0.3&lt;/td&gt;
				&lt;td style="color: rgb(0,0,0);font-family: Verdana , Arial , Helvetica , sans-serif;font-size: 11.0px;margin: 8.0px;"&gt;
					&lt;a href="http://maven.apache.org/download.html"&gt;http://maven.apache.org/download.html&lt;/a&gt;&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
				&lt;td style="color: rgb(0,0,0);font-family: Verdana , Arial , Helvetica , sans-serif;font-size: 11.0px;margin: 8.0px;"&gt;
					Apache Maven Ant Tasks&lt;/td&gt;
				&lt;td style="color: rgb(0,0,0);font-family: Verdana , Arial , Helvetica , sans-serif;font-size: 11.0px;margin: 8.0px;"&gt;
					2.2.1 or above&lt;/td&gt;
				&lt;td style="color: rgb(0,0,0);font-family: Verdana , Arial , Helvetica , sans-serif;font-size: 11.0px;margin: 8.0px;"&gt;
					&lt;a href="http://maven.apache.org/ant-tasks/download.html"&gt;http://maven.apache.org/ant-tasks/download.html&lt;/a&gt;&lt;/td&gt;
			&lt;/tr&gt;
		&lt;/tbody&gt;
	&lt;/table&gt;
	&lt;div class="note" style="background-color: rgb(255,255,206);border: 1.0px solid rgb(240,192,0);margin: 20.0px;padding: 0.0px 6.0px;"&gt;
		The Server distribution is not required for the subject of the article it&amp;rsquo;s preferred to have as the Liferay Plugins SDK might/will use some dependencies from the server distribution&lt;/div&gt;
	&lt;h2 id="Setup" style="font-size: 1.5em;"&gt;
		&amp;nbsp;&lt;/h2&gt;
	&lt;h3 id="Installation" style="font-size: 1.17em;"&gt;
		&lt;span style="font-size: large;"&gt;Setup and Installation&lt;/span&gt;&lt;/h3&gt;
	&lt;p&gt;
		Assuming that you have downloaded and installed the above mentioned softwares, for the sake of convenience we will use the following variable names for respective installation DIR&amp;rsquo;s,&lt;/p&gt;
	&lt;ul&gt;
		&lt;li&gt;
			&lt;b&gt;$LIFERAY_HOME&lt;/b&gt;&amp;nbsp;- the home directory where Liferay server is installed e.g. C:\lportal-6.0.6
		&lt;li&gt;
			&lt;b&gt;$LIFERAY_SDK_HOME&lt;/b&gt;&amp;nbsp;- the home directory where Liferay server is installed e.g. C:\liferay-plugins-sdk-6.0.6
		&lt;li&gt;
			&lt;b&gt;$ANT_HOME&lt;/b&gt;&amp;nbsp;- the home directory where ANT is installed e.g. C:\apache-ant-1.8.2
		&lt;li&gt;
			&lt;b&gt;$M3_HOME&lt;/b&gt;&amp;nbsp;- the home directory where Maven 2.2.x is installed e.g. C:\apache-maven-3.03
	&lt;/ul&gt;
	&lt;p&gt;
		Now copy the&amp;nbsp;&lt;b&gt;maven-ant-tasks-2.1.3.jar&lt;/b&gt;&amp;nbsp;to $ANT_HOME/lib&lt;/p&gt;
	&lt;h3 id="Implementation" style="font-size: 1.17em;"&gt;
		&lt;span style="font-size: large;"&gt;Implementation&lt;/span&gt;&lt;/h3&gt;
	&lt;p&gt;
		Let&amp;rsquo;s use the Liferay IDE to create a new Portlet plug-in look at&amp;nbsp;&lt;a href="http://www.liferay.com/community/wiki/-/wiki/Main/Plugins+SDK"&gt;Using Liferay Maven SDK&lt;/a&gt;&amp;nbsp;or you can import the attached Liferay Google Maps demo project in to your workspace,&lt;br&gt;
		Open the build.xml of the project that has been created, by default the project build template looks like&lt;/p&gt;
	&lt;pre style="font-size: 12.0px;line-height: 18.0px;font-family: Consolas , Monaco , monospace;"&gt;
&amp;nbsp;&lt;/pre&gt;
	&lt;p&gt;
		Now to Mavenize the default ANT build.xml we do the following,&lt;/p&gt;
	&lt;ol&gt;
		&lt;li&gt;
			Add the xmlns:artifact=&amp;rdquo; antlib:org.apache.maven.artifact.ant&amp;rdquo; to the element of the orginal build.xml
		&lt;li&gt;
			Create a new ant target called &amp;ldquo;copy-dependencies&amp;rdquo;, this step is crucial, you can have any name for the target but then what the target does is important. This target will download (only time only) and copy the dependencies to docroot/WEB-INF/lib folder
		&lt;li&gt;
			Add an ant call to &amp;ldquo;deploy&amp;rdquo; target within the &amp;ldquo;copy-dependencies&amp;rdquo;, this will enable the build.xml to follow the default Portlet application building and deploying post copying the dependencies
		&lt;li&gt;
			Make the copy dependencies as the default target for the project
	&lt;/ol&gt;
	&lt;p&gt;
		A example of build.xml with above configurations is available&amp;nbsp;&lt;a href="https://gist.github.com/1119898"&gt;here&lt;/a&gt;&lt;/p&gt;
	&lt;pre style="font-size: 12.0px;line-height: 18.0px;font-family: Consolas , Monaco , monospace;"&gt;
&amp;nbsp;&lt;/pre&gt;
	&lt;p&gt;
		Observe the&amp;nbsp;&lt;i&gt;artifact:dependencies&lt;/i&gt;&amp;nbsp;task portions those are important pieces of mavenizing our ant build. We add the dependencies to the project the same way we add them in Maven pom.xml with little bit of variation to the syntax.&lt;/p&gt;
	&lt;p&gt;
		After this once you execute the build in Portlets plug-in directory, it will first download the dependency jars if it does not exist in to the local Maven repository and they will added to the&amp;nbsp;&lt;i&gt;docroot/WEB-INF/lib&lt;/i&gt;&amp;nbsp;directory when&amp;nbsp;&lt;i&gt;copy-dependencies&lt;/i&gt;&amp;nbsp;target is called, which also includes call to the Liferay default&amp;nbsp;&lt;i&gt;deploy&lt;/i&gt;&amp;nbsp;target&lt;/p&gt;
	&lt;p&gt;
		Voila! Now we are able to use the Maven dependency management with Liferay Plugins SDK default Ant build system. I hope this article has helped you, for further reading you can check the following links,&lt;/p&gt;
&lt;/div&gt;
&lt;ul style="color: rgb(51,51,51);font-family: Georgia , &amp;quot;Times New Roman&amp;quot; , &amp;quot;Bitstream Charter&amp;quot; , Times , serif;font-size: 13.0px;line-height: 19.0px;"&gt;
	&lt;li&gt;
		&lt;a href="http://maven.apache.org/ant-tasks/index.html"&gt;Maven Ant Tasks Documentation&lt;/a&gt;
	&lt;li&gt;
		&lt;a href="http://www.liferay.com/community/wiki/-/wiki/Main/Liferay+Maven+SDK"&gt;Liferay Maven SDK&lt;/a&gt;
&lt;/ul&gt;</summary>
    <dc:creator>Kamesh Sampath</dc:creator>
    <dc:date>2013-05-14T04:27:21Z</dc:date>
  </entry>
  <entry>
    <title>HOW-TO Clear Liferay Cache</title>
    <link rel="alternate" href="http://www.liferay.com/c/blogs/find_entry?entryId=24695828" />
    <author>
      <name>Kamesh Sampath</name>
    </author>
    <id>http://www.liferay.com/c/blogs/find_entry?entryId=24695828</id>
    <updated>2013-05-14T04:26:24Z</updated>
    <published>2013-05-14T04:26:13Z</published>
    <summary type="html">&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;
&lt;p style="color: rgb(51,51,51);font-family: Georgia , &amp;quot;Times New Roman&amp;quot; , &amp;quot;Bitstream Charter&amp;quot; , Times , serif;font-size: 13.0px;line-height: 19.0px;"&gt;
	I was learning on how to implement the &amp;nbsp;export and import functionality on Liferay, initially I thought it to be rather a tedious job but thanks to Liferay API/Framework which made my job easier with&amp;nbsp;&lt;a href="http://www.liferay.com/community/wiki/-/wiki/Main/Portlet+DataHandlers" target="_blank" title="Liferay Portlet Data Handlers"&gt;Liferay Portlet Data Handlers&lt;/a&gt;&amp;nbsp;thanks to&amp;nbsp;&lt;a href="http://www.liferay.com/web/jorge.ferrer"&gt;Jorge Ferrer&lt;/a&gt;&amp;nbsp;who gave me an insight to the API/Framework and how to use the same. All I was required to do is just create a class that extends from BasePortletDataHandler and have it configured via the liferay-portlet.xml&lt;/p&gt;
&lt;p style="color: rgb(51,51,51);font-family: Georgia , &amp;quot;Times New Roman&amp;quot; , &amp;quot;Bitstream Charter&amp;quot; , Times , serif;font-size: 13.0px;line-height: 19.0px;"&gt;
	But this activity lead to an&amp;nbsp;interesting&amp;nbsp;learning,&amp;nbsp;initially&amp;nbsp;when I implemented this I saw that data was getting exported/imported without any errors but then I see that its not refreshing the UI immediately after the import. This kind of annoyed me for long time .. thanks to&amp;nbsp;&lt;a href="http://www.liferay.com/web/raymond.auge" target="_blank"&gt;Raymond Auge&lt;/a&gt;&amp;nbsp;for is timely insight that we need to clear the cache for the same to be refreshed.. so started my next task on hunting the class which can do the job..&lt;/p&gt;
&lt;p style="color: rgb(51,51,51);font-family: Georgia , &amp;quot;Times New Roman&amp;quot; , &amp;quot;Bitstream Charter&amp;quot; , Times , serif;font-size: 13.0px;line-height: 19.0px;"&gt;
	The initial analysis started with me doing the manual task of clearing the caches via the Portal Control Panel using the&amp;nbsp;&lt;strong&gt;Server Administration --&amp;gt; Resources (tab) --&amp;gt; Actions panel&amp;nbsp;&lt;/strong&gt;where we have the action buttons that will clear the cache held by Database, Virtual Machine both local and clustered... &amp;nbsp;when i did this sequence of actions after my Import, i see the data getting refreshed instantly.. &amp;nbsp;so whats next ? finding out the class that did these jobs, when back tracing from the Server Admin page i landed up in the class EditServerAction, there I got the following three sweet little methods that can do the job for me,&lt;/p&gt;
&lt;ul style="color: rgb(51,51,51);font-family: Georgia , &amp;quot;Times New Roman&amp;quot; , &amp;quot;Bitstream Charter&amp;quot; , Times , serif;font-size: 13.0px;line-height: 19.0px;"&gt;
	&lt;li&gt;
		CacheRegistryUtil.clear() &amp;nbsp;- &amp;nbsp;to clear all the Database caches
	&lt;li&gt;
		MultiVMPoolUtil.clear() &amp;nbsp; &amp;nbsp;- clearing cache across JVM clusters
	&lt;li&gt;
		WebCachePoolUtil.clear() - clearing cache in Single VM
&lt;/ul&gt;
&lt;p style="color: rgb(51,51,51);font-family: Georgia , &amp;quot;Times New Roman&amp;quot; , &amp;quot;Bitstream Charter&amp;quot; , Times , serif;font-size: 13.0px;line-height: 19.0px;"&gt;
	All left with me post this findings is that i need to call the required or all methods post my successful import of the data to clear the required caches...&lt;/p&gt;</summary>
    <dc:creator>Kamesh Sampath</dc:creator>
    <dc:date>2013-05-14T04:26:13Z</dc:date>
  </entry>
  <entry>
    <title>Using liferay-ui:search-toggle - with Basic or Advanced Search only</title>
    <link rel="alternate" href="http://www.liferay.com/c/blogs/find_entry?entryId=24695738" />
    <author>
      <name>Kamesh Sampath</name>
    </author>
    <id>http://www.liferay.com/c/blogs/find_entry?entryId=24695738</id>
    <updated>2013-05-14T04:15:25Z</updated>
    <published>2013-05-14T04:12:43Z</published>
    <summary type="html">&lt;div style="text-align: left;"&gt;
	&lt;div class="ExternalClassEA83C0DB4A3E4DCD9153C70F962ED239"&gt;
		&lt;p style="color: rgb(51,51,51);font-family: Georgia , &amp;quot;Times New Roman&amp;quot; , &amp;quot;Bitstream Charter&amp;quot; , Times , serif;font-size: 13.0px;line-height: 19.0px;"&gt;
			&amp;nbsp;I was using&amp;nbsp;&lt;strong&gt;&amp;lt;liferay-ui:search-toggle&amp;gt;&lt;/strong&gt;&amp;nbsp;tag, and my requirement was to to show only advanced search and no basic search. but by default &amp;lt;liferay-ui:search-toggle&amp;gt; will show basic search unless and until user clicks the advanced search atleast once. I tried all possible ways and finally found the solution, this what i did to make my&amp;nbsp;&lt;strong&gt;&amp;lt;liferay-ui:search-toggle&amp;gt;&lt;/strong&gt;show only &amp;quot;Advanced Search&amp;quot; without &amp;quot;Basic&amp;quot; search toggle link.So what we need to do is,&lt;/p&gt;
		&lt;ol style="color: rgb(51,51,51);font-family: Georgia , &amp;quot;Times New Roman&amp;quot; , &amp;quot;Bitstream Charter&amp;quot; , Times , serif;font-size: 13.0px;line-height: 19.0px;"&gt;
			&lt;li&gt;
				We need to override the isAdvancedSearch method of the XDisplayTerms class to always return true, where &amp;quot;X&amp;quot; your class prefix e.g.ArticleDisplayTerms which extends form&amp;nbsp;&lt;strong&gt;com.liferay.portal.kernel.dao.search.DisplayTerms&lt;/strong&gt;
			&lt;li&gt;
				Update your *_search.jsp which has the &amp;lt;liferay-ui:search-toggle&amp;gt; with the following piece of code
		&lt;/ol&gt;
		&lt;table class="mceItemTable" style="cursor: default;font-family: Georgia , &amp;quot;Times New Roman&amp;quot; , &amp;quot;Bitstream Charter&amp;quot; , Times , serif;"&gt;
			&lt;tbody&gt;
				&lt;tr&gt;
					&lt;td style="color: rgb(0,0,0);font-family: Verdana , Arial , Helvetica , sans-serif;font-size: 11.0px;margin: 8.0px;"&gt;
						&amp;nbsp;&lt;/td&gt;
					&lt;td style="color: rgb(0,0,0);font-family: Verdana , Arial , Helvetica , sans-serif;font-size: 11.0px;margin: 8.0px;"&gt;
						&amp;nbsp;&lt;/td&gt;
					&lt;td style="color: rgb(0,0,0);font-family: Verdana , Arial , Helvetica , sans-serif;font-size: 11.0px;margin: 8.0px;"&gt;
						&lt;blockquote class="tr_bq"&gt;
							&lt;pre&gt;
&amp;lt;style type=&amp;quot;text/css&amp;quot;&amp;gt; &amp;nbsp; 
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.toggle-link {display: none;}
&amp;lt;/style&amp;gt;&lt;/pre&gt;
						&lt;/blockquote&gt;
						&lt;p&gt;
							This style overriding will prevent the &amp;quot;&lt;strong&gt;&amp;lt;&amp;lt;Basic&lt;/strong&gt;&amp;quot; search link form being displayed, the next piece of&amp;nbsp; code snippet will make the &amp;quot;Advanced&amp;quot; search displayed by default, we are a kind of triggering the Search link click&lt;br&gt;
							....&lt;br&gt;
							String key = &amp;quot;&amp;lt;replace with the id of your &amp;lt;liferay-ui:search-toggle&amp;gt; tag&amp;quot;;&lt;br&gt;
							SessionClicks.put(request, key,&amp;quot;advanced&amp;quot;);&lt;br&gt;
							.....&lt;/p&gt;
					&lt;/td&gt;
				&lt;/tr&gt;
			&lt;/tbody&gt;
		&lt;/table&gt;
		&lt;p style="color: rgb(51,51,51);font-family: Georgia , &amp;quot;Times New Roman&amp;quot; , &amp;quot;Bitstream Charter&amp;quot; , Times , serif;font-size: 13.0px;line-height: 19.0px;"&gt;
			The key piece of code which does sends signal to the underlying liferay code to show only&amp;nbsp;&lt;strong&gt;&amp;quot;advanced&amp;quot;&amp;nbsp;&lt;/strong&gt;is SessionClicks.put(request, key,&amp;quot;&lt;strong&gt;advanced&amp;quot;&lt;/strong&gt;);&lt;/p&gt;
		&lt;p style="color: rgb(51,51,51);font-family: Georgia , &amp;quot;Times New Roman&amp;quot; , &amp;quot;Bitstream Charter&amp;quot; , Times , serif;font-size: 13.0px;line-height: 19.0px;"&gt;
			The same could be achieved when we want to display only basic search and no advanced search just by changing the &amp;quot;advanced&amp;quot; --&amp;gt; &amp;quot;basic&amp;quot;&lt;/p&gt;
		&lt;p style="color: rgb(51,51,51);font-family: Georgia , &amp;quot;Times New Roman&amp;quot; , &amp;quot;Bitstream Charter&amp;quot; , Times , serif;font-size: 13.0px;line-height: 19.0px;"&gt;
			That is it, once we have done with this our &amp;lt;liferay-ui:search-toggle&amp;gt; will always display only &amp;quot;Advanced&amp;quot;&amp;nbsp; or &amp;nbsp;&amp;quot;Basic&amp;quot; search&lt;/p&gt;
	&lt;/div&gt;
&lt;/div&gt;</summary>
    <dc:creator>Kamesh Sampath</dc:creator>
    <dc:date>2013-05-14T04:12:43Z</dc:date>
  </entry>
  <entry>
    <title>Liferay Portal 6.1-CE on JBoss AS71</title>
    <link rel="alternate" href="http://www.liferay.com/c/blogs/find_entry?entryId=24695685" />
    <author>
      <name>Kamesh Sampath</name>
    </author>
    <id>http://www.liferay.com/c/blogs/find_entry?entryId=24695685</id>
    <updated>2013-05-14T04:11:38Z</updated>
    <published>2013-05-14T04:09:22Z</published>
    <summary type="html">&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;
&lt;p&gt;
	After setting up Liferay Portal 6.1-CE on &amp;nbsp;JBoss AS7 based in this&amp;nbsp;&lt;a href="http://www.liferay.com/community/forums/-/message_boards/message/10722459" target="_blank"&gt;post&lt;/a&gt;, &amp;nbsp;i thought it was a piece of cake to deploy Liferay Portal 6.1-CE on&amp;nbsp;&lt;a href="http://www.jboss.org/jbossas" target="_blank"&gt;JBoss AS7.1&lt;/a&gt;(Thunder) but not until i found that we need to do few more updates rather changes to Liferay 6.1-JBoss CE bundle.&lt;/p&gt;
&lt;p&gt;
	Here is the list of what we need to do,&lt;/p&gt;
&lt;p&gt;
	$JBOSS_70_HOME - refers to the Liferay 6.1-CE JBoss AS 7.0.2 directory or any JBoss AS 7.0.2 directory where you have deployed Liferay Portal&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;
		&lt;strong&gt;Liferay Modules&lt;/strong&gt;&amp;nbsp;-- Check the $JBOSS_70_HOME/modules/com/liferay/portal/main/module.xml you will see&amp;nbsp;&lt;strong&gt;urn:jboss:module:1.0&lt;/strong&gt;,the we need to update to&amp;nbsp;&lt;strong&gt;urn:jboss:module:1.1,&amp;nbsp;&lt;/strong&gt;once one we can copy it to the $JBOSS71_HOME/modules directory
	&lt;li&gt;
		You need to repeat this for any additonal modules that you might have deployed to the JBOSSAS_70 JBoss Portal bundle
	&lt;li&gt;
		Deployment Structure (optional) -- Based on this&amp;nbsp;&lt;a href="https://community.jboss.org/message/638335" target="_blank"&gt;AS71 post&lt;/a&gt;, I understood that JBoss AS71 does not export the system module, but if we check&amp;nbsp; $JBOSS71_HOME/standalone/deployments/ROOT.war/WEB-INF/jboss-deployment-structure.xml you will see an dependency as follows,
&lt;/ol&gt;
&lt;div style="text-align: center;"&gt;
	&lt;div style="color: rgb(51,51,51);font-family: Georgia , &amp;quot;Times New Roman&amp;quot; , &amp;quot;Bitstream Charter&amp;quot; , Times , serif;font-size: 13.0px;line-height: 19.0px;text-align: justify;"&gt;
		&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;module name=&amp;quot;system&amp;quot; export=&amp;quot;false&amp;quot;&amp;gt;&lt;/div&gt;
	&lt;div style="color: rgb(51,51,51);font-family: Georgia , &amp;quot;Times New Roman&amp;quot; , &amp;quot;Bitstream Charter&amp;quot; , Times , serif;font-size: 13.0px;line-height: 19.0px;text-align: justify;"&gt;
		&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;imports&amp;gt;&lt;/div&gt;
	&lt;div style="color: rgb(51,51,51);font-family: Georgia , &amp;quot;Times New Roman&amp;quot; , &amp;quot;Bitstream Charter&amp;quot; , Times , serif;font-size: 13.0px;line-height: 19.0px;text-align: justify;"&gt;
		&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;include path=&amp;quot;com/sun/jmx&amp;quot;/&amp;gt;&lt;/div&gt;
	&lt;div style="color: rgb(51,51,51);font-family: Georgia , &amp;quot;Times New Roman&amp;quot; , &amp;quot;Bitstream Charter&amp;quot; , Times , serif;font-size: 13.0px;line-height: 19.0px;text-align: justify;"&gt;
		&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;exclude path=&amp;quot;/**&amp;quot; /&amp;gt;&lt;/div&gt;
	&lt;div style="color: rgb(51,51,51);font-family: Georgia , &amp;quot;Times New Roman&amp;quot; , &amp;quot;Bitstream Charter&amp;quot; , Times , serif;font-size: 13.0px;line-height: 19.0px;text-align: justify;"&gt;
		&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/imports&amp;gt;&lt;/div&gt;
	&lt;div style="color: rgb(51,51,51);font-family: Georgia , &amp;quot;Times New Roman&amp;quot; , &amp;quot;Bitstream Charter&amp;quot; , Times , serif;font-size: 13.0px;line-height: 19.0px;text-align: justify;"&gt;
		&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/module&amp;gt;&lt;/div&gt;
	&lt;div style="color: rgb(51,51,51);font-family: Georgia , &amp;quot;Times New Roman&amp;quot; , &amp;quot;Bitstream Charter&amp;quot; , Times , serif;font-size: 13.0px;line-height: 19.0px;text-align: left;"&gt;
		&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Just remove or comment that entry&lt;/div&gt;
	&lt;div style="color: rgb(51,51,51);font-family: Georgia , &amp;quot;Times New Roman&amp;quot; , &amp;quot;Bitstream Charter&amp;quot; , Times , serif;font-size: 13.0px;line-height: 19.0px;text-align: left;"&gt;
		&amp;nbsp;&lt;/div&gt;
	&lt;div style="color: rgb(51,51,51);font-family: Georgia , &amp;quot;Times New Roman&amp;quot; , &amp;quot;Bitstream Charter&amp;quot; , Times , serif;font-size: 13.0px;line-height: 19.0px;text-align: left;"&gt;
		And that's it once we do that and try redeploying the ROOT.war (rename the ROOT.war.failed --&amp;gt; ROOT.war.dodeploy) will trigger the deployment.&lt;/div&gt;
&lt;/div&gt;</summary>
    <dc:creator>Kamesh Sampath</dc:creator>
    <dc:date>2013-05-14T04:09:22Z</dc:date>
  </entry>
  <entry>
    <title>How-To implement Pagination in Liferay</title>
    <link rel="alternate" href="http://www.liferay.com/c/blogs/find_entry?entryId=24695623" />
    <author>
      <name>Kamesh Sampath</name>
    </author>
    <id>http://www.liferay.com/c/blogs/find_entry?entryId=24695623</id>
    <updated>2013-05-14T04:07:56Z</updated>
    <published>2013-05-14T04:00:33Z</published>
    <summary type="html">&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;
&lt;div style="clear: both;"&gt;
	&lt;span style="line-height: 1.5;"&gt;Liferay provides&amp;nbsp; a rich set of tag libraries that can help in implementing certain complex functionalities like search container, pagination etc.,&amp;nbsp; with few lines of code. In this blog let&amp;rsquo;s see how we can implement the same.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	For the demo purposed I used the following technical platform,&lt;/div&gt;
&lt;ul&gt;
	&lt;li&gt;
		&amp;nbsp;&amp;nbsp;Liferay Portal v6.1.CE (beta)
	&lt;li&gt;
		&amp;nbsp;Liferay Portal SDK v6.1.CE
	&lt;li&gt;
		&amp;nbsp;Apache Ant&amp;nbsp; 1.8.2
	&lt;li&gt;
		&amp;nbsp;RHEL 6.1 (Windows could also be used)
	&lt;li&gt;
		&amp;nbsp;Eclipse IDE 3.7.1 with&amp;nbsp;&lt;a href="http://www.liferay.com/downloads/liferay-projects/liferay-ide"&gt;Liferay IDE&lt;/a&gt;
&lt;/ul&gt;
&lt;h1&gt;
	Use case&lt;/h1&gt;
&lt;div&gt;
	This demo uses a very simple use case of displaying 200 list items of type ListItemModel, the ListItemModel is the model class as shown below,&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;table align="center" cellpadding="0" cellspacing="0"&gt;
	&lt;tbody&gt;
		&lt;tr&gt;
			&lt;td style="text-align: center;"&gt;
				&lt;a href="http://workspace7.files.wordpress.com/2012/05/listitemmodel_class.png?w=92"&gt;&lt;img alt="" border="0" src="http://workspace7.files.wordpress.com/2012/05/listitemmodel_class.png?w=92"&gt;&lt;/a&gt;&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td style="text-align: center;"&gt;
				ListItemModel.java&lt;/td&gt;
		&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;div align="center"&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div align="center"&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	This model class holds the item its id, name and description.&amp;nbsp; The application will build a Portlet that will display the Model List items with pagination as shown below,&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;table align="center" cellpadding="0" cellspacing="0"&gt;
	&lt;tbody&gt;
		&lt;tr&gt;
			&lt;td style="text-align: center;"&gt;
				&lt;a href="http://workspace7.files.wordpress.com/2012/05/pagination_img.png"&gt;&lt;img alt="" border="0" height="130" src="http://workspace7.files.wordpress.com/2012/05/pagination_img.png?w=300" width="320"&gt;&lt;/a&gt;&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td style="text-align: center;"&gt;
				PaginationDemoPortlet&lt;/td&gt;
		&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	The user should be able to paginate across 200 records with 10 records on each page with&amp;nbsp;&lt;strong&gt;Previous&lt;/strong&gt;,&amp;nbsp;&lt;strong&gt;Next&lt;/strong&gt;,&amp;nbsp;&lt;strong&gt;First&amp;nbsp;&lt;/strong&gt;and&amp;nbsp;&lt;strong&gt;Last&amp;nbsp;&lt;/strong&gt;options.&lt;/div&gt;
&lt;h1&gt;
	Implementation&lt;/h1&gt;
&lt;div&gt;
	To achieve the use case the application uses a small DAO utility class called Pagination Utility, this class will help in Querying for the records from the back end (here its mock objects), the PaginationUtlity class has only one method called getListItems(int&amp;nbsp; n) that will return &amp;lsquo;&lt;strong&gt;n&amp;rsquo;&lt;/strong&gt;&amp;nbsp;list items. The PaginationUtility class is shown below,&lt;/div&gt;
&lt;div align="center"&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;table align="center" cellpadding="0" cellspacing="0"&gt;
	&lt;tbody&gt;
		&lt;tr&gt;
			&lt;td style="text-align: center;"&gt;
				&lt;a href="http://workspace7.files.wordpress.com/2012/05/paginationutility_class.png?w=133"&gt;&lt;img alt="" border="0" src="http://workspace7.files.wordpress.com/2012/05/paginationutility_class.png?w=133"&gt;&lt;/a&gt;&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td style="text-align: center;"&gt;
				PaginationUtility.java&lt;/td&gt;
		&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;div align="center"&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div align="center"&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	The following steps shows how to implement the Pagination using&amp;nbsp;&lt;strong&gt;liferay-ui&lt;/strong&gt;&amp;nbsp;&lt;a href="http://www.blogger.com/post-create.g?blogID=3010720615130522764#_ftn1" name="_ftnref1" title=""&gt;&lt;span&gt;[1]&lt;/span&gt;&lt;/a&gt;&amp;nbsp;tag, typically the code of the view page.&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;ol&gt;
	&lt;li&gt;
		&lt;span style="line-height: 1.5;"&gt;The first and fore most step is to define the pagination container, the&amp;nbsp;&lt;/span&gt;&lt;strong style="line-height: 1.5;"&gt;liferay-ui&lt;/strong&gt;&lt;span style="line-height: 1.5;"&gt;&amp;nbsp;1tag provides a the&amp;nbsp;&lt;/span&gt;&lt;strong style="line-height: 1.5;"&gt;search-container&lt;/strong&gt;&lt;span style="line-height: 1.5;"&gt;1&amp;nbsp;tag which could be used to initialize the container&lt;/span&gt;
&lt;/ol&gt;
&lt;div style="margin-left: 40.0px;"&gt;
	&lt;span&gt;&amp;lt;liferay-ui:search-container emptyResultsMessage=&amp;quot;there-are-no-items&amp;quot; delta=&amp;quot;10&amp;quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border="1" cellpadding="0" cellspacing="0"&gt;
	&lt;tbody&gt;
		&lt;tr&gt;
			&lt;td style="width: 142.0px;"&gt;
				&lt;div style="margin-left: 40.0px;"&gt;
					&lt;strong&gt;&lt;span&gt;Parameter&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;
			&lt;/td&gt;
			&lt;td style="width: 319.0px;"&gt;
				&lt;div style="margin-left: 40.0px;"&gt;
					&lt;strong&gt;&lt;span&gt;Description&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td style="width: 142.0px;"&gt;
				&lt;div style="margin-left: 40.0px;"&gt;
					&lt;strong&gt;emptyResultsMessage&lt;/strong&gt;&lt;/div&gt;
			&lt;/td&gt;
			&lt;td style="width: 319.0px;"&gt;
				&lt;div style="margin-left: 40.0px;"&gt;
					Used to display the message to the user when no records are found, a resource bundle key could be specified for internationalization&lt;/div&gt;
				&lt;div style="margin-left: 40.0px;"&gt;
					&amp;nbsp;&lt;/div&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td style="width: 142.0px;"&gt;
				&lt;div style="margin-left: 40.0px;"&gt;
					&lt;strong&gt;delta&lt;/strong&gt;&lt;/div&gt;
			&lt;/td&gt;
			&lt;td style="width: 319.0px;"&gt;
				&lt;div style="margin-left: 40.0px;"&gt;
					the default number of items that needs to be displayed on the page&lt;/div&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;ol style=""&gt;
	&lt;li&gt;
		The next step is to manipulate&amp;nbsp; the result and set the same in pageContext of the JSP page, this is done using the liferay-ui&amp;rsquo;s&amp;nbsp;&lt;strong&gt;search-container-results&lt;/strong&gt;1, &amp;nbsp;when manipulating the result we need to set the following pageContext variables to enable the Liferay-ui tag to process and display them,
&lt;/ol&gt;
&lt;div style="margin-left: 1.25in;"&gt;
	a.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;strong&gt;results&lt;/strong&gt;&amp;nbsp;&amp;ndash; the variable that will hold the subList of the entire result set with its start determined by searchContainer.getStart() and end determined by searchContainer.getEnd(), where&amp;nbsp;&lt;strong&gt;searchContainer&lt;/strong&gt;&amp;nbsp;is an implicit variable available to the page context after Step #1&lt;/div&gt;
&lt;div style="margin-left: 1.25in;"&gt;
	b.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;strong&gt;total&amp;nbsp;&lt;/strong&gt;&amp;ndash; The total result set size , in our case 200&lt;/div&gt;
&lt;table border="1" cellpadding="0" cellspacing="0"&gt;
	&lt;tbody&gt;
		&lt;tr&gt;
			&lt;td style="width: 638.0px;"&gt;
				&lt;div style="margin-left: 40.0px;"&gt;
					&lt;span&gt;&amp;lt;liferay-ui:search-container-results&amp;gt;&lt;/span&gt;&lt;/div&gt;
				&lt;div&gt;
					&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;%&lt;/div&gt;
				&lt;div&gt;
					&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; List&amp;lt;ListItemModel&amp;gt; tempResults = PaginationUtil&lt;/div&gt;
				&lt;div&gt;
					&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .getListItems(200);&lt;/div&gt;
				&lt;div&gt;
					&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; results = ListUtil.subList(tempResults,&lt;/div&gt;
				&lt;div&gt;
					&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; searchContainer.getStart(),&lt;/div&gt;
				&lt;div&gt;
					&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; searchContainer.getEnd());&lt;/div&gt;
				&lt;div&gt;
					&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; total = tempResults.size();&lt;/div&gt;
				&lt;div&gt;
					&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span&gt;pageContext.setAttribute(&amp;quot;results&amp;quot;, results);&lt;/span&gt;&lt;/div&gt;
				&lt;div&gt;
					&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span&gt;pageContext.setAttribute(&amp;quot;total&amp;quot;, total);&lt;/span&gt;&lt;/div&gt;
				&lt;div&gt;
					&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %&amp;gt;&lt;/div&gt;
				&lt;div style="margin-left: 40.0px;"&gt;
					&lt;span&gt;&amp;lt;/liferay-ui:search-container-results&amp;gt;&lt;/span&gt;&lt;/div&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;ol style=""&gt;
	&lt;li&gt;
		The third step of the implementation is to define the result row which is done using the liferay-ui&amp;rsquo;s&amp;nbsp;&lt;strong&gt;search-container-row&lt;/strong&gt;&amp;nbsp; tag, this tag takes the following parameters,
&lt;/ol&gt;
&lt;div style="margin-left: 45.0pt;"&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;table border="1" cellpadding="0" cellspacing="0"&gt;
	&lt;tbody&gt;
		&lt;tr&gt;
			&lt;td style="width: 142.0px;"&gt;
				&lt;div style="margin-left: 40.0px;"&gt;
					&lt;strong&gt;&lt;span&gt;Parameter&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;
			&lt;/td&gt;
			&lt;td style="width: 422.0px;"&gt;
				&lt;div style="margin-left: 40.0px;"&gt;
					&lt;strong&gt;&lt;span&gt;Description&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td style="width: 142.0px;"&gt;
				&lt;div style="margin-left: 40.0px;"&gt;
					&lt;strong&gt;className&lt;/strong&gt;&lt;/div&gt;
			&lt;/td&gt;
			&lt;td style="width: 422.0px;"&gt;
				&lt;div style="margin-left: 40.0px;"&gt;
					The model class that is contained in the result set returned by the PaginationUtil&lt;/div&gt;
				&lt;div style="margin-left: 40.0px;"&gt;
					&amp;nbsp;&lt;/div&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td style="width: 142.0px;"&gt;
				&lt;div style="margin-left: 40.0px;"&gt;
					&lt;strong&gt;keyProperty&lt;/strong&gt;&lt;/div&gt;
			&lt;/td&gt;
			&lt;td style="width: 422.0px;"&gt;
				&lt;div style="margin-left: 40.0px;"&gt;
					The primary key or unique key property that will be used or passed to various actions&lt;/div&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td style="width: 142.0px;"&gt;
				&lt;div style="margin-left: 40.0px;"&gt;
					&lt;strong&gt;modelVar&lt;/strong&gt;&lt;/div&gt;
			&lt;/td&gt;
			&lt;td style="width: 422.0px;"&gt;
				&lt;div style="margin-left: 40.0px;"&gt;
					The temporary variable where the current resultset object will be stored, typically an instance of&amp;nbsp;&lt;strong&gt;className&lt;/strong&gt;&lt;/div&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;div style="margin-left: 45.0pt;"&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;table border="1" cellpadding="0" cellspacing="0" style="width: 578.0px;"&gt;
	&lt;tbody&gt;
		&lt;tr&gt;
			&lt;td style="width: 578.0px;"&gt;
				&lt;div style="margin-left: 40.0px;"&gt;
					&amp;lt;liferay-ui:search-container-row&lt;/div&gt;
				&lt;div style="margin-left: 40.0px;"&gt;
					&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span&gt;className&lt;/span&gt;=&amp;quot;com.accenture.icos.demo.portlets.ListItemModel&amp;quot;&lt;/div&gt;
				&lt;div style="margin-left: 40.0px;"&gt;
					&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span&gt;keyProperty&lt;/span&gt;=&amp;quot;id&amp;quot;&amp;nbsp;&lt;span&gt;modelVar&lt;/span&gt;=&amp;quot;listItemModel&amp;quot;&amp;gt;&lt;/div&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;div style="margin-left: 45.0pt;"&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;ol&gt;
	&lt;li&gt;
		&amp;nbsp;The fourth step of the implementation is to define the columns that will be displayed in the resulting table, this is done using the liferay-ui&amp;rsquo;s&amp;nbsp;&lt;strong&gt;search-container-column-text&lt;/strong&gt;&lt;a href="http://www.blogger.com/post-create.g?blogID=3010720615130522764#_ftn1" name="_ftnref1" title=""&gt;&lt;span&gt;[1]&lt;/span&gt;&lt;/a&gt;&amp;nbsp;&amp;nbsp;this tag takes the following two properties,
&lt;/ol&gt;
&lt;table border="1" cellpadding="0" cellspacing="0"&gt;
	&lt;tbody&gt;
		&lt;tr&gt;
			&lt;td style="width: 142.0px;"&gt;
				&lt;div style="margin-left: 40.0px;"&gt;
					&lt;strong&gt;&lt;span&gt;Parameter&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;
			&lt;/td&gt;
			&lt;td style="width: 422.0px;"&gt;
				&lt;div style="margin-left: 40.0px;"&gt;
					&lt;strong&gt;&lt;span&gt;Description&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td style="width: 142.0px;"&gt;
				&lt;div style="margin-left: 40.0px;"&gt;
					&lt;strong&gt;name&lt;/strong&gt;&lt;/div&gt;
			&lt;/td&gt;
			&lt;td style="width: 422.0px;"&gt;
				&lt;div style="margin-left: 40.0px;"&gt;
					The HTML name attribute for the table column&lt;/div&gt;
				&lt;div style="margin-left: 40.0px;"&gt;
					&amp;nbsp;&lt;/div&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td style="width: 142.0px;"&gt;
				&lt;div style="margin-left: 40.0px;"&gt;
					&lt;strong&gt;property&lt;/strong&gt;&lt;/div&gt;
			&lt;/td&gt;
			&lt;td style="width: 422.0px;"&gt;
				&lt;div style="margin-left: 40.0px;"&gt;
					The model property form which the value of the column needs to be set&lt;/div&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;div style="margin-left: 45.0pt;"&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;table align="center" border="1" cellpadding="0" cellspacing="0"&gt;
	&lt;tbody&gt;
		&lt;tr&gt;
			&lt;td style="width: 638.0px;"&gt;
				&lt;div style="margin-left: 40.0px;"&gt;
					&amp;lt;liferay-ui:search-container-column-text&amp;nbsp;&lt;span&gt;name&lt;/span&gt;=&amp;quot;id&amp;quot;&amp;nbsp;&lt;span&gt;property&lt;/span&gt;=&amp;quot;id&amp;quot; /&amp;gt;&lt;/div&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;div style="margin-left: 45.0pt;"&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;ol style=""&gt;
	&lt;li&gt;
		The last and final step of the implementation is to define the paginator element of the results which will help in navigating across pages typically First, Next, Previous, Last etc., &amp;nbsp;this is done using the liferay-ui&amp;rsquo;s&amp;nbsp;&amp;nbsp;&lt;strong&gt;search-container-row&lt;/strong&gt;&lt;a href="http://www.blogger.com/post-create.g?blogID=3010720615130522764#_ftn1" name="_ftnref1" title=""&gt;&lt;span&gt;[1]&lt;/span&gt;&lt;/a&gt;
&lt;/ol&gt;
&lt;table border="1" cellpadding="0" cellspacing="0"&gt;
	&lt;tbody&gt;
		&lt;tr&gt;
			&lt;td style="width: 638.0px;"&gt;
				&lt;div style="margin-left: 40.0px;"&gt;
					&amp;lt;/liferay-ui:search-container-row&amp;gt;&lt;/div&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	&lt;div id="ftn1"&gt;
		&lt;div style="margin-left: 45.0pt;"&gt;
			&lt;a href="http://www.blogger.com/post-create.g?blogID=3010720615130522764#_ftnref1" name="_ftn1" title=""&gt;&lt;span&gt;[1]&lt;/span&gt;&lt;/a&gt;&amp;nbsp;&lt;em&gt;&lt;span&gt;The tag libraries used above also take certain other parameters, which can be used on need basis for further details please consult the Liferay TLD documentation&lt;/span&gt;&lt;/em&gt;&lt;/div&gt;
		&lt;div&gt;
			&amp;nbsp;&lt;/div&gt;
	&lt;/div&gt;
&lt;/div&gt;</summary>
    <dc:creator>Kamesh Sampath</dc:creator>
    <dc:date>2013-05-14T04:00:33Z</dc:date>
  </entry>
  <entry>
    <title>Using Liferay Portal 6.1 Published in Print</title>
    <link rel="alternate" href="http://www.liferay.com/c/blogs/find_entry?entryId=24687128" />
    <author>
      <name>Richard Sezov</name>
    </author>
    <id>http://www.liferay.com/c/blogs/find_entry?entryId=24687128</id>
    <updated>2013-05-13T20:48:02Z</updated>
    <published>2013-05-13T20:42:55Z</published>
    <summary type="html">&lt;p&gt;
	I am pleased to announce the immediate availability of the &lt;a href="http://www.lulu.com/shop/rich-sezov/using-liferay-portal-61/paperback/product-21014853.html"&gt;print edition&lt;/a&gt; of &lt;em&gt;Using Liferay Portal 6.1&lt;/em&gt;! For those of you on your toes (and you know who you are), it's actually been available since Friday, but who reads a blog entry that is published on Friday afternoon?&lt;/p&gt;
&lt;p&gt;
	&lt;img alt="Using Liferay Portal Cover" src="http://www.liferay.com/documents/29543/11321643/using-liferay-portal-cover.jpg/8698e0da-c2dc-44b3-a6e9-87928d348954?t=1368477806076" style="width: 400.0px;height: 533.0px;"&gt;&lt;/p&gt;
&lt;p&gt;
	It's a big book. We're getting close to 700 pages now in print, and that does &lt;em&gt;not&lt;/em&gt; include the properties reference, which we think is better as an online reference than stuffed into the book (plus, we can lower the price if we excise those pages). I want to acknowledge the hard work of Liferay's Knowledge Management team for a job well done: Jim Hinkey, Stephen Kostas, Jesse Rao, and Cody Hoag. In addition to these guys, some other key contributors include James Falkner, Bruno Farache, Michael Han, Jeffrey Handa, Mark Healy, and Jonathon Omahen.&lt;/p&gt;
&lt;p&gt;
	&lt;img alt="" src="http://www.liferay.com/documents/29543/11321643/using-liferay-portal-thick.jpg/e247b272-9644-437c-b9e5-8790c988851c?t=1368477814787" style="width: 400.0px;height: 300.0px;"&gt;&lt;/p&gt;
&lt;p&gt;
	So if you like big, thick books on your shelf, especially ones with the Liferay logo on them, why not pick one up?&lt;/p&gt;
&lt;p&gt;
	Of course, we're not stopping there. I'm in the midst of working on the styling of the epub version of the book, which we'll release next. Stay tuned!&lt;/p&gt;</summary>
    <dc:creator>Richard Sezov</dc:creator>
    <dc:date>2013-05-13T20:42:55Z</dc:date>
  </entry>
  <entry>
    <title>RE:5 tips to improve usage of the Liferay script console</title>
    <link rel="alternate" href="http://www.liferay.com/c/blogs/find_entry?entryId=24684087" />
    <author>
      <name>Kan Zhang</name>
    </author>
    <id>http://www.liferay.com/c/blogs/find_entry?entryId=24684087</id>
    <updated>2013-05-13T19:31:28Z</updated>
    <published>2013-05-13T18:26:01Z</published>
    <summary type="html">&lt;p&gt;
	&lt;em&gt;// In reply to &lt;a href="http://www.liferay.com/web/sebastien.lemarchand/blog/-/blogs/5-tips-to-improve-usage-of-the-liferay-script-console"&gt;5 tips to improve usage of the Liferay script console&lt;/a&gt; - by &lt;a href="http://www.liferay.com/web/sebastien.lemarchand"&gt;S&amp;eacute;bastien Le Marchand&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;
	S&amp;eacute;bastien wrote a very good article about Liferay script console. Here is one more tip in response of the call for sharing at the end of the article. I post it as a sepreate blog entry because I cannot use Gist or format in comment area....&lt;/p&gt;
&lt;h2&gt;
	&amp;nbsp;&lt;/h2&gt;
&lt;h2&gt;
	Tip #6: Schedule your script to run as a CRON job&lt;/h2&gt;
&lt;div&gt;
	If you want to schedule your script to execute at certain times as a CRON job (One scenario can be: Run the task &amp;quot;deactivate users never logged and created since more than 2 years&amp;quot; every month.), you can use Liferay's Scheduler Engine API, like in the following example:&lt;/div&gt;
&lt;div&gt;
	The following code outputs the string &amp;quot;test&amp;quot; to a file one time per minute in the next 10 minutes:&lt;/div&gt;
&lt;div&gt;
	&lt;script src="https://gist.github.com/kzhang7/5570465.js"&gt;&lt;/script&gt;&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	You can change your job schedule by changing the parameters in CronText constructor.&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	You will also need to use proper escape characters in the script.&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	Note that when Liferay Scheduler Engine execute the script, the following predefined variables are not available:&lt;/div&gt;
&lt;div&gt;
	&lt;ul&gt;
		&lt;li&gt;
			&lt;pre&gt;
out (java.io.PrintWriter)&lt;/pre&gt;
		
		&lt;li&gt;
			&lt;pre&gt;
actionRequest (javax.portlet.ActionRequest)&lt;/pre&gt;
		
		&lt;li&gt;
			&lt;pre&gt;
actionResponse (javax.portlet.ActionResponse)&lt;/pre&gt;
		
		&lt;li&gt;
			&lt;pre&gt;
portletConfig (javax.portlet.PortletConfig)&lt;/pre&gt;
		
		&lt;li&gt;
			&lt;pre&gt;
portletContext (javax.portlet.PortletContext)&lt;/pre&gt;
		
		&lt;li&gt;
			&lt;pre&gt;
preferences (javax.portlet.PortletPreferences)&lt;/pre&gt;
		
		&lt;li&gt;
			&lt;pre&gt;
userInfo (java.util.Map&amp;lt;String, String&amp;gt;)
&lt;/pre&gt;
		
	&lt;/ul&gt;
&lt;/div&gt;
&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;</summary>
    <dc:creator>Kan Zhang</dc:creator>
    <dc:date>2013-05-13T18:26:01Z</dc:date>
  </entry>
  <entry>
    <title>5 astuces pour améliorer l’usage de la console de script de Liferay</title>
    <link rel="alternate" href="http://www.liferay.com/c/blogs/find_entry?entryId=24655563" />
    <author>
      <name>Sébastien Le Marchand</name>
    </author>
    <id>http://www.liferay.com/c/blogs/find_entry?entryId=24655563</id>
    <updated>2013-05-13T06:31:31Z</updated>
    <published>2013-05-13T01:30:15Z</published>
    <summary type="html">&lt;p&gt;
	&lt;em&gt;// The english version of this article can be found here: &lt;a href="http://www.liferay.com/web/sebastien.lemarchand/blog/-/blogs/5-tips-to-improve-usage-of-the-liferay-script-console"&gt;5 tips to improve usage of the Liferay script console&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;em style="line-height: 1.5;"&gt;&lt;span style="line-height: 1.5;"&gt;// Si vous utilisez un lecteur RSS pour lire ce billet, veuillez basculer vers la page HTML pour voir correctement les morceaux de code.&lt;/span&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;
	Depuis la version 6.0, &amp;nbsp;Liferay propose une console de script int&amp;eacute;gr&amp;eacute;e dans le Control Panel. Tr&amp;egrave;s puissant, cet outil devient vite indispensable d&amp;egrave;s que l&amp;rsquo;on y a go&amp;ucirc;t&amp;eacute; (si vous ne connaissez pas encore la console de script, jetez un oeil sur &lt;a href="http://www.liferay.com/fr/web/jeffrey.handa/blog/-/blogs/6424100"&gt;l&amp;rsquo;article d&amp;rsquo;introduction&lt;/a&gt; de Jeffrey Handa).&lt;/p&gt;
&lt;p&gt;
	&lt;span style="line-height: 1.5;"&gt;Dans la suite de ce billet, je vais vous pr&amp;eacute;senter 5 astuces simples pour encore mieux profiter de la console de script.&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;
	&lt;span style="line-height: 1.5;"&gt;Les exemples de mise en oeuvre qui suivent sont bas&amp;eacute;s sur le langage Groovy, mais la plupart de ces astuces sont applicables avec les autres langages support&amp;eacute;s par la console de script du portail.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	&lt;h2&gt;
		Astuce n&amp;deg;1 : Mettez du HTML dans vos sorties&amp;nbsp;&lt;/h2&gt;
	&lt;div&gt;
		Il faut savoir que la sortie par d&amp;eacute;faut de la console de script est rendue directement en tant que contenu HTML. Pensez-donc &amp;agrave; int&amp;eacute;grer des balises HTML dans vos sorties pour b&amp;eacute;n&amp;eacute;ficier d&amp;rsquo;une mise en forme riche.&lt;/div&gt;
	&lt;div&gt;
		&amp;nbsp;&lt;/div&gt;
	&lt;div&gt;
		Exemple de script :&amp;nbsp;&lt;/div&gt;
	&lt;script src="https://gist.github.com/slemarchand/5565251.js"&gt;&lt;/script&gt;
	&lt;div&gt;
		&amp;nbsp;&lt;/div&gt;
	&lt;div&gt;
		R&amp;eacute;sultat :&lt;/div&gt;
	&lt;div&gt;
		&lt;img alt="" src="http://www.liferay.com/documents/9143643/24654685/5_script_console_tips_1.png/99247e54-ae12-4246-b3c2-01b8bc24270f?t=1368401644994" style="width: 540.0px;height: 586.0px;"&gt;&lt;/div&gt;
	&lt;div&gt;
		&amp;nbsp;&lt;/div&gt;
	&lt;div&gt;
		&amp;nbsp;&lt;/div&gt;
	&lt;h2&gt;
		Astuce n&amp;deg;2 : Affichez les exceptions dans l&amp;rsquo;interface utilisateur&amp;nbsp;&lt;/h2&gt;
	&lt;div&gt;
		&lt;div&gt;
			Lorsque une exception survient lors de l'ex&amp;eacute;cution d&amp;rsquo;un script, &amp;nbsp;le message d&amp;rsquo;erreur est toujours le m&amp;ecirc;me quelque soit l&amp;rsquo;exception et ne donne aucun d&amp;eacute;tail, ce qui oblige &amp;agrave; consulter les logs du serveur pour effectuer un diagnostique.&lt;/div&gt;
	&lt;/div&gt;
	&lt;div&gt;
		&amp;nbsp;&lt;/div&gt;
	&lt;div&gt;
		&lt;img alt="" src="http://www.liferay.com/documents/9143643/24654685/5_script_console_tips_2a.png/b16318a0-b536-4b2f-846e-0e139fe96e9e?t=1368402816833"&gt;&lt;/div&gt;
	&lt;div&gt;
		&amp;nbsp;&lt;/div&gt;
	&lt;div&gt;
		Pour obtenir le d&amp;eacute;tail de l&amp;rsquo;exception directement dans l&amp;rsquo;interface utilisateur, encadrez l&amp;rsquo;ensemble de votre traitement par un bloc try/catch et affichez la stack trace de l&amp;rsquo;exception sur la sortie de la console (depuis la clause catch).&lt;span style="line-height: 1.5;"&gt;.&lt;/span&gt;&lt;/div&gt;
	&lt;div&gt;
		&amp;nbsp;&lt;/div&gt;
	&lt;div&gt;
		Example de script :&lt;/div&gt;
	&lt;script src="https://gist.github.com/slemarchand/5565253.js"&gt;&lt;/script&gt;
	&lt;div&gt;
		&amp;nbsp;&lt;/div&gt;
	&lt;div&gt;
		R&amp;eacute;sultat :&amp;nbsp;&lt;/div&gt;
	&lt;div&gt;
		&lt;img alt="" src="http://www.liferay.com/documents/9143643/24654685/5_script_console_tips_2.png/2a1a5e11-7219-4d94-a76d-840fa0dea1dc?t=1368401653574" style="width: 711.0px;height: 663.0px;"&gt;&lt;/div&gt;
	&lt;div&gt;
		&amp;nbsp;&lt;/div&gt;
	&lt;div&gt;
		A noter que cela ne fonctionne pas pour les erreurs li&amp;eacute;es &amp;agrave; la syntaxe du script.&lt;/div&gt;
	&lt;div&gt;
		&amp;nbsp;&lt;/div&gt;
	&lt;div&gt;
		&amp;nbsp;&lt;/div&gt;
	&lt;h2&gt;
		Astuce n&amp;deg;3 : Exploitez les variables pr&amp;eacute;d&amp;eacute;finies&amp;nbsp;&lt;/h2&gt;
	&lt;div&gt;
		Un script ex&amp;eacute;cut&amp;eacute; depuis la console du control panel dispose des variables pr&amp;eacute;d&amp;eacute;finies suivantes :&lt;/div&gt;
	&lt;ul&gt;
		&lt;li&gt;
			&lt;pre&gt;
out (java.io.PrintWriter)&lt;/pre&gt;
		
		&lt;li&gt;
			&lt;pre&gt;
actionRequest (javax.portlet.ActionRequest)&lt;/pre&gt;
		
		&lt;li&gt;
			&lt;pre&gt;
actionResponse (javax.portlet.ActionResponse)&lt;/pre&gt;
		
		&lt;li&gt;
			&lt;pre&gt;
portletConfig (javax.portlet.PortletConfig)&lt;/pre&gt;
		
		&lt;li&gt;
			&lt;pre&gt;
portletContext (javax.portlet.PortletContext)&lt;/pre&gt;
		
		&lt;li&gt;
			&lt;pre&gt;
preferences (javax.portlet.PortletPreferences)&lt;/pre&gt;
		
		&lt;li&gt;
			&lt;pre&gt;
userInfo (java.util.Map&amp;lt;String, String&amp;gt;)&lt;/pre&gt;
		
	&lt;/ul&gt;
	&lt;div&gt;
		Lorsque vous &amp;eacute;crivez vos scripts, soyez conscient des possibilit&amp;eacute;s offertes par ces variables, tout particuli&amp;egrave;rement la variable &lt;code&gt;actionRequest&lt;/code&gt;, utile pour beaucoup d&amp;rsquo;appel de m&amp;eacute;thodes.&lt;/div&gt;
	&lt;div&gt;
		&amp;nbsp;&lt;/div&gt;
	&lt;div&gt;
		Exemple de script :&lt;/div&gt;
	&lt;script src="https://gist.github.com/slemarchand/5565256.js"&gt;&lt;/script&gt;
	&lt;div&gt;
		&amp;nbsp;&lt;/div&gt;
	&lt;div&gt;
		R&amp;eacute;sultat :&lt;/div&gt;
	&lt;div&gt;
		&lt;img alt="" src="http://www.liferay.com/documents/9143643/24654685/5_script_console_tips_3.png/680c2082-d4dc-454f-af67-2e7c4ad99bb4?t=1368401661626"&gt;&lt;span style="line-height: 1.5;"&gt;.&lt;/span&gt;&lt;/div&gt;
	&lt;div&gt;
		&amp;nbsp;&lt;/div&gt;
	&lt;div&gt;
		&amp;nbsp;&lt;/div&gt;
	&lt;h2&gt;
		Astuce n&amp;deg;4 : Impl&amp;eacute;mentez un mode preview&lt;/h2&gt;
	&lt;div&gt;
		La console de script ne permettant pas de faire de rollback sur l&amp;rsquo;ex&amp;eacute;cution d&amp;rsquo;un script, il est tr&amp;egrave;s pratique d&amp;rsquo;int&amp;eacute;grer un mode preview pour les scripts qui modifient les donn&amp;eacute;es en base.&lt;/div&gt;
	&lt;div&gt;
		&amp;nbsp;&lt;/div&gt;
	&lt;div&gt;
		Ce mode &amp;quot;preview&amp;quot; consiste &amp;agrave; utiliser un flag qui d&amp;eacute;termine si les les op&amp;eacute;rations &amp;agrave; effets de bord sont ex&amp;eacute;cut&amp;eacute;es ou non, alors que les donn&amp;eacute;es parcourues sont syst&amp;eacute;matiquement trac&amp;eacute;es. Ceci permet donc de se faire une id&amp;eacute;e des donn&amp;eacute;es impact&amp;eacute;es par un script avant de faire effectivement les mises &amp;agrave; jour en base de donn&amp;eacute;es.&lt;/div&gt;
	&lt;div&gt;
		&amp;nbsp;&lt;/div&gt;
	&lt;div&gt;
		Exemple de script : &amp;nbsp;&amp;nbsp;&lt;/div&gt;
	&lt;script src="https://gist.github.com/slemarchand/5565262.js"&gt;&lt;/script&gt;
	&lt;p&gt;
		&amp;nbsp;&lt;/p&gt;
	&lt;h2&gt;
		Astuce n&amp;deg;5 : Pr&amp;eacute;voyez une sortie fichier pour les scripts &amp;quot;longue dur&amp;eacute;e&amp;quot;&lt;/h2&gt;
	&lt;div&gt;
		Lorsque l&amp;rsquo;ex&amp;eacute;cution d&amp;rsquo;un script d&amp;eacute;passe une certaine dur&amp;eacute;e, la console ne r&amp;eacute;pond plus et retourne une erreur, alors m&amp;ecirc;me que le script peut continuer son ex&amp;eacute;cution et potentiellement mener &amp;agrave; bien l&amp;rsquo;ensemble de son traitement... Mais impossible de conna&amp;icirc;tre le statut du traitement sans la sortie correspondante !&lt;/div&gt;
	&lt;div&gt;
		&amp;nbsp;&lt;/div&gt;
	&lt;div&gt;
		Pour rem&amp;eacute;dier &amp;agrave; cela, il suffit de pr&amp;eacute;voir une sortie fichier en plus de la sortie console, comme sur l&amp;rsquo;exemple ci-dessous :&lt;/div&gt;
	&lt;script src="https://gist.github.com/slemarchand/5565281.js"&gt;&lt;/script&gt;
	&lt;div&gt;
		Une fois le script initial ex&amp;eacute;cut&amp;eacute;, il est possible de lire le fichier g&amp;eacute;n&amp;eacute;r&amp;eacute; sans pour autant avoir d&amp;rsquo;acc&amp;egrave;s direct au syst&amp;egrave;me de fichier, en utilisant un second script :&lt;/div&gt;
	&lt;script src="https://gist.github.com/slemarchand/5565282.js"&gt;&lt;/script&gt;
	&lt;div&gt;
		&lt;div&gt;
			A noter que cette technique bas&amp;eacute;e sur un fichier de sortie d&amp;eacute;di&amp;eacute; est pr&amp;eacute;f&amp;eacute;rable &amp;agrave; l&amp;rsquo;utilisation d&amp;rsquo;un logger classique car elle facilite la r&amp;eacute;cup&amp;eacute;ration des donn&amp;eacute;es de sortie du script (qui seraient plus difficile &amp;agrave; isoler parmi l&amp;rsquo;ensemble des logs du portail).&amp;nbsp;&lt;/div&gt;
	&lt;/div&gt;
	&lt;div&gt;
		&amp;nbsp;&lt;/div&gt;
	&lt;div&gt;
		Et vous, avez-vous des astuces &amp;agrave; propos de la console de script &amp;agrave; partager avec la communaut&amp;eacute; ? Faites en part dans les commentaires de ce billet !&lt;/div&gt;
	&lt;div&gt;
		&amp;nbsp;&lt;/div&gt;
	&lt;div&gt;
		Lectures compl&amp;eacute;mentaires&lt;/div&gt;
	&lt;ul&gt;
		&lt;li&gt;
			&lt;a href="http://www.liferay.com/web/jeffrey.handa/blog/-/blogs/6424100"&gt;Working with Admin Script Console&lt;/a&gt;
		&lt;li&gt;
			&lt;a href="http://www.liferay.com/web/jeffrey.handa/blog/-/blogs/custom-java-tools-for-liferay-6-0-script-engine"&gt;Custom Java Tools for Liferay 6.0 Script Engine&lt;/a&gt;
		&lt;li&gt;
			&lt;a href="https://github.com/slemarchand/liferay-admin-scripts"&gt;Quelques exemples de scripts&lt;/a&gt;
		&lt;li&gt;
			&lt;a href="http://javascripting.sourceforge.net/"&gt;Using Java as script console language&lt;/a&gt;
		&lt;li&gt;
			&lt;a href="http://scalascripting.sourceforge.net/"&gt;Using Scala as script console language&lt;/a&gt;
	&lt;/ul&gt;
&lt;/div&gt;</summary>
    <dc:creator>Sébastien Le Marchand</dc:creator>
    <dc:date>2013-05-13T01:30:15Z</dc:date>
  </entry>
  <entry>
    <title>5 tips to improve usage of the Liferay script console</title>
    <link rel="alternate" href="http://www.liferay.com/c/blogs/find_entry?entryId=24643487" />
    <author>
      <name>Sébastien Le Marchand</name>
    </author>
    <id>http://www.liferay.com/c/blogs/find_entry?entryId=24643487</id>
    <updated>2013-05-13T06:30:31Z</updated>
    <published>2013-05-11T23:35:42Z</published>
    <summary type="html">&lt;p&gt;
	&lt;em&gt;// La version fran&amp;ccedil;aise de cet article est l&amp;agrave; : &lt;a href="http://www.liferay.com/web/sebastien.lemarchand/blog/-/blogs/5-astuces-pour-ameliorer-l%E2%80%99usage-de-la-console-de-script-de-liferay"&gt;5 astuces pour am&amp;eacute;liorer l&amp;rsquo;usage de la console de script de Liferay&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;em style="line-height: 1.5;"&gt;&lt;span style="line-height: 1.5;"&gt;// If you use a RSS reader to read this post, please switch to the HTML page to correctly view the code snippets.&lt;/span&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;span style="line-height: 1.5;"&gt;Since the release 6.0, Liferay provide a script console integrated into the Control Panel. Very powerful, this tool becomes fast essential for any portal administrator or developer (if you do not still know the script console, have a look on &lt;/span&gt;&lt;span style="line-height: 1.5;"&gt;this&amp;nbsp;&lt;a href="http://www.liferay.com/fr/web/jeffrey.handa/blog/-/blogs/6424100"&gt;article&lt;/a&gt;&amp;nbsp;by&amp;nbsp;&lt;/span&gt;&lt;span style="line-height: 1.5;"&gt;Jeffrey Handa&lt;/span&gt;&lt;span style="line-height: 1.5;"&gt;).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;span style="line-height: 1.5;"&gt;During this post, I am going to present you 5 simple tips to take better advantage of the script console.&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;
	The following implementation samples are based on the Groovy language, but most of them are applicable with other languages supported by the portal script console.&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	&lt;h2&gt;
		Tip #1: Use the HTML in your outputs&lt;/h2&gt;
	&lt;div&gt;
		You need to know that the script console default output is rendered as HTML content. Thus, think to embed HTML markup in your outputs to enjoy rich formatting.&lt;/div&gt;
	&lt;div&gt;
		&amp;nbsp;&lt;/div&gt;
	&lt;div&gt;
		Script example:&amp;nbsp;&lt;/div&gt;
	&lt;script src="https://gist.github.com/slemarchand/5565251.js"&gt;&lt;/script&gt;
	&lt;div&gt;
		&amp;nbsp;&lt;/div&gt;
	&lt;div&gt;
		Output:&lt;/div&gt;
	&lt;div&gt;
		&lt;img alt="" src="http://www.liferay.com/documents/9143643/24654685/5_script_console_tips_1.png/99247e54-ae12-4246-b3c2-01b8bc24270f?t=1368401644994" style="width: 540.0px;height: 586.0px;"&gt;&lt;/div&gt;
	&lt;div&gt;
		&amp;nbsp;&lt;/div&gt;
	&lt;div&gt;
		&amp;nbsp;&lt;/div&gt;
	&lt;h2&gt;
		Tip #2: Show up exceptions on user interface&lt;/h2&gt;
	&lt;div&gt;
		When any exception arises during script execution, the error message is always the same and give no detail about the error. So, you need to access server logs to make a diagnostic.&lt;/div&gt;
	&lt;div&gt;
		&amp;nbsp;&lt;/div&gt;
	&lt;div&gt;
		&lt;img alt="" src="http://www.liferay.com/documents/9143643/24654685/5_script_console_tips_2a.png/b16318a0-b536-4b2f-846e-0e139fe96e9e?t=1368402816833"&gt;&lt;/div&gt;
	&lt;div&gt;
		&amp;nbsp;&lt;/div&gt;
	&lt;div&gt;
		To show up exception details on the user interface, envelop your whole code with a try/catch block and print the stack trace on the console output (from the catch clause).&amp;nbsp;There is nevertheless a limitation:&amp;nbsp;it doesn&amp;rsquo;t work for script syntax errors.&lt;/div&gt;
	&lt;div&gt;
		&amp;nbsp;&lt;/div&gt;
	&lt;div&gt;
		Script example:&lt;/div&gt;
	&lt;script src="https://gist.github.com/slemarchand/5565253.js"&gt;&lt;/script&gt;
	&lt;div&gt;
		Output:&amp;nbsp;&lt;/div&gt;
	&lt;div&gt;
		&lt;img alt="" src="http://www.liferay.com/documents/9143643/24654685/5_script_console_tips_2.png/2a1a5e11-7219-4d94-a76d-840fa0dea1dc?t=1368401653574" style="width: 711.0px;height: 663.0px;"&gt;&lt;/div&gt;
	&lt;div&gt;
		&amp;nbsp;&lt;/div&gt;
	&lt;div&gt;
		&amp;nbsp;&lt;/div&gt;
	&lt;h2&gt;
		Tip #3: Exploit the predefined variables&amp;nbsp;&lt;/h2&gt;
	&lt;div&gt;
		A script executed from the Control Panel can access the following predefined variables :&lt;/div&gt;
	&lt;ul&gt;
		&lt;li&gt;
			&lt;pre&gt;
out (java.io.PrintWriter)&lt;/pre&gt;
		
		&lt;li&gt;
			&lt;pre&gt;
actionRequest (javax.portlet.ActionRequest)&lt;/pre&gt;
		
		&lt;li&gt;
			&lt;pre&gt;
actionResponse (javax.portlet.ActionResponse)&lt;/pre&gt;
		
		&lt;li&gt;
			&lt;pre&gt;
portletConfig (javax.portlet.PortletConfig)&lt;/pre&gt;
		
		&lt;li&gt;
			&lt;pre&gt;
portletContext (javax.portlet.PortletContext)&lt;/pre&gt;
		
		&lt;li&gt;
			&lt;pre&gt;
preferences (javax.portlet.PortletPreferences)&lt;/pre&gt;
		
		&lt;li&gt;
			&lt;pre&gt;
userInfo (java.util.Map&amp;lt;String, String&amp;gt;)&lt;/pre&gt;
		
	&lt;/ul&gt;
	&lt;div&gt;
		When you write your scripts, be aware of possibilities offered by these variables, particularly the &lt;code&gt;actionRequest&lt;/code&gt; variable, useful for a lot of method calls.&lt;/div&gt;
	&lt;div&gt;
		&amp;nbsp;&lt;/div&gt;
	&lt;div&gt;
		Script example:&lt;/div&gt;
	&lt;script src="https://gist.github.com/slemarchand/5565256.js"&gt;&lt;/script&gt;
	&lt;div&gt;
		Output:&lt;/div&gt;
	&lt;div&gt;
		&lt;img alt="" src="http://www.liferay.com/documents/9143643/24654685/5_script_console_tips_3.png/680c2082-d4dc-454f-af67-2e7c4ad99bb4?t=1368401661626"&gt;&lt;/div&gt;
	&lt;div&gt;
		&amp;nbsp;&lt;/div&gt;
	&lt;div&gt;
		&amp;nbsp;&lt;/div&gt;
	&lt;h2&gt;
		Tip #4: Implement a preview mode&lt;/h2&gt;
	&lt;div&gt;
		The script console not allowing execution rollback, it&amp;rsquo;s very convenient to set up a preview mode for side-effect scripts (i.e. performing database updates).&lt;/div&gt;
	&lt;div&gt;
		&amp;nbsp;&lt;/div&gt;
	&lt;div&gt;
		Ce mode &amp;quot;preview&amp;quot; consiste &amp;agrave; utiliser un flag qui d&amp;eacute;termine si les les op&amp;eacute;rations &amp;agrave; effets de bord sont ex&amp;eacute;cut&amp;eacute;es ou non, alors que les donn&amp;eacute;es parcourues sont syst&amp;eacute;matiquement trac&amp;eacute;es. Ceci permet donc de se faire une id&amp;eacute;e des donn&amp;eacute;es impact&amp;eacute;es par un script avant de faire effectivement les mise &amp;agrave; jour en base de donn&amp;eacute;es.&lt;/div&gt;
	&lt;div&gt;
		&amp;nbsp;&lt;/div&gt;
	&lt;div&gt;
		This &amp;quot;preview mode&amp;quot; consists in using a flag which determines if the operations with side effects are executed or not, while the visited data are systematically printed. This thus allows to have an outline of the data impacted by the script, before effectively doing updates to database.&lt;/div&gt;
	&lt;div&gt;
		&amp;nbsp;&lt;/div&gt;
	&lt;div&gt;
		Script example : &amp;nbsp;&amp;nbsp;&lt;/div&gt;
	&lt;script src="https://gist.github.com/slemarchand/5565262.js"&gt;&lt;/script&gt;
	&lt;p&gt;
		&amp;nbsp;&lt;/p&gt;
	&lt;h2&gt;
		Tip #5: Plan a file output for &amp;quot;long-running&amp;quot; scripts&lt;/h2&gt;
	&lt;div&gt;
		When the execution of a script exceeds a certain duration, the console doesn&amp;rsquo;t respond any more and returns an error, whereas the script can continue its execution and potentially bring to a successful conclusion... But impossible to know the status without the corresponding output!&lt;/div&gt;
	&lt;div&gt;
		&amp;nbsp;&lt;/div&gt;
	&lt;div&gt;
		To by-pass this limitation, you can set up a file output besides the console output, like in the following example:&amp;nbsp;&lt;/div&gt;
	&lt;script src="https://gist.github.com/slemarchand/5565281.js"&gt;&lt;/script&gt;
	&lt;div&gt;
		Once the initial script was executed, it is possible to read the generated &amp;nbsp;file without direct access to the file system, by using a second script:&lt;/div&gt;
	&lt;script src="https://gist.github.com/slemarchand/5565282.js"&gt;&lt;/script&gt;
	&lt;div&gt;
		Note that method based on a dedicated output file is better than using a classic logger because it&amp;rsquo;s easier to get back the script output data (which would be more difficult to isolate among all &amp;nbsp;portal logs).&lt;/div&gt;
	&lt;div&gt;
		&amp;nbsp;&lt;/div&gt;
	&lt;div&gt;
		And you, do you have some tips about script console that you can share with the community ? Let us know in the comments !&lt;/div&gt;
	&lt;div&gt;
		&amp;nbsp;&lt;/div&gt;
	&lt;div&gt;
		Further reading:&lt;/div&gt;
	&lt;ul&gt;
		&lt;li&gt;
			&lt;a href="http://www.liferay.com/web/jeffrey.handa/blog/-/blogs/6424100"&gt;Working with Admin Script Console&lt;/a&gt;
		&lt;li&gt;
			&lt;a href="http://www.liferay.com/web/jeffrey.handa/blog/-/blogs/custom-java-tools-for-liferay-6-0-script-engine"&gt;Custom Java Tools for Liferay 6.0 Script Engine&lt;/a&gt;
		&lt;li&gt;
			&lt;a href="https://github.com/slemarchand/liferay-admin-scripts"&gt;Some scripts examples&lt;/a&gt;
		&lt;li&gt;
			&lt;a href="http://javascripting.sourceforge.net/"&gt;Using Java as script console language&lt;/a&gt;
		&lt;li&gt;
			&lt;a href="http://scalascripting.sourceforge.net/"&gt;Using Scala as script console language&lt;/a&gt;
	&lt;/ul&gt;
&lt;/div&gt;</summary>
    <dc:creator>Sébastien Le Marchand</dc:creator>
    <dc:date>2013-05-11T23:35:42Z</dc:date>
  </entry>
  <entry>
    <title>Using custom java classes in a JSP hook</title>
    <link rel="alternate" href="http://www.liferay.com/c/blogs/find_entry?entryId=24616204" />
    <author>
      <name>Kan Zhang</name>
    </author>
    <id>http://www.liferay.com/c/blogs/find_entry?entryId=24616204</id>
    <updated>2013-05-13T19:26:02Z</updated>
    <published>2013-05-10T20:15:39Z</published>
    <summary type="html">&lt;style type="text/css"&gt;pre {
	white-space: pre;
}
&lt;/style&gt;
&lt;h2&gt;
	Issue&lt;/h2&gt;
&lt;p&gt;
	In Liferay hook development, one common question is:&lt;/p&gt;
&lt;p&gt;
	&lt;strong&gt;How to import/use/access custom java classes in a JSP hook?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;
	The question can be described as:&lt;/p&gt;
&lt;p&gt;
	1. Create a hook project (for example: &lt;strong&gt;sample-hook&lt;/strong&gt;)&lt;/p&gt;
&lt;p&gt;
	2. Create a custom class (for example: &lt;strong&gt;com.kzhang.CustomJavaClass&lt;/strong&gt;) in hook project.&lt;/p&gt;
&lt;p&gt;
	3. Override a Liferay portlet jsp (for example, &lt;strong&gt;html/portlet/blogs/view.jsp&lt;/strong&gt;) and try to use the &lt;strong&gt;CustomJavaClass &lt;/strong&gt;in the jsp. Liferay will throw &amp;quot;class CustomJavaClass can't be resolved to a type&amp;quot; exception or ClassNotFound exception.&lt;/p&gt;
&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;
	Cause&lt;/h2&gt;
&lt;p&gt;
	The jsps in hook plugin is deployed to ROOT servlet context. for example, the &lt;strong&gt;html/portlet/blogs/view.jsp&lt;/strong&gt; in hook plugin will be copied to ${container.deploy.folder}/ROOT/html/portlet/blogs/view.jsp, and the origional view.jsp will be renamed as view.portal.jsp.&lt;/p&gt;
&lt;p&gt;
	The custom classes are still remains in the hook servlet context. for example, the &lt;strong&gt;com.kzhang.CustomJavaClass&lt;/strong&gt; in hook plugin will be still in ${container.deploy.folder}/sample-hook/WEB-INF/classes/com/kzhang/CustomJavaClass.class.&lt;/p&gt;
&lt;p&gt;
	In &lt;strong&gt;html/portlet/blogs/view.jsp&lt;/strong&gt; it can not find &lt;strong&gt;CustomJavaClass&lt;/strong&gt; because each servlet context can only see it's own classes and those of the parent classloaders. In our case, the &lt;strong&gt;html/portlet/blogs/view.jsp&lt;/strong&gt; is in ROOT servlet context which can not see the &lt;strong&gt;CustomJavaClass&lt;/strong&gt; in &lt;strong&gt;sample-hook&lt;/strong&gt; servlet context&lt;/p&gt;
&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;
	Solution&lt;/h2&gt;
&lt;p&gt;
	There are some discussions in Liferay forum:&lt;br&gt;
	&lt;a href="http://www.liferay.com/community/forums/-/message_boards/message/7454307"&gt;http://www.liferay.com/community/forums/-/message_boards/message/7454307&lt;/a&gt;&lt;br&gt;
	&lt;a href="http://www.liferay.com/community/forums/-/message_boards/message/13467179"&gt;http://www.liferay.com/community/forums/-/message_boards/message/13467179&lt;/a&gt;&lt;br&gt;
	&lt;a href="http://www.liferay.com/community/forums/-/message_boards/message/21397246"&gt;http://www.liferay.com/community/forums/-/message_boards/message/21397246&lt;/a&gt;&lt;br&gt;
	&lt;a href="http://www.liferay.com/community/forums/-/message_boards/message/11508053"&gt;http://www.liferay.com/community/forums/-/message_boards/message/11508053&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;
	The most common solution is to use the ext plugin instead of hook plugin.&lt;/p&gt;
&lt;div class="portlet-msg-info"&gt;
	But can we avoid using the ext plugin and leave everything as a hook?&lt;/div&gt;
&lt;p&gt;
	&lt;strong&gt;Solution 1: Use Spring + PortletBeanLocatorUtil + JAVA reflection&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;
	Step 1. Create the custom-spring.xml in /sample-hook/docroot/WEB-INF/src/context/custom-spring.xml folder.&lt;/p&gt;
&lt;p&gt;
	Step 2. In custom-spring.xml, define the bean for your custom java class:&lt;/p&gt;
&lt;p&gt;
	&lt;script src="https://gist.github.com/anonymous/5557703.js"&gt;&lt;/script&gt;&lt;/p&gt;
&lt;p&gt;
	Step 3. In web.xml, add the context-param to load the custom-spring.xml:&lt;/p&gt;
&lt;p&gt;
	&lt;script src="https://gist.github.com/anonymous/5557711.js"&gt;&lt;/script&gt;&lt;/p&gt;
&lt;p&gt;
	Step 4. In custom_jsps/html/portlet/blogs/view.jsp, use PortletBeanLocatorUtil to load the custom java class:&lt;/p&gt;
&lt;p&gt;
	&lt;script src="https://gist.github.com/anonymous/5557739.js"&gt;&lt;/script&gt;&lt;/p&gt;
&lt;div class="portlet-msg-info" id="file-view-jsp-LC6"&gt;
	&lt;span class="c1"&gt;If your CustomJavaClass implements an interface which is accessable in ROOT servlet context,&lt;/span&gt;&lt;span class="c1"&gt; then you can cast the customJavaClass to the interface and use the class thru interface.&lt;/span&gt;&lt;span class="c1"&gt; Otherwise you will need to use JAVA reflection to dynamically invoke the methods in the custom class.&lt;/span&gt;&lt;/div&gt;
&lt;p&gt;
	&lt;strong&gt;Solution 2: Override Struts Action and call the custom classes in Struts Action.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;
	Setp 1. In liferay-hook.xml, override the view action of blogs portlet:&lt;/p&gt;
&lt;p&gt;
	&lt;script src="https://gist.github.com/kzhang7/5570776.js"&gt;&lt;/script&gt;&lt;/p&gt;
&lt;p&gt;
	Step 2. Create the CustomStrutsAction, invoke the custom class in CustomStrutsAction and set the result in to renderRequest attribute:&lt;/p&gt;
&lt;div class="portlet-msg-info"&gt;
	( Instead of result, you can also set the custom class in the renderRequest attribute and invoke it in jsp either by using it's Interface or use java reflection)&lt;/div&gt;
&lt;p&gt;
	&lt;script src="https://gist.github.com/kzhang7/5570764.js"&gt;&lt;/script&gt;&lt;/p&gt;
&lt;p&gt;
	Step 3. In custom_jsps/html/portlet/blogs/view.jsp, get the result from the renderRequest attribute:&lt;/p&gt;
&lt;script src="https://gist.github.com/kzhang7/5570757.js"&gt;&lt;/script&gt;</summary>
    <dc:creator>Kan Zhang</dc:creator>
    <dc:date>2013-05-10T20:15:39Z</dc:date>
  </entry>
  <entry>
    <title>Liferay Sync Mobile 2.0</title>
    <link rel="alternate" href="http://www.liferay.com/c/blogs/find_entry?entryId=24535690" />
    <author>
      <name>Bruno Farache</name>
    </author>
    <id>http://www.liferay.com/c/blogs/find_entry?entryId=24535690</id>
    <updated>2013-05-11T19:18:11Z</updated>
    <published>2013-05-08T22:46:18Z</published>
    <summary type="html">&lt;p&gt;
	&lt;span style="background-color: rgb(255,255,255);color: rgb(34,34,34);font-family: arial , sans-serif;font-size: 13.0px;line-height: normal;"&gt;We are pleased to announce that Sync Mobile 2.0 has been released!&lt;/span&gt;&lt;/p&gt;
&lt;div style="color: rgb(34,34,34);font-family: arial , sans-serif;font-size: 13.0px;line-height: normal;background-color: rgb(255,255,255);"&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div style="color: rgb(34,34,34);font-family: arial , sans-serif;font-size: 13.0px;line-height: normal;background-color: rgb(255,255,255);"&gt;
	In addition to having incorporated several bug fixes, this version represents the integration of noteable, new features:&lt;/div&gt;
&lt;div style="color: rgb(34,34,34);font-family: arial , sans-serif;font-size: 13.0px;line-height: normal;background-color: rgb(255,255,255);"&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;ul&gt;
	&lt;li style="color: rgb(34,34,34);font-family: arial , sans-serif;font-size: 13.0px;line-height: normal;background-color: rgb(255,255,255);"&gt;
		Tablet Support: You can, now, use Sync on your iPads and Android tablets.
&lt;/ul&gt;
&lt;ul&gt;
	&lt;li style="color: rgb(34,34,34);font-family: arial , sans-serif;font-size: 13.0px;line-height: normal;background-color: rgb(255,255,255);"&gt;
		Revamped UI: Allows you to fully take advantage of larger screen sizes while providing for a heightened file-previewing experience.
&lt;/ul&gt;
&lt;p style="color: rgb(34,34,34);font-family: arial , sans-serif;font-size: 13.0px;line-height: normal;background-color: rgb(255,255,255);"&gt;
	&amp;nbsp;&lt;/p&gt;
&lt;p style="color: rgb(34,34,34);font-family: arial , sans-serif;font-size: 13.0px;line-height: normal;background-color: rgb(255,255,255);"&gt;
	Here are some screenshots of Sync running on an iPad:&lt;/p&gt;
&lt;p style="color: rgb(34,34,34);font-family: arial , sans-serif;font-size: 13.0px;line-height: normal;background-color: rgb(255,255,255);"&gt;
	&amp;nbsp;&lt;/p&gt;
&lt;div style="color: rgb(34,34,34);font-family: arial , sans-serif;font-size: 13.0px;line-height: normal;background-color: rgb(255,255,255);"&gt;
	&lt;img alt="" src="http://www.liferay.com/documents/25798/4090923/screenshot-sync.png/987c9718-d275-4893-83cb-548db004b405?t=1368063670547" style="width: 666.0px;height: 499.0px;"&gt;&lt;/div&gt;
&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;
&lt;p&gt;
	&lt;img alt="" src="http://www.liferay.com/documents/25798/4090923/screenshot-aync2.png/3d2e0f0c-64c7-4684-b1f4-8ad94dbfcc87?t=1368063686081" style="width: 666.0px;height: 499.0px;"&gt;&lt;/p&gt;
&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;
&lt;p&gt;
	&lt;span style="background-color: rgb(255,255,255);color: rgb(34,34,34);font-family: arial , sans-serif;font-size: 13.0px;line-height: normal;"&gt;You can install Sync from &lt;/span&gt;&lt;a href="https://play.google.com/store/apps/details?id=com.liferay.sync" style="font-family: arial , sans-serif;font-size: 13.0px;line-height: normal;"&gt;Google Play&lt;/a&gt;&lt;span style="background-color: rgb(255,255,255);color: rgb(34,34,34);font-family: arial , sans-serif;font-size: 13.0px;line-height: normal;"&gt;&amp;nbsp;and &lt;/span&gt;&lt;a href="https://itunes.apple.com/us/app/liferay-sync/id499558042?mt=8" style="font-family: arial , sans-serif;font-size: 13.0px;line-height: normal;"&gt;App Store&lt;/a&gt;&lt;span style="background-color: rgb(255,255,255);color: rgb(34,34,34);font-family: arial , sans-serif;font-size: 13.0px;line-height: normal;"&gt;.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;</summary>
    <dc:creator>Bruno Farache</dc:creator>
    <dc:date>2013-05-08T22:46:18Z</dc:date>
  </entry>
  <entry>
    <title>Liferay, WebSockets, and Node: Good Times!</title>
    <link rel="alternate" href="http://www.liferay.com/c/blogs/find_entry?entryId=24534205" />
    <author>
      <name>James Falkner</name>
    </author>
    <id>http://www.liferay.com/c/blogs/find_entry?entryId=24534205</id>
    <updated>2013-05-08T23:41:56Z</updated>
    <published>2013-05-08T21:47:52Z</published>
    <summary type="html">&lt;div&gt;
	&lt;img alt="" src="http://www.liferay.com/documents/5912873/6394519/meme-small.png/55d12c8a-a940-43d7-ab2d-6dfce5f6c173?t=1368050509597" style="font-size: 12.0px;line-height: 1.5;width: 259.0px;height: 244.0px;margin: 10.0px;float: right;"&gt;Lately I've been tinkering a lot with lightweight, asynchronous, &lt;a href="http://en.wikipedia.org/wiki/Event-driven_programming"&gt;event-driven&lt;/a&gt; apps on Liferay using a variety of established techniques and frameworks. It's a nice way to build apps! After working it for a while, I wanted to share what I've learned, so put together a talk and was fortunate to be selected to attend and speak at this year's &lt;a href="http://kcdc.info"&gt;KCDC&lt;/a&gt;, and presented my learnings and a demo via a &lt;a href="http://speakerrate.com/talks/22731-asynchronous-web-programming-with-html5-websockets-and-java"&gt;presentation&lt;/a&gt; on &lt;em&gt;Event-driven Programming with Java and HTML5 WebSockets&lt;/em&gt;.&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	You can find the &lt;a href="http://www.slideshare.net/schtool/asynchronous-web-programming-with-html5-websockets-and-java"&gt;slides&lt;/a&gt; on SlideShare, and the &lt;a href="https://github.com/jamesfalkner/websockets-kcdc-2013-demo"&gt;demo code&lt;/a&gt; on GitHub.&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	At the end of the presentation I showed a demo, and I wanted to go into a bit more detail here. It is essentially a WebSockets demo using a &lt;a href="https://developers.google.com/maps/documentation/javascript/examples/layer-heatmap"&gt;Google Heatmap&lt;/a&gt; to visualize the location of bloggers who are blogging on a Liferay site. I used Tomcat 8.x for the &lt;a href="http://www.jcp.org/en/jsr/detail?id=356"&gt;JSR-356 WebSockets&lt;/a&gt; implementation, partly because I am comfortable it, but also because it has a bug that I wanted to use to demonstrate a point I made during the talk :) I'm pretty sure &lt;a href="http://glassfish.net"&gt;GlassFish&lt;/a&gt; doesn't suffer from this!&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;h2&gt;
	Social Driver&lt;/h2&gt;
&lt;div&gt;
	To simulate lots of people doing activity on Liferay (and therefore generating activities for which I can listen), I re-used my Social Driver, resurrected from &lt;strong&gt;7Cogs&lt;/strong&gt;. This code spawns theads that programmatically create users and create blog entries, wiki pages, forum posts, and do other activities like vote and comment on content. It does this in separate threads, which simulates lots of people doing things on your Liferay site.&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	I have covered the basics of the SocialDriver in my series of &amp;quot;7Cogs is Dead! Long Live 7Cogs!&amp;quot; posts (&lt;a href="http://www.liferay.com/web/james.falkner/blog/-/blogs/7cogs-is-dead-long-live-7cogs-"&gt;here&lt;/a&gt;, and &lt;a href="http://www.liferay.com/web/james.falkner/blog/-/blogs/part-ii-7cogs-is-dead-long-live-7cogs-"&gt;here&lt;/a&gt;), which I hope to finish off in the next couple of weeks.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;h2&gt;
	Demo Part 1&lt;/h2&gt;
&lt;div&gt;
	In the first part of the demo, I have a &lt;a href="http://developers.google.com/maps/documentation/javascript/examples/layer-heatmap"&gt;Google Heatmap&lt;/a&gt; which visualizes the location of the fake users, based on their registered address (which is also faked). When content (blogs, wikis, forums) is created, a &lt;a href="http://www.liferay.com/documentation/liferay-portal/6.1/user-guide/-/ai/measuring-social-activity"&gt;&lt;em&gt;SocialActivity&lt;/em&gt;&lt;/a&gt; is generated. &lt;a href="https://github.com/jamesfalkner/websockets-kcdc-2013-demo/blob/master/realtime-hook/docroot/WEB-INF/src/ActivityListener.java"&gt;My hook&lt;/a&gt; listens for these events, and sends them to &lt;a href="https://github.com/jamesfalkner/websockets-kcdc-2013-demo/blob/master/realtime-hook/docroot/WEB-INF/src/ActivityWebSocketEndpoint.java"&gt;my WebSocket endpoint&lt;/a&gt;, which ships them to &lt;a href="https://github.com/jamesfalkner/websockets-kcdc-2013-demo/blob/master/realtime-portlet/docroot/view2.jsp"&gt;my client webpage&lt;/a&gt; with the Google map.&lt;/div&gt;
&lt;div&gt;
	&lt;img alt="" class="callout" src="http://www.liferay.com/documents/5912873/6394519/KCDC-Async-Final-SlideShare-1.jpg/eca0a82d-32dc-4a36-8de9-f66c0a8b4ce3?t=1368050564989" style="width: 601.0px;height: 205.0px;margin-top: 10.0px;margin-bottom: 10.0px;"&gt;&lt;/div&gt;
&lt;div&gt;
	It all works great when you have a single thread generating events. &amp;nbsp;The map builds nicely, and all is well. However, a few seconds after you start up more threads, things get weird, and WebSocket messages emitted from the server get jumbled and mixed together, causing the browser to immediately fail the websocket connection, and the client comes to a grinding halt (Liferay happily continues to create activities, though).&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;h2&gt;
	Demo Part 2&lt;/h2&gt;
&lt;div&gt;
	In part 2 we used &lt;a href="http://www.wireshark.org/"&gt;Wireshark&lt;/a&gt; to inspect the network traffic, in an attempt to debug the problem. &amp;nbsp;Looking at the network traffic reveals that in the end, the last few WebSockets frames are mixed up / jumbled up, causing the browser to misinterpret the bytes, and fail quickly (which is nice!).&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	The problem appears to be that the code in Tomcat for sending messages down the pipe isn't multithread-safe. &amp;nbsp;Two or more threads can get into the same area of code, and send content at the same time, and this is exactly what happened here: my blog thread and my wiki thread tried to send messages to the client at the same time, and one's message was mixed in with the other, causing the browser to issue a cryptic &lt;em&gt;Could not decode a text frame as UTF-8&lt;/em&gt;. &amp;nbsp;Looking at the offending packet in Wireshark:&lt;/div&gt;
&lt;div&gt;
	&lt;img alt="" class="callout" src="http://www.liferay.com/documents/5912873/6394519/Screen+Shot+2013-05-08+at+6.23.57+PM.png/d97f96e2-5cc5-4a95-bd4c-e6bb94899597?t=1368052238360" style="width: 600.0px;height: 278.0px;margin-top: 10.0px;margin-bottom: 10.0px;"&gt;&lt;/div&gt;
&lt;div&gt;
	&lt;span style="font-size: 12.0px;line-height: 1.5;"&gt;You can see the complete message of &lt;code&gt;{&amp;quot;address&amp;quot;:&amp;quot;Sudan&amp;quot;}&lt;/code&gt; but then some more bits that is the beginning of the next message, which the browser tries to interpret as text, and fails (it's actually the beginning of the next websocket frame).&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	&lt;span style="font-size: 12.0px;line-height: 1.5;"&gt;Synchronizing the code that calls into Tomcat does the trick (e.g. via &lt;/span&gt;&lt;code style="font-size: 12.0px;line-height: 1.5;"&gt;synchronized&lt;/code&gt;&lt;span style="font-size: 12.0px;line-height: 1.5;"&gt;), but &lt;/span&gt;&lt;strong style="font-size: 12.0px;line-height: 1.5;"&gt;a)&lt;/strong&gt;&lt;span style="font-size: 12.0px;line-height: 1.5;"&gt; I shouldn't have to do that because it's part of &lt;/span&gt;&lt;a href="http://jcp.org/aboutJava/communityprocess/pfd/jsr356/index.html" style="font-size: 12.0px;line-height: 1.5;"&gt;the spec&lt;/a&gt;&lt;span style="font-size: 12.0px;line-height: 1.5;"&gt;&amp;nbsp;(and I think this is a bug in Tomcat)&lt;/span&gt;&lt;span style="font-size: 12.0px;line-height: 1.5;"&gt;, and &lt;/span&gt;&lt;strong style="font-size: 12.0px;line-height: 1.5;"&gt;b)&lt;/strong&gt;&lt;span style="font-size: 12.0px;line-height: 1.5;"&gt; Tomcat might not be the best place to scale out, especially because it's hosting Liferay already. &amp;nbsp;&lt;/span&gt;&lt;a href="http://nodejs.org/" style="font-size: 12.0px;line-height: 1.5;"&gt;Node.js&lt;/a&gt;&lt;span style="font-size: 12.0px;line-height: 1.5;"&gt; to the rescue!&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;h2&gt;
	Demo Part 3&lt;/h2&gt;
&lt;div&gt;
	Here, we let &lt;a href="http://nodejs.org/"&gt;Node&lt;/a&gt; handle the websockets broadcasts to the clients, while Tomcat and Liferay handle the portal itself.&lt;/div&gt;
&lt;div&gt;
	&lt;img alt="" src="http://www.liferay.com/documents/5912873/6394519/KCDC-Async-Final-SlideShare.jpg/e7093715-10fa-4e48-a405-af570883072a?t=1368050737130" style="width: 601.0px;height: 323.0px;margin: 10.0px;"&gt;&lt;/div&gt;
&lt;div&gt;
	The code in &lt;a href="https://github.com/jamesfalkner/websockets-kcdc-2013-demo/blob/master/realtime-hook/docroot/WEB-INF/src/node-websocket.js"&gt;my tiny node server&lt;/a&gt; (which requires &lt;a href="https://github.com/Worlize/WebSocket-Node"&gt;websockets.js&lt;/a&gt;, via &lt;code&gt;npm install websockets&lt;/code&gt;) does the trick. &amp;nbsp;It listens for messages over HTML (this could have, and probably should have been done with &lt;a href="http://redis.io/topics/pubsub"&gt;redis pub/sub&lt;/a&gt; but I was out of time), and then broadcasts them to all clients listening on the websocket. In this demo there's only one client,&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	With node in place, and click the switch on the portlet, to switch over to it and then happily start up many threads and watch our heatmap build nicely:&lt;/div&gt;
&lt;div&gt;
	&lt;img alt="" src="http://www.liferay.com/documents/5912873/6394519/Screen+Shot+2013-05-08+at+7.37.45+PM.png/587fcbf9-12fe-4a06-8e5a-2bb2e87256e1?t=1368056450886" style="width: 700.0px;height: 590.0px;margin-top: 10.0px;margin-bottom: 10.0px;"&gt;&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;h2&gt;
	Lessons learned&lt;/h2&gt;
&lt;ul&gt;
	&lt;li&gt;
		Coding event-based, asynchronous web program is fun and exciting! There are many frameworks and technologies to make it easy, both on client and server, and if I can do it, anyone can do it :)
	&lt;li&gt;
		It's really easy to integrate awesome apps with Liferay, due to its Java heritage, rich APIs and lightweight JSON or RESTful web services.
	&lt;li&gt;
		Java EE features (like JSR-356, aka WebSockets) and other upcoming technologies in Java EE 7 will lower the Java EE learning curve even further.
&lt;/ul&gt;
&lt;div&gt;
	Enjoy!&lt;/div&gt;</summary>
    <dc:creator>James Falkner</dc:creator>
    <dc:date>2013-05-08T21:47:52Z</dc:date>
  </entry>
  <entry>
    <title>Creating A Big Media Site in Liferay</title>
    <link rel="alternate" href="http://www.liferay.com/c/blogs/find_entry?entryId=24518511" />
    <author>
      <name>Bradley Wood</name>
    </author>
    <id>http://www.liferay.com/c/blogs/find_entry?entryId=24518511</id>
    <updated>2013-05-08T17:31:26Z</updated>
    <published>2013-05-08T16:56:41Z</published>
    <summary type="html">&lt;style type="text/css"&gt;pre.line-pre {
	max-height: 100.0%;
}
&lt;/style&gt;
&lt;p&gt;
	I wanted to prototype a site similar to an online tv and movie streaming service that isn't Netflix. I wanted to find a versital carousel that worked well with responsive (&lt;a href="http://flexslider.woothemes.com/" target="_blank"&gt;Flexslider2&lt;/a&gt;). I wanted the heading to become more of a solid background color after you scrolled down past the main carousel.&lt;/p&gt;
&lt;p&gt;
	The carousels are fluid when the window is resized.&lt;/p&gt;
&lt;p&gt;
	&lt;img alt="" src="http://www.liferay.com/documents/5053518/24518436/computer+screen.png/135a427b-84a1-410a-84ae-2e7cb10e95fe?t=1368032161544" style="width: 400.0px;height: 253.0px;"&gt;&lt;br&gt;
	&lt;span style="line-height: 1.5;"&gt;screenwidth: 1280px&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;img alt="" src="http://www.liferay.com/documents/5053518/24518436/older+computer.png/2e1e3502-4419-4230-bb72-60888be7b943?t=1368032154689" style="width: 300.0px;height: 246.0px;"&gt;&lt;/p&gt;
&lt;p&gt;
	screenwidth: 1024px&lt;/p&gt;
&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;
&lt;p&gt;
	&lt;img alt="" src="http://www.liferay.com/documents/5053518/24518436/mobile.png/4bef5cd8-4841-48e4-b3e5-977ecae2fdfb?t=1368032145052" style="width: 200.0px;height: 240.0px;"&gt;&lt;/p&gt;
&lt;p&gt;
	screenwidth: 480px&lt;/p&gt;
&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;
&lt;p&gt;
	&lt;img alt="" src="http://www.liferay.com/documents/5053518/24518436/Screen+Shot+2013-05-08+at+10.03.43+AM.png/c8d724e4-24d5-4a0e-bfa5-d1230485dc6a?t=1368032669297" style="width: 400.0px;height: 150.0px;"&gt;&lt;/p&gt;
&lt;p&gt;
	(after scroll past the main carousel the banner becomes a transparent color instead of gradient background image)&lt;/p&gt;
&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;
&lt;p&gt;
	I loaded the additional js file for the carousel when detected&lt;/p&gt;
&lt;script src="https://gist.github.com/randombrad/5541924.js"&gt;&lt;/script&gt;
&lt;p&gt;
	In the Main Carousel.vm velocity template I tweaked some of the js.&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;
		After the first slide is loaded I remove the loading class on the body tag.
	&lt;li&gt;
		I detect if there is a banner and toggle the banner from absolute position to fixed if the dockbar was still on the screen.
	&lt;li&gt;
		Detect the height of the carousel - #banner height then if vertical scroll is larger than that number then I add a class of changed, which replaces the background image with a background color.
&lt;/ul&gt;
&lt;script src="https://gist.github.com/randombrad/5541967.js"&gt;&lt;/script&gt;
&lt;h3&gt;
	Download and Test&lt;/h3&gt;
&lt;p&gt;
	&lt;a href="http://www.liferay.com/documents/5053518/24518436/Big+Media+War+6.1.1/7364a899-3ba9-4f4c-9803-426dfa9d9f1b?version=1.0"&gt;Download big-media-theme.war for 6.1.1+&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;a href="https://github.com/randombrad/liferay-plugins/tree/big-media"&gt;Git Branch&lt;/a&gt;&lt;/p&gt;</summary>
    <dc:creator>Bradley Wood</dc:creator>
    <dc:date>2013-05-08T16:56:41Z</dc:date>
  </entry>
  <entry>
    <title>Select Category And add Post in message board using velocity template</title>
    <link rel="alternate" href="http://www.liferay.com/c/blogs/find_entry?entryId=24438992" />
    <author>
      <name>chirag @ India</name>
    </author>
    <id>http://www.liferay.com/c/blogs/find_entry?entryId=24438992</id>
    <updated>2013-05-07T12:25:37Z</updated>
    <published>2013-05-07T12:13:42Z</published>
    <summary type="html">&lt;p&gt;
	Hi Guys,&lt;/p&gt;
&lt;p&gt;
	It is possible to put web content of MB-category in every page rather than to display message board in every page in website .&lt;/p&gt;
&lt;p&gt;
	On selecting category, we will open a pop-up dialog box for inserting &amp;nbsp;Post in message board.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;
	Template Code :&lt;/p&gt;
&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;
&lt;div&gt;
	#set ($MBLocalService= $serviceLocator.findService(&amp;quot;com.liferay.portlet.messageboards.service.MBCategoryLocalService&amp;quot;))&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	#set($cat=$MBLocalService.getCategories($groupId))&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	&amp;lt;form name=&amp;quot;frmmb&amp;quot; id=&amp;quot;frmmb&amp;quot;&amp;gt;&lt;/div&gt;
&lt;div&gt;
	&amp;lt;select name=&amp;quot;foo&amp;quot; id=&amp;quot;foo&amp;quot; onchange=&amp;quot;pop(this.value)&amp;quot;&amp;gt;&lt;/div&gt;
&lt;div&gt;
	&amp;lt;option &amp;nbsp;value= &amp;quot;select&amp;quot;&amp;gt; &amp;nbsp;-select-- &amp;lt;/option&amp;gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	#foreach ( $c in $cat)&lt;/div&gt;
&lt;div&gt;
	&amp;lt;option &amp;nbsp;value= &amp;quot;$c.getCategoryId()&amp;quot;&amp;gt; &amp;nbsp;$c.getName() &amp;lt;/option&amp;gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	#end&lt;/div&gt;
&lt;div&gt;
	&amp;lt;/select&amp;gt;&lt;/div&gt;
&lt;div&gt;
	&amp;lt;/form&amp;gt;&lt;/div&gt;
&lt;div&gt;
	&amp;lt;script type=&amp;quot;text/javascript&amp;quot; charset=&amp;quot;utf-8&amp;quot;&amp;gt; &amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	function pop(value)&lt;/div&gt;
&lt;div&gt;
	{&lt;/div&gt;
&lt;div&gt;
	var s=value;&lt;/div&gt;
&lt;div&gt;
	alert(s);&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;AUI().ready('aui-dialog','aui-dialog-iframe','liferay-portlet-url', function(A) { &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp; &amp;nbsp; var url = Liferay.PortletURL.createRenderURL(); &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp; &amp;nbsp;url.setPortletId(&amp;quot;19&amp;quot;); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;url.setWindowState('pop_up'); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	url.setParameter(&amp;quot;&amp;amp;_19_struts_action=%2Fmessage_boards%2Fedit_message&amp;amp;_19_mbCategoryId=&amp;quot;);&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp; window.myDialog = new A.Dialog( &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; { &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp; title: 'Ask a Question?', &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; width: 640, &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; centered: true &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;} &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ).&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;plug( &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp; &amp;nbsp;A.Plugin.DialogIframe, &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; { &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp; uri: url.toString()+&amp;quot;&amp;quot;+s, &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp; iframeCssClass: 'dialog-iframe' &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } &amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;).render(); &amp;nbsp; &amp;nbsp; });&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	}&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	&amp;lt;/script&amp;gt;&lt;/div&gt;
&lt;div&gt;
	&amp;lt;input type=&amp;quot;button&amp;quot; &amp;nbsp;class=&amp;quot;aui-button-input aui-button-input-submit&amp;quot; &amp;nbsp;name=&amp;quot;dialog&amp;quot; value=&amp;quot;Select Catagory &amp;amp; Add Question&amp;quot; /&amp;gt;&lt;/div&gt;
&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;
&lt;p&gt;
	&lt;strong style="font-size: 14.0px;line-height: 21.0px;background-color: rgb(255,255,255);"&gt;I implemented this code at&amp;nbsp;&lt;a href="http://liferay.medicalassociation.in/ask-question" style="line-height: 1.5;"&gt;http://liferay.medicalassociation.in/ask-question&lt;/a&gt;&amp;nbsp; Visit For Better Understanding .&lt;/strong&gt;&lt;/p&gt;</summary>
    <dc:creator>chirag @ India</dc:creator>
    <dc:date>2013-05-07T12:13:42Z</dc:date>
  </entry>
</feed>

