123ArticleOnline Logo
Welcome to 123ArticleOnline.com!
ALL >> Computer-Programming >> View Article

Overview And Coordination Between Portlets By Understanding The Specifications Of Java Portlet 2.0

Profile Picture
By Author: Dylan Rodriguez
Total Articles: 131
Comment this article
Facebook ShareTwitter ShareGoogle+ ShareTwitter Share

For GWT development we need to understand what portlets are. They are web-based components enabling integration between applications and portals during GWT development and also enable offshore java developers to deliver applications on portals. By understanding the Java portlet specification we can know how it can achieve interoperability among portlets and portals by defining the APIs for portlets. The Java Portlet Specification 1.0 brought a world of difference by bringing standards that allow offshore java developers to build portlets that can run in portals. Since its inception it has gone through many real world tests in portal development and deployment. There are some gaps identified by community by will take time to evolve them before being available to public. Till that time vendors have started evolving those gaps and build custom solutions, unfortunately resulting into portlets which are not portable.
In the beginning of the year 2006 an expert group started to work on Java Portlet Specification 2.0 while its version was finalized and approved in 2008. Here we will see the new features that are available in ...
... the later version so as to see how GWT developers can write the portlets with these new features.
Implementation of Java Portlet Specification 2.0 can be done from OpenPortalPortletContainer2.x. Additionally it also provides with a portlet driver that simulates some capabilities of a typical portal product like Web Space Server, Liferay Portal.
Coordination Between Portlets: In order to provide coordination between portlets, the java Portlet specification, JSR 286, introduces below mechanisms:
Events: Portlet events that a portlet can receive and send
Public Render Parameters: Render states that can be shared between portlets
Events
A single way for achieving eventing between portlets is through a portlet session in JSR 168. It makes possible between portlets that are in same web application. While in case of JSR 286 a lifecycle is defined for events making the eventing possible between portlets that are in different web applications.
An event is a lifecycle operation that occurs before the rendering phase. They can be well described as loosely coupled, brokered means of communication between portlets. They also allow portlets to respond on actions or make changes while not relating directly to an interaction of the user. Events are declared in its deployment descriptor by the portlet with the use of event-definition element. Events are specified by each portlet as per its wish of publishing which is done through element supported-publishing-event and those it would like to process is done though element supported-processing-event.
The supported-publishing-event and supported-processing-event elements must reference the event name defined in the portlet application section in an event-definitionelement. Then events are created with the use of setEvent() method at the time of action processing. After its finished the events are processed by the portlet container. Also events are created during the event phase by the setEvent() method on EventResponse. For receiving events implementation of javax.Portlet.EventPortlet interface is must. To receive events, the portlet must implement the javax.Portlet.EventPortlet interface. To target the portlet with an EventRequest and EventResponse object the portlet container calls the processEvent() method for targeting each event to the portlet.
For accessing the triggered process the portlet calls by using the EventRequest.getEvent() method and in return this method returns an object of type Event that encapsulates the current event name and value.
For identifying them uniquely event names are represented as QNames. The event name can be retrieved by using the getQName() method that returns the complete QName of the event, or by using the getName() method that returns only the local part of the event name. The value of the event must be based on the type defined in the deployment descriptor.

For More Information :- Java Development | Java Solutions

Total Views: 191Word Count: 615See All articles From Author

Add Comment

Computer Programming Articles

1. Which Institute Is Best For Coding And Programming In Bhopal?
Author: Shankar Singh

2. Top 9 Benefits Of Custom Mobile Application Development
Author: Byteahead

3. Top 10 Creative Business Ideas For Entrepreneurs
Author: Byteahead

4. Top 10 Apps Like Tiktok Everyone Should Check Out
Author: Byteahead

5. Is The Apple Watch Series 7 Worth It For Seniors?
Author: Ashish

6. The Ultimate Guide To Ebay Product Listing Services: Elevate Your Online Store
Author: rachelvandereg

7. Which Are The Best Java Coding Classes In Bhopal?
Author: Shankar Singh

8. Warehouse Management In Zambia: Essential Features To Look For
Author: Doris Rose

9. Ecommerce Web Design And Development In Melbourne With The Merchant Buddy
Author: themerchantbuddy

10. Why Website Maintenance Is Crucial For Business Success
Author: Yogendra Shinde

11. Boost Your Business With Smart Invoice Pos Software In Zambia
Author: Cecilia Robert

12. How Stablecoin Development Ensures Stability And Security?
Author: Michael noah

13. Công Cụ Tính Chiều Cao Chuẩn Từ Minbin Tool: Đo Lường Và Cải Thiện Chiều Cao Hiệu Quả
Author: KenJi123

14. How To Make A Courier App For Courier Delivery And Tracking Service
Author: Deorwine Infotech

15. Reputation Management In The Digital Age: Protecting And Enhancing Your Law Firm’s Image
Author: jamewilliams

Login To Account
Login Email:
Password:
Forgot Password?
New User?
Sign Up Newsletter
Email Address: