google.com, pub-5747754088801811, DIRECT, f08c47fec0942fa0 Skip to main content

Posts

Showing posts with the label portlet

Workflow on custom portlet

 In certain situation we require workflow in our custom portlet. We will see next what is the procedure for workflow on custom portlet. Find below full source code for workflow on custom portlet. It will show only approved feedback in list of it. SOURCE CODE You can find more detail below http://www.cignex.com/articles/applying-advanced-workflow-custom-assets-liferay-6 http://stackoverflow.com/questions/17853340/kaleo-workflow-in-custom-portlet/26729873#26729873 http://liferayzone.wordpress.com/2013/11/29/kaleo-workflow-configuration-for-custom-portlet-in-liferay-6-1/

Liferay portlet with alloy Ui form validator example.

 Alloy Ui  is built on YUI and we can use it in our liferay portlets.  Yui provides many component which are easy to use in our portlets  Here we see basic form validator.example with liferay portlet. Create portlet AlloyUi-portlet in eclipse. Add below content in view.jsp file Here we create two link for two JSP. <%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %> <script src="http://cdn.alloyui.com/2.5.0/aui/aui-min.js"></script> <link href="http://cdn.alloyui.com/2.5.0/aui-css/css/bootstrap.min.css" rel="stylesheet"></link> <portlet:defineObjects /> <portlet:renderURL var="basicform"> <portlet:param name="mvcPath" value="/BasicFormValidatorExample.jsp"/> </portlet:renderURL> <portlet:renderURL var="fullform"> <portlet:param name="mvcPath" value="/FullFormValidatorExample.jsp"/> </portlet:re...

One to Many Relationship liferay

In Real life Student can assign to multiple course. Here we see example of One to Many where student can assign to many courses. Create service in portlet. Add below content in your portlet service.   <entity name="Student" local-service="true" remote-service="true" cache-enabled="false">     <column name="studentId" type="long" primary="true" />     <column name="courses" type="Collection" entity="Course"/> </entity> <entity name="Course" local-service="true" remote-service="true" cache-enabled="false">   <column name="courseId" type="long" primary="true" />    <column name="studentId" type="long"/>     <finder name="courseId" return-type="Collection">         <finder-column name="courseId" />     </finder>   ...