Business Components

oracle.jbo.uicli.binding
Class JUControlBinding

java.lang.Object
  |
  +--oracle.jbo.uicli.binding.JUControlBinding
Direct Known Subclasses:
JUCtrlActionBinding, JUCtrlScrollBinding, JUCtrlValueBinding

public abstract class JUControlBinding
extends java.lang.Object

The base class for all binding objects in the JClient framework that bind a Swing control/model to a BC4J attribute(s). This class manages:

This class also implements helper methods to access BC4J objects like the Transaction, the current Application Module, the ViewObject that this control binding is working with, the current RowIterator, the current Row in the iterator that this control binding is associated with. It also provides methods to execute the ViewObject behind this again (optionally).


Constructor Summary
TypeConstructor
protected JUControlBinding()
           
  JUControlBinding(java.lang.Object control, JUIteratorBinding 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
TypeMethod
abstract  void addControlToPanel(java.lang.Object panel, java.lang.Object layoutObject, java.lang.Object layoutCons)
          *** For internal framework use only ***
 void executeQuery()
          Calls JUIteratorBinding.executeQuery which in turn executes the query to repopulate the rows for the RowSet with which this control is working.
 void executeQueryIfNeeded()
          Calls JUIteratorBinding.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.
 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.
 java.lang.Object getControl()
          Gets the associated Swing control.
 Row getCurrentRow()
          Returns the current row for which this control is displaying data.
 JUControlDef getDef()
          *** For internal framework use only ***
 JUFormBinding getFormBinding()
          Returns the form binding object that this control binding is part of.
 JUIteratorBinding getIteratorBinding()
          Returns the iterator binding with which this control binding is associated to get it's data.
 java.lang.Object getLayoutObject()
          *** For internal framework use only ***
 java.lang.String getName()
          *** For internal framework use only ***
 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.
protected  boolean isControlQueriable()
          *** For internal framework use only ***
 void reportException(java.lang.Exception ex)
          Report the given exception via the containing FormBinding object.
 void setFormBinding(JUFormBinding formBnd)
          *** For internal framework use only ***
 void setName(java.lang.String name)
          *** For internal framework use only ***
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JUControlBinding

protected JUControlBinding()

JUControlBinding

public JUControlBinding(java.lang.Object control,
                        JUIteratorBinding 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)
*** For internal framework use only ***

getName

public final java.lang.String getName()
*** For internal framework use only ***

setName

public void setName(java.lang.String name)
*** For internal framework use only ***

reportException

public void reportException(java.lang.Exception ex)
Report the given exception via the containing FormBinding object.

getFormBinding

public final JUFormBinding getFormBinding()
Returns the form binding object that this control binding is part of.

setFormBinding

public void setFormBinding(JUFormBinding formBnd)
*** For internal framework use only ***

getDef

public final JUControlDef getDef()
*** For internal framework use only ***

getIteratorBinding

public final JUIteratorBinding getIteratorBinding()
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.

getViewObject

public ViewObject getViewObject()
Returns the ViewObject for which this control is displaying data.

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 JUIteratorBinding.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 JUIteratorBinding.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 Swing control.

getLayoutObject

public java.lang.Object getLayoutObject()
*** For internal framework use only ***

isControlQueriable

protected boolean isControlQueriable()
*** For internal framework use only ***

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.


Business Components