LIFERAY PORTLET DEVELOPMENT TUTORIAL PDF

In this tutorial, we will implement basic leave system application with service builder and liferay components. Liferay 7 development setup tutorial is to setup Liferay 7 development environment in local machine and access this tutorial to setup Liferay Eclipse IDE and tomcat in your local. I want to return results as objects. Means I write one file with getters and setters and I add result in finderimpl to those getters and setters. In jsp how can I display those values. Any clues?

Author:Shaktinris Dizahn
Country:Barbados
Language:English (Spanish)
Genre:Life
Published (Last):20 March 2004
Pages:98
PDF File Size:12.45 Mb
ePub File Size:18.25 Mb
ISBN:921-9-74700-472-4
Downloads:7974
Price:Free* [*Free Regsitration Required]
Uploader:Zologor



Keep in mind that you can take two paths with your Liferay MVC portlet implementation. As a naming convention, the module with your controller code and view layer is referred to as the WEB module.

A very basic WEB module might look like this:. At a minimum, you should specify the bundle symbolic name and the bundle version for the OSGi runtime. Providing a human readable bundle name is also recommended. In this case an implementation of the javax. Portlet service must be published. Declare this using an Component annotation in the portlet class:. To specify that property in your component, use this syntax in your property list:.

The properties namespaced with javax. Also note that it is possible to create nested categories using the com. In MVC, your controller receives requests from the front end, and it receives data from the back end.

For this reason, it needs a way to process requests from the front end and respond to them appropriately, and it needs a way to determine the appropriate front end view to pass data back to the user. One of these is designed for smaller applications, and the other is designed for larger applications. But read these after you finish this one, so you can understand how the whole framework works.

If you have a small application, you can implement all your controller code in your portlet class the same one you annotated with Component , which acts as your controller by itself. For processing requests, you use action methods. In this action method, the javax. ActionRequest object is used to retrieve two pieces of information that are needed to call the addGuestbook service, which is the point of the method.

If successful, the SessionMessages object is used to store a success message. Note the call to the setRenderParameter method on the ActionResponse. So what might a render method look like? First, note that implementing render logic might not be necessary at all. Note the init-param properties you set in your Component:. When the init method is called, the initialization parameters you specify are read and used to direct rendering to the default JSP.

Throughout the controller, you can render a different view JSP file by setting the render parameter mvcPath , like this:. In some cases, the uses of initialization parameters and render parameters obviates the need for additional render logic. To do this, override the render method. If not, a Guestbook should be created by default. This is accomplished by passing the appropriate ID to the RenderRequest using the setAttirbute method.

Since this logic should be executed before the default render method, the method concludes by calling super. To set parameters into the response in your controller code, you can use the setRenderParameter method. This section will briefly cover how to get your view layer working, from organizing your imports in one JSP file, to configuring URLs that direct processing to your code in the portlet class.

If you use Liferay Developer Studio to create your Web module, these taglib declarations and initializations are automatically added to your init. You can, if necessary, write Java code in your JSPs using scriptlets. Perhaps you set an attribute into the request in your controller:. You create a variable to hold the generated URL with the var attribute.

Then you can set any parameters you need using the portlet:param tag. The mvcPath parameter is used to direct to another JSP. The example above points to a JSP in.

Here are a few useful jumping off points:. Controller code to handle the request and response. JSPs to implement your view layer. A very basic WEB module might look like this: docs. Language", "javax. To specify that property in your component, use this syntax in your property list: "com.

Writing Controller Code In MVC, your controller receives requests from the front end, and it receives data from the back end. Action Methods If you have a small application, you can implement all your controller code in your portlet class the same one you annotated with Component , which acts as your controller by itself.

Render Logic So what might a render method look like? Note the init-param properties you set in your Component: "javax. Throughout the controller, you can render a different view JSP file by setting the render parameter mvcPath , like this: actionResponse. To read the attribute in a JSP, use the method request.

Perhaps you set an attribute into the request in your controller: renderRequest. The example above points to a JSP in docs.

CANON D1120 MANUAL PDF

Creating an MVC Portlet

Fill in the Project name and Display name. The Display name , however, can have spaces. Leave the Use default location checkbox checked. By default, the default location is set to your Plugins SDK. You can also access the New Server Runtime Environment wizard if you need to set up your runtime server; just click the New Liferay Runtime button next to the Liferay Portal Runtime dropdown menu. Select Portlet as your plugin type.

ITEXT UNCOMPRESS PDF

Liferay Tutorial – Liferay Portal Portlet Tutorial

Keep in mind that you can take two paths with your Liferay MVC portlet implementation. As a naming convention, the module with your controller code and view layer is referred to as the WEB module. A very basic WEB module might look like this:. At a minimum, you should specify the bundle symbolic name and the bundle version for the OSGi runtime. Providing a human readable bundle name is also recommended.

HERCULES DJ CONTROL MP3 E2 MANUAL PDF

Introduction to Portlet Development

.

Related Articles