COMPOSITE APPLICATIONS - DESIGN AND MANAGEMENT


Filtering the current user interface view
In many composite applications, one component publishes a property that is consumed by another component. The consumer component then wants to show a IBM® Lotus® Notes® user interface view but have it filtered by the property that was passed in.

For example, a component could publish a property called 'PersonName'. Other components may then want to display recent mails of that person, future meetings with this person, etc. These target components typically have views that show all documents but usually do not have different views - specifically, a view with all documents for one certain person only. For this to work, the view needs to be sorted by a key.

To be able to do this, a built-in action has been added to composite application component databases. The action filters the current user interface view via the first sorted column and shows only the exact matches using a filter as a key. If the view is categorized, it then expands the found category and only shows the documents in the next level.

This action is named FilterCurrentUIViewViaFirstSortedColumn and this action gets a property named KeyFilterType (type string) that is passed in. Views (which all have to be filtered with the key) should contain the exact definition of action "FilterCurrentUIViewViaFirstSortedColumn" that gets the property 'KeyFilterType' (type string) passed in

The following sample WSDL show how to use this action. This WSDL needs to contain the exact definition of the datatype and action.

<types>

<xsd:schema targetNamespace="com.ibm.compositeapps.samples">

<xsd:simpleType name="KeyFilterType">

<xsd:restriction base="xsd:string"/>

</xsd:simpleType>

</xsd:schema>

</types>

<operation name="UpdateUI_Operation">

<portlet:action name="FilterCurrentUIViewViaFirstSortedColumn“

caption="FilterCurrentUIViewViaFirstSortedColumn"

description="FilterCurrentUIViewViaFirstSortedColumn "/>

<input>

<portlet:param name="KeyFilter" partname="KeyFilterPart"

caption="caption.KeyFilter"

description="description.KeyFilter"/>

</input>

</operation>

A Notes listener component picks up the action and calls the API to filter the view and refresh the window. As a result , the currently displayed Notes user interface view is refreshed in the same Notes window using the new filter.

For example, a source component would publish a property 'KeyFilterType' which could be the person name and the target component action will be invoked and the view will be filtered out.

You would use the Composite Application Editor to wire the source component's property with the built in action of the target component.

See Also