Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Oracle Application Development Framework Model Java API Reference 10g Release 3 (10.1.3) B25778-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.adf.model.binding
Class DCControlBinding

`java.lang.Object
java.util.AbstractMap
oracle.jbo.common.JboAbstractMap
oracle.adf.model.binding.DCControlBinding`

All Implemented Interfaces:
  java.util.Map

Direct Known Subclasses:
  DCParameter, JUControlBinding

public abstract class DCControlBinding
extends oracle.jbo.common.JboAbstractMap

The base class for all binding objects in the ADF framework that bind a View control/model to an object or an attribute of an object in a DataControl. This class manages:

- The references to the View control object.
- The IteratorBinding with which the binding object is in association
- The container binding that this binding belongs to
- The internal-state for findMode

This class also implements helper methods to access DataProvider objects like the DataProvider object itself, the current Application Module, the ViewObject or the DataProvider object that this control binding is working with, the current RowIterator, the current Row in the iterator that this control binding is associated with.

Nested Class Summary

Nested classes inherited from class java.util.Map
`java.util.Map.Entry`

Field Summary
`static java.lang.String` | `ATTR_CURRENTROW`
`static java.lang.String` | `ATTR_DEF`
`static java.lang.String` | `ATTR_ERROR`
`static java.lang.String` | `ATTR_ERRORS`
`static java.lang.String` | `ATTR_FULLNAME`
`static java.lang.String` | `ATTR_ITER`
`static java.lang.String` | `ATTR_NAME`
`protected oracle.adf.model.UpdateListener` | `mAttributeListener`
`protected boolean` | `mInternalGet_KeyResolved`
`static java.lang.String` | `ROW_KEY_STR`

Constructor Summary
`protected` | `DCControlBinding()`
`` | `DCControlBinding(java.lang.Object control, DCIteratorBinding iterBinding)` Constructor used in the framework to pass in the Swing control and the Iterator Binding with which this binding object works to get it's data.

Method Summary
`protected void` | `addToDCExceptions(JboException e)`
`void` | `executeQuery()` Calls DCIteratorBinding.executeQuery which in turn executes the query to repopulate the rows for the RowSet with which this control is working.
`void` | `executeQueryIfNeeded()` Calls DCIteratorBinding.executeQueryIfNeeded which in turn executes the query to repopulate the rows for the RowSet with which this control is working, if it is not already executed.
`java.lang.Object` | `get(java.lang.Object keyObj)`
`Row[]` | `getAllRowsInRange()` Returns the rows in current range in the RowIterator with which this control binding is working.
`oracle.jbo.ApplicationModule` | `getApplicationModule()` Returns the Application Module to which this control's ViewObject belongs.
`DCBindingContainer` | `getBindingContainer()` Returns the form binding object that this control binding is part of.
`java.lang.Object` | `getControl()` Gets the associated View (Swing) control.
`java.lang.Object` | `getControlModel(java.lang.Object control)` Gets the associated View's model object.
`Row` | `getCurrentRow()` Returns the current row for which this control is displaying data.
`DCIteratorBinding` | `getDCIteratorBinding()` Returns the iterator binding with which this control binding is associated to get it's data.
`DCControlBindingDef` | `getDef()`
`java.lang.String` | `getDefFullName()`
`java.lang.String` | `getDefName()`
`protected JboException` | `getError()` Primarily for spel support.
`protected java.util.List` | `getErrors()` Primarily for spel support.
`java.lang.String` | `getFullName()`
`java.lang.Object` | `getLayoutObject()`
`java.lang.String` | `getName()`
`Row` | `getRowAtRangeIndex(int rangeIndex)` Returns the row of given range index.
`RowIterator` | `getRowIterator()` Returns the current RowIterator with which this control binding is working.
`oracle.jbo.Transaction` | `getTransaction()` Returns the Transaction object for the current BC4J session.
`oracle.jbo.ViewObject` | `getViewObject()` Returns the ViewObject for which this control is displaying data.
`int` | `hashCode()`
`protected abstract void` | `initResources()` Invoked when the bindingContainer is being initialized for the first time or after it's locale is changed.
`protected java.lang.Object` | `internalGet(java.lang.String key)` Subclasses should override this to handle a specific key.
`protected boolean` | `internalHasPermission(java.lang.String action)`
`protected boolean` | `internalHasPermission(java.lang.String target, java.lang.String action)`
`protected void` | `internalSetName(java.lang.String name)`
`protected boolean` | `isControlQueriable()` Returns true if this control can participate in find form.
`protected boolean` | `needsEstimatedRowCount()`
`protected void` | `processInputException(oracle.jbo.ValidationException vex)`
`abstract void` | `refreshControl()` Updates the values in a control that is bound using an Iterator already in use.
`protected void` | `release(int flags)`
`protected void` | `removeFromDCExceptions()`
`void` | `reportException(java.lang.Exception ex)` Report the given exception via the containing BindingContainer object.
`protected void` | `resetAttributeExceptionInRow(Row row, AttributeDef def, oracle.jbo.AttrValException ave)`
`protected abstract void` | `resetInputState()` Resets any exceptions and client-side values that this binding may hold.
`void` | `setBindingContainer(DCBindingContainer formBnd)`
`void` | `setControl(java.lang.Object control)` Sets the associated Swing control.
`void` | `setListener(oracle.adf.model.UpdateListener listener)`
`void` | `setListener(UpdateListener listener)`
`void` | `setName(java.lang.String name)`
`java.lang.String` | `toString()`

Methods inherited from class oracle.jbo.common.JboAbstractMap
`entrySet, equals, internalPut, put`

Methods inherited from class java.util.AbstractMap
`clear, clone, containsKey, containsValue, isEmpty, keySet, putAll, remove, size, values`

Methods inherited from class java.lang.Object
`finalize, getClass, notify, notifyAll, wait, wait, wait`

Field Detail

### mAttributeListener

    protected oracle.adf.model.UpdateListener mAttributeListener

### ROW_KEY_STR

    public static final java.lang.String ROW_KEY_STR

  See Also:
    Constant Field Values

### ATTR_ITER

    public static final java.lang.String ATTR_ITER

  See Also:
    Constant Field Values

### ATTR_DEF

    public static final java.lang.String ATTR_DEF

  See Also:
    Constant Field Values

### ATTR_ERROR

    public static final java.lang.String ATTR_ERROR

  See Also:
    Constant Field Values

### ATTR_ERRORS

    public static final java.lang.String ATTR_ERRORS

  See Also:
    Constant Field Values

### ATTR_FULLNAME

    public static final java.lang.String ATTR_FULLNAME

  See Also:
    Constant Field Values

### ATTR_NAME

    public static final java.lang.String ATTR_NAME

  See Also:
    Constant Field Values

### ATTR_CURRENTROW

    public static final java.lang.String ATTR_CURRENTROW

  See Also:
    Constant Field Values

### mInternalGet_KeyResolved

    protected boolean mInternalGet_KeyResolved

Constructor Detail

### DCControlBinding

    protected DCControlBinding()

### DCControlBinding

    public DCControlBinding(java.lang.Object control,
                            DCIteratorBinding iterBinding)

  Constructor used in the framework to pass in the Swing control and the Iterator Binding with which this binding object works to get it's data.

Method Detail

### getName

    public final java.lang.String getName()

### internalSetName

    protected void internalSetName(java.lang.String name)

### setName

    public void setName(java.lang.String name)

### getFullName

    public final java.lang.String getFullName()

### getDefName

    public java.lang.String getDefName()

### getDefFullName

    public java.lang.String getDefFullName()

### reportException

    public void reportException(java.lang.Exception ex)

  Report the given exception via the containing BindingContainer object.

### getBindingContainer

    public final DCBindingContainer getBindingContainer()

  Returns the form binding object that this control binding is part of.

### setBindingContainer

    public void setBindingContainer(DCBindingContainer formBnd)

### getDef

    public final DCControlBindingDef getDef()

### getDCIteratorBinding

    public final DCIteratorBinding getDCIteratorBinding()

  Returns the iterator binding with which this control binding is associated to get it's data.

### getTransaction

    public oracle.jbo.Transaction getTransaction()

  Returns the Transaction object for the current BC4J session.

### getApplicationModule

    public oracle.jbo.ApplicationModule getApplicationModule()

  Returns the Application Module to which this control's ViewObject belongs. Returns null in case of non-bc4j bound DataControls.

### getViewObject

    public oracle.jbo.ViewObject getViewObject()

  Returns the ViewObject for which this control is displaying data. Returns null in case of non-bc4j bound data-controls.

### getRowIterator

    public RowIterator getRowIterator()

  Returns the current RowIterator with which this control binding is working. This will return an instance of ViewCriteria object if the associated IteratorBinding is in find mode. Otherwise, it returns an instance of RowSetIterator.

### executeQuery

    public void executeQuery()

  Calls DCIteratorBinding.executeQuery which in turn executes the query to repopulate the rows for the RowSet with which this control is working.

### executeQueryIfNeeded

    public void executeQueryIfNeeded()

  Calls DCIteratorBinding.executeQueryIfNeeded which in turn executes the query to repopulate the rows for the RowSet with which this control is working, if it is not already executed.

### getCurrentRow

    public Row getCurrentRow()

  Returns the current row for which this control is displaying data. In find mode, this will return an instance of ViewCriteriaRow, whereas in data mode it returns a Row object. This method should be used to get the current Row to which this control is bound in order to perform any validations on the control-value or data stored in the row.

### getRowAtRangeIndex

    public Row getRowAtRangeIndex(int rangeIndex)

  Returns the row of given range index.
  Parameters:
    `rangeIndex` - range index of the row.

### getAllRowsInRange

    public Row[] getAllRowsInRange()

  Returns the rows in current range in the RowIterator with which this control binding is working.

### getControl

    public java.lang.Object getControl()

  Gets the associated View (Swing) control.

### getControlModel

    public java.lang.Object getControlModel(java.lang.Object control)

  Gets the associated View's model object. By default return this binding object. If subclasses have their own View models that work with like say ButtonModel for JUButtonBinding, then return that.

  This method is primarily for use by the generated binding calls so that it returns a proper 'typed' model object for that binding type and control combination.

### setControl

    public void setControl(java.lang.Object control)

  Sets the associated Swing control.

### getLayoutObject

    public java.lang.Object getLayoutObject()

### isControlQueriable

    protected boolean isControlQueriable()

  Returns true if this control can participate in find form. Note that some controls like ProgressBar cannot participate in a find form as they do no accept user inputs. By default this method returns false and it's up to the individual control bindings to determine whether they can participate in a find mode.

### getError

    protected JboException getError()

  Primarily for spel support. Returns cached exception for some bindings.

  Returns exception that occured on last setInputValue

### getErrors

    protected java.util.List getErrors()

  Primarily for spel support. Returns cached exceptions for some bindings.

  Returns a list of exceptions that occured on last setInputValue

### processInputException

    protected void processInputException(oracle.jbo.ValidationException vex)

### resetInputState

    protected abstract void resetInputState()

  Resets any exceptions and client-side values that this binding may hold. This is used by control-bindings to reset their state before refreshing values from the MT.

### initResources

    protected abstract void initResources()

  Invoked when the bindingContainer is being initialized for the first time or after it's locale is changed. This gives subclasses a chance to drop their initialized locale based resources.

### refreshControl

    public abstract void refreshControl()

  Updates the values in a control that is bound using an Iterator already in use. (a valid row iterator) If you do not call this method, your control won't update unless you refresh the Iterator.

### release

    protected void release(int flags)

### needsEstimatedRowCount

    protected boolean needsEstimatedRowCount()

### removeFromDCExceptions

    protected void removeFromDCExceptions()

### resetAttributeExceptionInRow

    protected void resetAttributeExceptionInRow(Row row,
                                                AttributeDef def,
                                                oracle.jbo.AttrValException ave)

### addToDCExceptions

    protected void addToDCExceptions(JboException e)

### get

    public final java.lang.Object get(java.lang.Object keyObj)

  See Also:
    `for valid keyObj values`

### internalGet

    protected java.lang.Object internalGet(java.lang.String key)

  Subclasses should override this to handle a specific key. If they do find the key valid, they should also set the mInternalGet_KeyResolved to 'true' so that bean-introspection is not done for valid null-value returns from the internalGet() call.

  Properties returned vis getter on this control bindings are:

  - `def` - returns getDef()
  - `error` - returns getError()
  - `errors` - returns getErrors()
  - `fullName` - returns getFullName()
  - `name` - returns getName()
  - `currentRow` - returns getCurrentRow()
  - `iteratorBinding` - returns getDCIteratorBinding()
  - `rowKeyStr` - returns String format of the current row's key

### hashCode

    public int hashCode()

### toString

    public java.lang.String toString()

### setListener

    public void setListener(oracle.adf.model.UpdateListener listener)

### setListener

    public void setListener(UpdateListener listener)

### internalHasPermission

    protected boolean internalHasPermission(java.lang.String action)

### internalHasPermission

    protected boolean internalHasPermission(java.lang.String target,
                                            java.lang.String action)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Oracle Application Development Framework Model Java API Reference 10g Release 3 (10.1.3) B25778-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 1997, 2005, Oracle. All rights reserved.