C H A P T E R 31 |
Object Adapter Model |
The Object Adapter Model provides access to any object's, or any of its contained objects', fields, bean properties, and/or methods using path expressions that specify deep access to object members.
After the Object Class Name property has been set for the model, and if that class is compiled and loadable, the general keypath binding chooser is available for browsing, or for use when binding to display fields on views. Although views may bind to anonymous path expressions, the developer may also create named model fields that act as aliases to complex path expressions to help isolate changes in the object graph from clients of the model. This can be done manually after adding a model field and setting the model field properties, or automatically by invoking the Browse/Add Object Field Bindings action.
This component implements com.iplanet.jato.model.ExecutingModel, and may have model operations declared in the IDE. These model operations are mapped to the top-level methods on the adapted object class, and only these methods may be exposed as model operations. Although path expressions may invoke a deep method in the object graph, the current implementation only supports methods with zero parameters or string literal parameters. Model operations may be created manually by adding a new model operation and editing the property sheet for the operation name and parameters. Operations may be automatically added using the contextual menu choice Complete Missing Operations.
Invoking this action will ensure that there are at least a set of model operations representative of the top-level public methods on the adapted object. Please refer to the detailed JavaDocs which describe the storage mechanism for model operations parameters and return values.
Invoking this action opens the binding chooser dialog and allows the developer to explore properties and operations of the object (properties are only available if the object is a JavaBean, and operations are only available if operations have been defined for top-level object methods). The dialog displays the key path expression for the currently selected node in the object graph. Nodes in the object graph which represent datasets have path expressions highlighted and denoted as dataset names. Selecting OK will generate a new model field for the currently selected node in the graph. Selecting Cancel will exit the dialog without adding a field. Developers may also highlight the current path expression and copy it to the clipboard. This capability is useful when setting the Default Dataset Name property, or the Primary Dataset Name property of a TiledView.
Describes zero or more parameters for the method of this operation. |
Copyright © 2003, Sun Microsystems, Inc. All rights reserved.