Monday 9 May 2016

Embedding custom portlet in Webcontent liferay

Create Web content and click on source.
Enter the below line

<p>
       <runtime-portlet instance="4433" name="portlet_name" querystring=""> </runtime-portlet>
</p>

how to get name---->Go to control panel---->Plugins Configuration---->copy plugin id and paste in the above line mentioned as name=" "

For Example :

<p>
       <runtime-portlet instance="4433" name="116" querystring=""> </runtime-portlet>
</p>


For Out of the box portlet Ids Please check in the below link

 Out of the box portlets

116 (Out of the box portlet Id)--------> Activities

Key Points : 
     If we want to generate a finder for primary key in liferay  service builder the return type should be an entity if return type is collection it will throw an error in persistance and util.java with error as Duplicate parameter columnName.