Oracle ADF Model and Business Components API Reference 10.1.2 B14022-01

oracle.adf.model.binding
Class DCControlBinding

java.lang.Object
  extended byjava.util.AbstractMap
      extended byoracle.jbo.common.JboAbstractMap
          extended byoracle.adf.model.binding.DCControlBinding
All Implemented Interfaces:
java.util.Map
Direct Known Subclasses:
JUControlBinding

public abstract class DCControlBinding
extends 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:

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  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
abstract  void addControlToPanel(java.lang.Object panel, java.lang.Object layoutObject, java.lang.Object layoutCons)
           
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.
 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.
 Transaction getTransaction()
          Returns the Transaction object for the current BC4J session.
 ViewObject getViewObject()
          Returns the ViewObject for which this control is displaying data.
 int hashCode()
           
protected  java.lang.Object internalGet(java.lang.String key)
          Subclasses should override this to handle a specific key.
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(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, 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 setName(java.lang.String name)
           
 java.lang.String toString()
           
 
Methods inherited from class oracle.jbo.common.JboAbstractMap
entrySet, equals
 
Methods inherited from class java.util.AbstractMap
clear, clone, containsKey, containsValue, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

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

addControlToPanel

public abstract void addControlToPanel(java.lang.Object panel,
                                       java.lang.Object layoutObject,
                                       java.lang.Object layoutCons)

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 Transaction getTransaction()
Returns the Transaction object for the current BC4J session.


getApplicationModule

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


getViewObject

public 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(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.


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,
                                            AttrValException ave)

addToDCExceptions

protected void addToDCExceptions(JboException e)

get

public final java.lang.Object get(java.lang.Object keyObj)
Specified by:
get in interface java.util.Map
Overrides:
get in class JboAbstractMap
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
  • Overrides:
    internalGet in class JboAbstractMap

    hashCode

    public int hashCode()
    Specified by:
    hashCode in interface java.util.Map
    Overrides:
    hashCode in class JboAbstractMap

    toString

    public java.lang.String toString()

    Oracle ADF Model and Business Components API Reference 10.1.2 B14022-01

     

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