|
Business Components | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.jbo.uicli.binding.JUIteratorBinding
JUIteratorBinding is the binding class that interacts with BC4J RowIterator objects to iterate over rows and provide the current row(s) to display to various control bindings. JUIteratorBinding objects are named and uniquely identified by name in a JUFormBinding which acts as a container of iterator bindings. This class handles the events generated from the associated BC4J RowIterator and sends the current Row (rows in range) over to individual control bindings to display current data. This class also manages the findMode data for the associated BC4J iterator and ViewObject.
At runtime, an application can bind an instance of oracle.jbo.NavigatableRowIterator
to a JUIteratorBinding object using the bindRowSetIterator
method.
Constructor Summary |
Type | Constructor |
---|---|
protected |
JUIteratorBinding()
|
|
JUIteratorBinding(ApplicationModule am,
java.lang.String voName,
java.lang.String rsiName)
When the usage only needs one row at a time, use this constructor to create an iterator binding. |
|
JUIteratorBinding(ApplicationModule am,
java.lang.String voName,
java.lang.String rsiName,
int rangeSize)
Use this constructor if a usage needs a specific range size on the associated iterator. |
|
JUIteratorBinding(RowSetIterator rsi)
When an application has a BC4J RowSet it should use this constructor. |
Method Summary |
Type | Method |
---|---|
void |
addActionBinding(JUCtrlActionBinding bnd)
Adds the given action control binding object to its list. |
void |
addValueBinding(JUCtrlValueBinding bnd)
Adds the given control binding object to its list. |
void |
bindRowSetIterator(NavigatableRowIterator iter,
boolean initRangeSize)
Use this method to bind a new instance of RowIterator from a BC4J ViewObject to this iterator. |
void |
executeQuery()
Executes the query or the RowSet behind this iterator binding object. |
void |
executeQueryIfNeeded()
Executes the query or the RowSet behind this iterator binding object if not already executed. |
java.util.ArrayList |
getActionBindingList()
Returns a list of JUCtrlActionBinding objects that are associated with this iterator binding. |
Row[] |
getAllRowsInRange()
Returns an array of rows in the current range of the current RowIterator. |
JUApplication |
getApplication()
Helper method to return the JUApplication from this binding's FormBinding. |
ApplicationModule |
getApplicationModule()
Returns the instance of ApplicationModule in which this iterator binding has an associated iterator. |
Row |
getCurrentRow()
Returns the current row of the iterator with which this binding object is associated. |
JUFormBinding |
getFormBinding()
Return form binding object of this iterator binding's container. |
RowSetIterator |
getLovRowSetIterator()
*** For internal framework use only *** |
java.lang.String |
getName()
Returns the name of this iterator binding. |
NavigatableRowIterator |
getNavigatableRowIterator()
Returns the current RowIterator, which can be a data RowSetIterator or a find mode ViewCriteria based on the find mode. |
Row |
getRowAtRangeIndex(int rangeIndex)
Returns the row of given range index. |
RowSetIterator |
getRowSetIterator()
Returns the current data RowSetIterator that holds rows with which this iterator binding object and its associated control-bindings are working. |
java.lang.Object |
getSyncLock()
*** For internal framework use only *** |
java.util.ArrayList |
getValueBindingList()
Returns a list of JUCtrlValueBinding objects that are associated with this iterator binding. |
java.lang.String |
getViewDefName()
*** For internal framework use only *** Returns the name of the ViewDefinition object. |
ViewObject |
getViewObject()
Returns the instance of ViewObject of the RowIterator to which this iterator binding is associated. |
java.lang.String |
getVOName()
Returns the name of the ViewObject instance of the iterator to which this iterator binding is associated. |
boolean |
isFindMode()
Returns true if this iterator binding is in find mode. |
void |
iteratorClosed(RowSetManagementEvent event)
*** For internal framework use only *** Resets the internal state of this binding object and marks it as unusable. |
void |
iteratorReset(RowSetManagementEvent event)
*** For internal framework use only *** Notifies all control bindings that the BC4J iterator has been reset and there is no current row at this time. |
void |
navigated(NavigationEvent event)
*** For internal framework use only *** |
void |
rangeRefreshed(RangeRefreshEvent event)
*** For internal framework use only *** |
void |
rangeScrolled(ScrollEvent event)
*** For internal framework use only *** |
boolean |
removeActionBinding(JUCtrlActionBinding bnd)
Removes the given action control binding object from its list. |
boolean |
removeValueBinding(JUCtrlValueBinding bnd)
Removes the given control binding object from its list. |
void |
reportException(boolean markDead,
java.lang.Exception ex)
Utility method to report exceptions via the containing Form binding object. |
void |
resolveRangeSize(int rangeSize)
Sets this iterator binding and it's associated RowIterator's range size to the greater of this either the iterator's range size and the given range size. |
void |
rowDeleted(DeleteEvent event)
*** For internal framework use only *** |
void |
rowInserted(InsertEvent event)
*** For internal framework use only *** |
void |
rowUpdated(UpdateEvent event)
*** For internal framework use only *** |
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 |
protected JUIteratorBinding()
public JUIteratorBinding(ApplicationModule am, java.lang.String voName, java.lang.String rsiName, int rangeSize)
public JUIteratorBinding(ApplicationModule am, java.lang.String voName, java.lang.String rsiName)
public JUIteratorBinding(RowSetIterator rsi)
Method Detail |
public final java.lang.String getName()
public void setName(java.lang.String name)
public final java.lang.String getVOName()
public final java.lang.String getViewDefName()
public void reportException(boolean markDead, java.lang.Exception ex)
public void bindRowSetIterator(NavigatableRowIterator iter, boolean initRangeSize)
This method will not directly update the controls. The caller can
optionally call navigated(null)
method, with null for the Event parameter
to notify each control bound to this iterator binding to update it's displayed
value with the new iterator's current row.
iter
- RowIterator instance from which to display data in bound controls.initRangeSize
- determines whether this iterator's range size should be
adjusted to this binding's range size. This should be used to extend the range size
from the default in the RowIterator to whatever is required by this iterator
binding. For example, if a RowIterator whose range size is 1 is passed to this
method and a grid control is bound to this iterator binding, then the grid
may need more than one row to display from the current range. So, this
flag should be true in that case to allow the grid to get the full range
of rows to display, rather than updating its display one row at a time.public void rangeRefreshed(RangeRefreshEvent event)
Handles the rangeRefereshed event generated by the current RowIterator. If the range size of this binding is 1, then calls updateValuesFromRow() with the current row as the argument to notify all control bindings associated with this iterator binding of the change in current row. If the range size is not 1, then this method calls updateValuesFromRows() passing in the current range of rows to all JUCtrlRangeBinding control bindings.
rangeRefreshed
in interface RowSetListener
oracle.jbo.RowSetListener
event
- a description of the new ranges.public void rangeScrolled(ScrollEvent event)
This method invokes updateRangeScrolled method on all instances of JUCtrlRangeBinding objects associated with this iterator binding, to notify them of the change in current range of rows.
rangeScrolled
in interface RowSetListener
oracle.jbo.RowSetListener
event
- a description of the new range.public void rowInserted(InsertEvent event)
If range size of this iterator binding is not 1, this method invokes updateRowInserted method on all instances of JUCtrlValueBinding objects associated with this iterator binding, to notify them of the newly inserted row.
rowInserted
in interface RowSetListener
oracle.jbo.RowSetListener
event
- a description of the new Row object.public void rowDeleted(DeleteEvent event)
If range size of this iterator binding is not 1, this method invokes updateRowDeleted method on all instances of JUCtrlValueBinding objects associated with this iterator binding, to notify them of the newly inserted row.
This method also sets the currency on the RowIterator to the next row (if available) or previous row (if available) or simply a NO row by calling navigated() with no current row.
rowDeleted
in interface RowSetListener
oracle.jbo.RowSetListener
event
- a description of the deleted Row object.public void rowUpdated(UpdateEvent event)
Invokes updateValuesFromRow() to notify all control bindings of a change in an attribute in the row.
rowUpdated
in interface RowSetListener
oracle.jbo.RowSetListener
event
- a description of the modified Row object.public void navigated(NavigationEvent event)
Calls updateNavigated() for all JUCtrlRangeBinding instances associated with this iterator binding object, or calls updateValuesFromRow() on all other control binding instances, passing in the current row instance from the RowIterator.
navigated
in interface RowSetListener
oracle.jbo.RowSetListener
event
- a description of the new and previous current rows.public final java.lang.Object getSyncLock()
public void iteratorReset(RowSetManagementEvent event)
iteratorReset
in interface RowSetManagementListener
oracle.jbo.RowSetManagementListener
event
- a description of the event.public void iteratorClosed(RowSetManagementEvent event)
iteratorClosed
in interface RowSetManagementListener
oracle.jbo.RowSetManagementListener
event
- a description of the event.public ApplicationModule getApplicationModule()
public ViewObject getViewObject()
public void resolveRangeSize(int rangeSize)
public RowSetIterator getRowSetIterator()
public NavigatableRowIterator getNavigatableRowIterator()
public final boolean isFindMode()
public void executeQuery()
public void executeQueryIfNeeded()
public Row getCurrentRow()
public Row getRowAtRangeIndex(int rangeIndex)
rangeIndex
- The range index of the row.public Row[] getAllRowsInRange()
public JUFormBinding getFormBinding()
public void setFormBinding(JUFormBinding formBnd)
public JUApplication getApplication()
public java.util.ArrayList getValueBindingList()
public void addValueBinding(JUCtrlValueBinding bnd)
public boolean removeValueBinding(JUCtrlValueBinding bnd)
public java.util.ArrayList getActionBindingList()
public void addActionBinding(JUCtrlActionBinding bnd)
public boolean removeActionBinding(JUCtrlActionBinding bnd)
public RowSetIterator getLovRowSetIterator()
|
Business Components | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |