Posts

Showing posts from July, 2013

Liferay Export & and Import Clear Liferay Cache

I was learning on how to implement the  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  Liferay Portlet Data Handlers  thanks to  Jorge Ferrer  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 But this activity lead to an interesting learning, initially 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  Raymond Auge  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.. The initial analysis started with me doing the manual task of clear

Liferay Service Builder with external database

To make a Liferay Service Builder with external database there are some rules to follow. This post will help you to get straight to the point. Keep in mind that: You can’t deploy more than one portlet mapping column with the same entity name, otherwise you get a hot-Deployment error. the names of the portlet name, namespace and database must be distinct (ex. portlet=” imageview “, namespace=” mammography “, database=” dicomviewer “). when you add external jar, you must add them in the Tomcat/lib/ext so liferay can find them in the global classpath. The steps to make the service builder with the external database mapping are: make the service.xml file in the /docroot/WEB-INF/ launch the build-service ant command add the ext-spring.xml file in the /docroot/WEB-INF/src/META-INF/ folder deploy the portlet. The example below might be helpful. —service.xml ———— <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE service-builder PUBLIC

Liferay popup

  Pop up with the title ,height, width <script>     function <portlet:namespace/>addpopup(addEntries) { AUI().use('aui-dialog', 'aui-io', 'event', 'event-custom', function(A) { var dialog = new A.Dialog({ title : 'Its is popup', height : 500, width : 580, centered : true, draggable : true, modal : true }).plug(A.Plugin.IO, { uri : addEntries }).render(); dialog.show(); }); } </script> Creating the button , when clicking on button  popup will be highlited <aui:button type="button"  value="Add"            onClick="javascript: <portlet:namespace/> addpopup ('${addEntries}');" > </aui:button> Creating the renderURL in which the page should displayed in the popup <portlet:renderURL var="addEntries"  windowState="<%=LiferayWindowState.EXCLUSIVE.toString()%>"> <portlet:param name=&quo