Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 1 (11.1.1.5.0)

E10653-06


oracle.adf.model.binding
Class DCControlBinding

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

All Implemented Interfaces:
java.util.Map
Direct Known Subclasses:
DCParameter, DCPermission, 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.

javabean.class
name=DCControlBinding

Nested Class Summary

 

Nested classes/interfaces inherited from class java.util.AbstractMap
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>

 

Nested classes/interfaces inherited from interface java.util.Map
java.util.Map.Entry<K,V>

 

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
           
static java.lang.String DC_BINDING_ERROR
           
protected  java.lang.Object mAttributeListener
           
protected  boolean mInternalGet_KeyResolved
           
protected  DCPermission mPermission
           
protected  PermissionInfo mPermissionInfo
           
static java.lang.String ROW_KEY_STR
           

 

Fields inherited from class oracle.jbo.common.JboAbstractMap
MAP_NULL_VALUE

 

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)
           
protected  void clearAttrDefs()
           
protected  boolean evaluateBooleanExpression(java.lang.String expr)
           
 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.
protected  UpdateListener getAttributeListener()
           
 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()
           
 DCPermission getPermission()
           
 PermissionInfo getPermissionInfo()
           
 java.lang.String getPermissionTargetName()
           
 Row getRowAtRangeIndex(int rangeIndex)
          Returns the row of given range index.
 RowIterator getRowIterator()
          To be used by subclasses to get to the RowIterator if needed.
 java.lang.Object getState()
          In the process of re-creating a binding container.
 Transaction getTransaction()
          Returns the Transaction object for the current BC4J session.
protected  java.lang.String getViewableExpr()
           
 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 isControlViewable()
           
 boolean isReleased()
          Return true if this binding has been detached from the bindingContainer and thereby is considered released and not usable anymore.
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.
 void release()
           
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 restoreFromState(java.lang.Object state)
          Initialize binding instance with value from state object
 void setBindingContainer(DCBindingContainer formBnd)
           
 void setControl(java.lang.Object control)
          Sets the associated Swing control.
protected  void setDataControlPinned(boolean flag)
          Advanced for internal usage only
protected  void setDef(DCControlBindingDef controlDef)
           
protected  void setIteratorBinding(DCIteratorBinding iterBinding)
          Internal method, don't use.
 void setListener(UpdateListener listener)
           
 void setListener(UpdateListener listener)
           
 void setName(java.lang.String name)
           
protected  void setViewableExpr(java.lang.String str)
           
 java.lang.String toString()
           

 

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

 

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 java.lang.Object mAttributeListener

mPermissionInfo

protected PermissionInfo mPermissionInfo

mPermission

protected DCPermission mPermission

DC_BINDING_ERROR

public static final java.lang.String DC_BINDING_ERROR
See Also:
Constant Field Values

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()
For internal use only. Application developers should not use this
*** For internal framework use only ***

internalSetName

protected void internalSetName(java.lang.String name)

setIteratorBinding

protected void setIteratorBinding(DCIteratorBinding iterBinding)
Internal method, don't use.
Parameters:
iterBinding -

setName

public void setName(java.lang.String name)
For internal use only. Application developers should not use this
*** For internal framework use only ***

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)
For internal use only. Application developers should not use this
*** For internal framework use only ***

getDef

public final DCControlBindingDef getDef()
For internal use only. Application developers should not use this
*** For internal framework use only ***

setDef

protected void setDef(DCControlBindingDef controlDef)
For internal use only. Application developers should not use this
*** For internal framework use only ***

getViewableExpr

protected java.lang.String getViewableExpr()
For internal use only. Application developers should not use this
*** For internal framework use only ***

setViewableExpr

protected void setViewableExpr(java.lang.String str)
For internal use only. Application developers should not use this
*** For internal framework use only ***

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.

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.

getRowIterator

public RowIterator getRowIterator()
To be used by subclasses to get to the RowIterator if needed. This method will force refresh on the iteratorBinding if it is not already refreshed. However if the iteratorBinding is refreshed this method will simply return the current RowIterator from the IteratorBinding which could be a viewcriteria in case of findmode.

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.
For internal use only. Application developers should not use this
*** For internal framework use only ***

getLayoutObject

public java.lang.Object getLayoutObject()
For internal use only. Application developers should not use this
*** For internal framework use only ***

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.
For internal use only. Application developers should not use this
*** For internal framework use only ***

isControlViewable

protected final boolean isControlViewable()

evaluateBooleanExpression

protected boolean evaluateBooleanExpression(java.lang.String expr)

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)
For internal use only. Application developers should not use this
*** For internal framework use only ***

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.
For internal use only. Application developers should not use this
*** For internal framework use only ***

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.

clearAttrDefs

protected void clearAttrDefs()
For internal use only. Application developers should not use this
*** For internal framework use only ***

release

public void release()

release

protected void release(int flags)
For internal use only. Application developers should not use this
*** For internal framework use only ***

isReleased

public final boolean isReleased()
Return true if this binding has been detached from the bindingContainer and thereby is considered released and not usable anymore.

needsEstimatedRowCount

protected boolean needsEstimatedRowCount()

removeFromDCExceptions

protected void removeFromDCExceptions()
For internal use only. Application developers should not use this
*** For internal framework use only ***

resetAttributeExceptionInRow

protected void resetAttributeExceptionInRow(Row row,
                                            AttributeDef def,
                                            AttrValException ave)
For internal use only. Application developers should not use this
*** For internal framework use only *** Used to reset the attribute value in row to original attribute value so that any cached exceptions are dropped.

addToDCExceptions

protected void addToDCExceptions(JboException e)
For internal use only. Application developers should not use this
*** For internal framework use only ***

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: