Learn all about the second version of the Java Portlet Specification (JSR ). In Version , the specification and the APIs more than doubled. The Java Portlet Specification addresses the requirements of aggregation, was approved by the Java Community Process in March as JSR This tutorial on JSR development provides an introduction to portlet programming as the reader is taken through the creation of a simple HelloWorld portlet.
|Published (Last):||20 January 2004|
|PDF File Size:||7.6 Mb|
|ePub File Size:||10.53 Mb|
|Price:||Free* [*Free Regsitration Required]|
As a result of not encoding any state of the page and portlets on the page, you cannot count on getting the current render parameters, portlet mode, or window state in your portlet. Here before portlet execute render phase it can send events to other portlets. This will add advantage to perform spefification events or some actions before portlet is rendered.
In JSRthe portlet could leverage only portlet modes that are supported by the portal framework running the portlet. There are many open source and commercial Portlets Catalog available but JSR based solutions are rare.
Java Portlet Specification – Wikipedia
As we have seen, JSR provides you with the means to serve resources directly using the portlet. Web content structure 1 velocity templates 1 vm varibles 1 wcm 1 web application 1 web applications 1 web content display 1 web content email forms 1 web content froms 1 web content structures 1 web content template 1 web content templates 1 web content to pdf 1 web content velocity variables 1 web content workflow 1 web server 1 web service invoker 1 wedeploy 1 workflow definition xml 1 workflow designer 1 xhtml 1 xpath 1 yahoo news 1 yahoo stocks 1 yahoo weather 1 yql 1 yui 1.
One advantage of serving resources through a servlet is less overhead because the request does not have to pass through the additional portal framework, for example, when serving large media streams. Note that you need to set this list of modes on each response and that you should enable the container runtime option javax. Portlet Filter and Listeners. These remote portlets may not be written in Java, and so we need a more general mechanism than the Java serialization.
New lifecycle phase added in portlet lifecycle. Generally if any portlet is have in action page other portlet need to render the portlet within the page. You receive these parameters in the serveResource call. The last element in the filter chain is the portlet itself. A portlet container is not responsible for aggregating the content produced by the portlets; the portal itself handles aggregation.
The only way to share data between the portlet and the servlet is to use the application-scope session or the parameter on the URL that invokes the servlet.
You can find a complete list of the members of the expert group here.
What’s new in the Java Portlet Specification V2.0 (JSR 286)?
Share to Twitter Share to Facebook. If, for example, the request to the back-end server takes up 90 percent of the time to render the portlet, it does not make sense to use validation-based caching to save only the remaining 10 percent rendering time.
Figure 3 depicts an example where a navigator portlet and a content portlet share the same public parameter docid.
Because the markup returned from serveResource is not aggregated with other markup from the portal framework, the resource response allows full control over the output stream. Typical applications of portlet filters could include these:.
What’s new in the Java Portlet Specification V (JSR )?
Specifying the shared property enables the portal to use only one version of such shared resources per page. Therefore, the JSR specification lets you indicate for which portlet modes the portal should display UI controls as part of the render response using the method setNextPossiblePortletModes. Now the Java Portlet Specification has grown up, and it allows you to implement most use cases without specificatiob need to have vendor extensions.
Standard portlet API
GenericPortlet also lets you use the following annotations to make dispatching life-cycle calls to specific handler code easier:. Most portlet API objects, for example, portlet session or portlet preferences, do implicit namespacing, but you need to do explicit namespacing portelt you access portley data stores or want to assign unique IDs to output elements. The only exceptions to this rule are the following slight behavior changes that normally should not break any portlets:.
A portlet container contains portlets and manages their life cycles.
This practice is common for Ajax applications, which can particularly benefit from the two enhancements that version 2. We will define specificatiob public render parameter such a way it will available to other portlet to get the data from that. If nothing has changed in the back-end system, you validate that the expired cache content is still valid to use by setting the CacheControl. What’s new in the Java Portlet Specification V2. The ordinary parameter access methods return the merged set of these three parameter maps.
Liferay Top Contributor Award Winner.
The Java Portlet Specification V1. At development time, you define only the data that a portlet understands, and the actual connections between portlets are created at deployment or runtime. There are many different use cases for serving resources; therefore, there are also different requirements for the ability to cache serveResource calls.