
Custom controls can be bound to context nodes and attributes. Nodes that are not contained in the view context of a custom control cannot be accessed directly. These nodes have to be mapped first into the view context of the view containing the custom control.
Navigate to the Layout tab page of the View.
Select the custom control.
Select the dataSource property, and choose Bind .
In the Context Viewer dialog, select the context node.
Choose OK .
Navigate to the Context tab page.
Select the context node.
Set the Collection Cardinality and Selection Cardinality of the context node to 1..1 .
In the Java Editor of the view, write code to bind the custom control to a context node attribute.
You can bind a single context node attribute using the ViewItem#bindProperty() method. This code snippet is implemented within the wdDoModifyView() method
//Binding the enabled property of custom control to a context node attribute "Status"
view.getInteractiveFormViewItem().bindProperty("enabled", wdContext.nodeorder(), "Status");
In the Java perspective, expand the mobile Java component.
Implement the setContextNode(IWDNode node) method in the adapter class.
More information: http://help.sap.com/javadocs