Application Builder  Adding events

Chapter 5: Advanced Portlet Creation

Portlet post-processing options

The key to building virtual applications is the addition of post-processing functions or filters to the application’s portlets. Post-processing functions can either transform a portlet’s content (for example, render the content as a chart), or create events For example, you can transform a portlet’s content into a chart or you can create events that are triggered when a user accesses a portlet’s content. You can add more than one post-processing function to handle a portlet’s content and configure the order in which the postprocessing occurs. When you use multiple postprocessing functions, each function operates on the output of the previous function—similar to a Pipes and Filter design.

NotePipes and Filters is a design architecture where the components are known as filters and the connectors are the pipes. Filters read input data, perform some computation or transformation on the data, and produce output data. Pipes serve as conduits for the data streams, passing outputs from one filter to the inputs of another filter.

The post-processing options are available by right-clicking a portlet in the Application Builder left pane:

All available post-processing modules are configured in the uwp.xml configuration file, which is located in %JAGUAR%\Repository\WebApplication\onepage\fw\properties on Windows and in $JAGUAR/Repository/WebApplication/onepage/fw/properties on UNIX.

To add additional post-processing modules, use this interface:

Public interface PortletProccessingFilter {
     String Process(string content, UWPRequest resquest, 
     UWPResponse response, UWPDataAccess access);
}

The following five post-processing filters will be offered as a part of the current implementation.

<PostProcessingFilters>
    <FilterDef name="Events" class="com.onepage.fw.uwp.filters.events"/>
    <FilterDef name="Listeners" class="com.onepage.fw.uwp.filters.listeners"/>
    <FilterDef name="Forms" class="com.onepage.fw.uwp.filters.forms"/>
    <FilterDef name="Charts" class="com.onepage.fw.uwp.filters.charts"/>
    <FilterDef name="jsp" class="com.onepage.fw.uwp.filters.jsp"/>
</PostProcessingFilters>

There is a method in the UWPManager getPostProcessingFilters that returns a list of configured filters.





Copyright © 2004. Sybase Inc. All rights reserved. Adding events

View this book as PDF