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

oracle.adf.model.binding
Class DCBindingContainer

java.lang.Object
  extended byjava.util.AbstractMap
      extended byoracle.jbo.common.JboAbstractMap
          extended byoracle.adf.model.binding.DCBindingContainer
All Implemented Interfaces:
JboExceptionHandler, java.util.Map
Direct Known Subclasses:
JUFormBinding

public class DCBindingContainer
extends JboAbstractMap
implements JboExceptionHandler

Corresponds to a Swing JFrame or a JSP Page instance and manages bindings used in a frame. The DCBindingContainer class provides:


Expression language usage

The binding container properties are accessed via SPEL. Any of the getter methods can be invoked via expressions. The expression language can also traverse any of the collection exposed by this object.

The binding container provides access to all the contained bindings. It implements the map interface which makes it convenient for using SPEL to locate the children of the binding container. A common usage in JSP pages is to access the binding container within the page's context via the bindings variable. Somce sample expressions using JSTL are as follows:


//output the binding container's name
<c:out value="${bindings.name" />
// print out the editing mode string
<c:out value="${bindings.editingMode" />
// print out the input value of a control binding called 'deptno'
<c:out value="${bindings.deptno.inputValue" />


See Also:
oracle.jbo.uicli.jui.DCPanelBinding

Nested Class Summary
 
Nested classes inherited from class java.util.Map
java.util.Map.Entry
 
Field Summary
protected  java.util.ArrayList mControlList
           
protected  DCDataControl mDataControl
           
protected  ApplicationModule mDataProvider
           
protected  java.util.ArrayList mIterBindingList
           
 
Constructor Summary
  DCBindingContainer()
          Default constructor.
protected DCBindingContainer(java.lang.Object panel)
          Constructor used by DCPanelBinding, which passes in a reference to the JPanel object.
 
Method Summary
 void addControlBinding(DCControlBinding control)
          *** For internal framework use only *** Adds a controlbinding object to this container.
 void addControlBinding(java.lang.String name, DCControlBinding control)
          *** For internal framework use only ***
 void addIteratorBinding(DCIteratorBinding iterBinding)
          Adds the given iterator binding name with a framework generated name.
 void addIteratorBinding(java.lang.String name, DCIteratorBinding iterBinding)
          Adds this iterator binding with this form with the given name.
 void addStatusBarInterface(DCStatusBarInterface statusBar)
          Helper method to add the given object to the JUApplication's StatusBars.
 void addValidationListener(DCBindingContainerValidationListener l)
          Adds the given listener to this binding container's validation listeners list.
 void beforeCurrencyChange(DCBindingContainerValidationEvent ev)
          Notifies all JUPanelValidationListeners with the beforeCurrencyChange event.
 void beforeSaveTransaction(DCBindingContainerValidationEvent ev)
          Notifies all JUPanelValidationListeners with the beforeSaveTransaction event.
 void beforeSetAttribute(DCBindingContainerValidationEvent ev)
          Notifies all DCBindingContainerValidationListeners with the beforeSetAttribute event.
 void cacheException(JboException ex)
           
 void callBeforeRowNavigated(DCIteratorBinding iter)
          Forces the current control to stop its editing mode (if used, like in JTable).
 void callBeforeSaveTransaction(DCDataControl dc)
          Forces the current control to stop its editing mode (if used, like in JTable).
 java.lang.Object callBeforeSetAttribute(DCControlBinding ctrl, Row row, AttributeDef ad, java.lang.Object value)
          Invoked before any control binding performs a setAttribute call on a BC4J row.
protected  void clearIteratorBindings()
          *** For internal framework use only *** Clean all iterator bindings registered with this form.
protected  DCIteratorBinding createIteratorBinding(java.lang.String voInstanceName, java.lang.String voIterName, java.lang.String voIterBindingName, int rangeSize)
           
 void displayStatus(DCIteratorBinding iterBinding, java.lang.String msgId, java.lang.Object[] params)
          Helper method to display the given message and params via the JUApplication's displayStatus method.
 void displayStatus(java.lang.String msg)
          Helper method to display the given message string via the JUApplication's displayStatus method.
 void execute()
          Execute the query behind each iterator binding that is contained in this form binding.
 void executeIfNeeded()
          Excecute the query for each iterator binding, if not already executed.
 DCControlBinding findCtrlBinding(java.lang.String name)
          Returns a control binding with the given name.
 DCIteratorBinding findIteratorBinding(java.lang.String name)
          Returns the iterator binding object of the given name.
 java.lang.Object findNamedObject(java.lang.String expr)
          *** For internal framework use only ***
 void finishedProcessingPiggyback(java.lang.Exception[] exArr)
           
protected  void focusGained(DCIteratorBinding iterBinding, DCControlBinding binding, int attrIndex)
          Invoked by the framework to notify various status bars of which control has gained the focus.
 java.lang.Object get(java.lang.Object keyObj)
          Lookup the keyObj in the namespace of this binding-container.
 ApplicationModule getApplicationModule()
          Deprecated. since 10.1.2. Use IteratorBinding.getDataControl() to get to the ApplicationModule in case of BC4J datacontrols.
 BindingContext getBindingContext()
          Returns the bindingContext to which this bindingContainer belongs.
 DCControlBinding getCtrlBinding(int index)
          *** For internal framework use only ***
 DCControlBinding getCtrlBinding(java.lang.Object control)
          Matches the control with the View-component(getControl) for each of the control bindings in this container.
 java.util.ArrayList getCtrlBindingList()
          Returns an array containing all control-bindings in this container.
 DCDataControl getDataControl()
          *** For internal framework use only *** Returns the DCApplciation object to which this form binding belongs.
 DCBindingContainerDef getDef()
          *** For internal framework use only ***
 java.lang.String getEditingMode()
          Returns "* Find Mode" if this bindingContainer is in find mode.
 java.util.ArrayList getExceptionsList()
          Returns a list of exceptions that has been cached on this bindingContainer.
 DCIteratorBinding getIteratorBinding(java.lang.String voInstanceName, java.lang.String voIterName, java.lang.String voIterBindingName)
          Return an Iterator Binding of the given "voIterBindingName" if one already exists by that name.
 DCIteratorBinding getIteratorBinding(java.lang.String voInstanceName, java.lang.String voIterName, java.lang.String voIterBindingName, int rangeSize)
          Return an Iterator Binding of the given "voIterBindingName", if one already exists by that name, after setting up the iterator binding's range Size to the greater of existing range size and the given range size.
 java.util.ArrayList getIterBindingList()
          Return an ordered set of iterator bindings.
 java.util.HashMap getIterBindings()
          Return the hashmap containing iterator bindings
 LocaleContext getLocaleContext()
          Returns the locale context set into the BC4J application module if this binding-container's datacontrol is a Bc4J data control.
 java.lang.String getName()
          Returns the instance name of this DCBindingContainer object.
protected  ViewObject[] getOrderedVOUsageList(DCDataControl dc)
          Returns an ordered list of ViewObject usages in this panel so that a JboException parameters can be transformed from Entity-layer names and exception parameters to ViewObject names and parameters.
 java.lang.String getStateToken()
          Returns the container state.
 java.lang.String getStateTokenId()
          Returns the container state token.
 java.util.ArrayList getValidationListeners()
          Returns a list of ValidationListeners (returns an empty list if no such listener was registered).
 java.lang.Object getViewComponent()
          *** For internal framework use only *** Returns the associated JPanel object.
 void handleException(java.lang.Exception ex, boolean lastEntryInPiggyback)
          Catches an exception thrown by the middle tier.
 void handleWarning(JboWarning warn)
          Catches a warning thrown by the middle tier.
 int hashCode()
           
protected  void initializeApplicationModule()
          *** For internal framework use only *** Used to setup reference to DCDataControl and oracle.jbo.Application objects.
 void initializeFromDef(BindingContext ctx, ApplicationModule am)
          *** For internal framework use only ***
protected  void initializeViewComponent(java.util.ArrayList controls)
          *** For internal framework use only ***
protected  java.lang.Object internalGet(java.lang.String key)
          This method may be overridden by subclasses to implement public spel lookup strings.
protected  boolean isEditingStopped()
          Jclient uses this to indicate if stopEdit completed before datacontrol can proceed with update cycle (commit etc).
 boolean isErrorHandlerActive()
           
 boolean isExecuteOnRollback()
          Returns true if this form binding executes all the ViewObjects it's associated with after rollback is called on the application via DCCtrlActionBinding's rollback action.
 boolean isFindMode()
          Returns true if this form is in find mode.
 boolean isTokenValidationEnabled()
          Returns true if token validation is enabled for this binding container.
protected  void navigated(DCIteratorBinding iter, NavigationEvent event)
          Invoked when a DCIteratorBinding receives a navigated Event from BC4J RowSetIterator
protected  void notifyIteratorChanged(DCIteratorBinding iterBnd, boolean refresh)
          Notify each listener of the iteratorChanged event when an iterator changes its data due to execute, re-execute, or change in display mode (find mode or data mode).
 void processException(JboException ex)
          Matches a control-binding with the exception or one of it's detail exceptions if the exception or one of it's detail excpetions is an AttrValException and the control-binding is bound to that attribute.
 void processInputValues(java.util.Map inputValues)
           
protected  void rangeRefreshed(DCIteratorBinding iter, RangeRefreshEvent event)
          Invoked when a DCIteratorBinding receives a rangeRefreshed Event from BC4J RowSetIterator
protected  void rangeScrolled(DCIteratorBinding iter, ScrollEvent event)
          Invoked when a DCIteratorBinding receives a rangeScrolled Event from BC4J RowSetIterator
 void refreshControl()
          Refresh the binding container with control data.
 void release()
          release all view and datacontrol references from this binding-container and all it's containee iterator bindings and control bindings.
 void release(int flags)
          Applications should release the DataControl which will end up calling this method for all binding containers in the datacontrol.
 boolean removeControlBinding(DCControlBinding control)
          *** For internal framework use only ***
 boolean removeControlBinding(java.lang.String name)
          *** For internal framework use only ***
 boolean removeIteratorBinding(java.lang.String name)
          If an iterator binding exists with the given name, remove it from the internal members.
 void removeStatusBarInterface(DCStatusBarInterface statusBar)
          Helper method to remove the given object to the JUApplication's StatusBars.
 void removeValidationListener(DCBindingContainerValidationListener l)
          Removes the given listener from this binding container's validation listeners list.
 void reportException(java.lang.Throwable th)
          If DCDataControl is setup, then invoke DCDataControl.reportException to report any exceptions.
 void resetInputState()
          Resets the error state for all control bindings.
protected  void rowDeleted(DCIteratorBinding iter, DeleteEvent event)
          Invoked when a DCIteratorBinding receives a rowDeleted Event from BC4J RowSetIterator
protected  void rowInserted(DCIteratorBinding iter, InsertEvent event)
          Invoked when a DCIteratorBinding receives a rowInserted Event from BC4J RowSetIterator
protected  void rowUpdated(DCIteratorBinding iter, UpdateEvent event)
          Invoked when a DCIteratorBinding receives a rowUpdated Event from BC4J RowSetIterator
 void setApplicationModule(ApplicationModule am)
          *** For internal framework use only *** Sets the ApplicationModule reference
protected  void setBindingContext(BindingContext ctx)
          *** For internal framework use only ***
 void setDataControl(DCDataControl app)
          Sets the DCDataControl instance in this form binding.
 void setEnableTokenValidation(boolean bSet)
          Enables or disables token validation.
 void setErrorHandlerActive(boolean flag)
           
 void setExecuteOnRollback(boolean flag)
          Set false if this form binding should not execute all the ViewObjects it's associated with after rollback is called on the application via DCCtrlActionBinding's rollback action.
 void setFindMode(boolean mode)
          Calls setFindMode(boolean mode, boolean applyCriteria) with applyCriteria = true;
 void setFindMode(boolean mode, boolean applyCriteria)
          Sets this form into findMode.
 void setName(java.lang.String name)
          *** For internal framework use only ***
protected  void setViewComponentInternal(java.lang.Object panel)
          *** For internal framework use only *** Sets internal member variable with the given panel instance.
 java.lang.String toString()
           
 void validateInputValues()
          Calls DataControl.validate() for each data control that has a collection to which an iterator binding in this container is bound to.
 void validateToken(java.lang.String sState)
          validates that this container is in the same state as represented by the given string token
 
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

mDataControl

protected DCDataControl mDataControl

mIterBindingList

protected java.util.ArrayList mIterBindingList

mControlList

protected java.util.ArrayList mControlList

mDataProvider

protected ApplicationModule mDataProvider
Constructor Detail

DCBindingContainer

public DCBindingContainer()
Default constructor.


DCBindingContainer

protected DCBindingContainer(java.lang.Object panel)
Constructor used by DCPanelBinding, which passes in a reference to the JPanel object. *** For internal framework use only ***

Method Detail

isTokenValidationEnabled

public boolean isTokenValidationEnabled()
Returns true if token validation is enabled for this binding container. This flag is used in ADF web apps to verify the state of a binding container for a the page that is being processed.


setEnableTokenValidation

public void setEnableTokenValidation(boolean bSet)
Enables or disables token validation.


reportException

public void reportException(java.lang.Throwable th)
If DCDataControl is setup, then invoke DCDataControl.reportException to report any exceptions. Otherwise, throw a JboException (wrapping non-JboExceptions if required)

This method converts all exceptions to a JboException.


setBindingContext

protected void setBindingContext(BindingContext ctx)
*** For internal framework use only ***


getBindingContext

public BindingContext getBindingContext()
Returns the bindingContext to which this bindingContainer belongs.


setDataControl

public void setDataControl(DCDataControl app)
Sets the DCDataControl instance in this form binding. If this form binding is already registered with a DCDataControl, then it throws an InvalidOperException.

Throws:
InvalidOperException

getName

public final java.lang.String getName()
Returns the instance name of this DCBindingContainer object.


setName

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

Sets the instance name of this DCBindingContainer object.


getDef

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


initializeFromDef

public void initializeFromDef(BindingContext ctx,
                              ApplicationModule am)
*** For internal framework use only ***


getViewComponent

public final java.lang.Object getViewComponent()
*** For internal framework use only *** Returns the associated JPanel object.


setViewComponentInternal

protected void setViewComponentInternal(java.lang.Object panel)
*** For internal framework use only *** Sets internal member variable with the given panel instance.


getApplicationModule

public final ApplicationModule getApplicationModule()
Deprecated. since 10.1.2. Use IteratorBinding.getDataControl() to get to the ApplicationModule in case of BC4J datacontrols.

Return oracle.jbo.ApplicationModule instance which provides the BC4J context to this form binding object if this BindingContainer is working with only one BC4J DataControl which is for support of classic JClient appliations.

To get a BC4J AM in all cases use the IteratorBinding that iterates over a Bc4J collection and get it's DataControl to get to the corresonding ApplicationModule.


setApplicationModule

public void setApplicationModule(ApplicationModule am)
*** For internal framework use only *** Sets the ApplicationModule reference


getIterBindings

public final java.util.HashMap getIterBindings()
Return the hashmap containing iterator bindings


getIterBindingList

public final java.util.ArrayList getIterBindingList()
Return an ordered set of iterator bindings.


findIteratorBinding

public final DCIteratorBinding findIteratorBinding(java.lang.String name)
Returns the iterator binding object of the given name.


addIteratorBinding

public final void addIteratorBinding(DCIteratorBinding iterBinding)
Adds the given iterator binding name with a framework generated name.


addIteratorBinding

public final void addIteratorBinding(java.lang.String name,
                                     DCIteratorBinding iterBinding)
Adds this iterator binding with this form with the given name. If the name is null, a system-generated name is used. The generatd name is set into the iteratorBinding object.

Throws:
InvalidObjNameException - if an invalid name is passed in.
NameClashException - if given a duplicate name.

removeIteratorBinding

public final boolean removeIteratorBinding(java.lang.String name)
If an iterator binding exists with the given name, remove it from the internal members.


clearIteratorBindings

protected final void clearIteratorBindings()
*** For internal framework use only *** Clean all iterator bindings registered with this form.


addControlBinding

public final void addControlBinding(DCControlBinding control)
*** For internal framework use only *** Adds a controlbinding object to this container.

Throws:
InvalidObjNameException - if control's name is of unsupported format
NameClashException - if an object exists with this control-binding's name.

addControlBinding

public final void addControlBinding(java.lang.String name,
                                    DCControlBinding control)
*** For internal framework use only ***


getCtrlBindingList

public final java.util.ArrayList getCtrlBindingList()
Returns an array containing all control-bindings in this container.


getCtrlBinding

public final DCControlBinding getCtrlBinding(int index)
*** For internal framework use only ***


findCtrlBinding

public final DCControlBinding findCtrlBinding(java.lang.String name)
Returns a control binding with the given name. Returns null if name is not found.


getCtrlBinding

public final DCControlBinding getCtrlBinding(java.lang.Object control)
Matches the control with the View-component(getControl) for each of the control bindings in this container. Returns the matching control binding if found. Otherwise returns null.


removeControlBinding

public final boolean removeControlBinding(DCControlBinding control)
*** For internal framework use only ***


removeControlBinding

public final boolean removeControlBinding(java.lang.String name)
*** For internal framework use only ***


execute

public void execute()
Execute the query behind each iterator binding that is contained in this form binding. Applications could invoke this method to re-execute all the ViewObjects associated with this form.


executeIfNeeded

public void executeIfNeeded()
Excecute the query for each iterator binding, if not already executed. Applications should invoke this method to verify and execute all the ViewObjects associated with this form. This method is used by the generated applications by default.


getIteratorBinding

public DCIteratorBinding getIteratorBinding(java.lang.String voInstanceName,
                                            java.lang.String voIterName,
                                            java.lang.String voIterBindingName)
Return an Iterator Binding of the given "voIterBindingName" if one already exists by that name. If not, create an IteratorBinding object that references a default iterator of the ViewObject instance named voInstanceName (and optionally the iterator named voIterName). Return this created iterator binding after adding it to internal lists.

Various control bindings that display just one row's attribute invoke this method to find or create the iterator binding for which they display an attribute data.


getIteratorBinding

public DCIteratorBinding getIteratorBinding(java.lang.String voInstanceName,
                                            java.lang.String voIterName,
                                            java.lang.String voIterBindingName,
                                            int rangeSize)
Return an Iterator Binding of the given "voIterBindingName", if one already exists by that name, after setting up the iterator binding's range Size to the greater of existing range size and the given range size. If range size is -1, that indicates all rows in the range and hence takes precedence in the above comparison.

If not, create an IteratorBinding object that references a default iterator of the ViewObject instance named voInstanceName (and optionally the iterator named voIterName). Return this created iterator binding after adding it to internal lists.

Various control bindings that are capable of displaying more than one row of data invoke this method to create their iterator binding with a preferred range size.


createIteratorBinding

protected DCIteratorBinding createIteratorBinding(java.lang.String voInstanceName,
                                                  java.lang.String voIterName,
                                                  java.lang.String voIterBindingName,
                                                  int rangeSize)

setFindMode

public void setFindMode(boolean mode)
Calls setFindMode(boolean mode, boolean applyCriteria) with applyCriteria = true;


setFindMode

public void setFindMode(boolean mode,
                        boolean applyCriteria)
Sets this form into findMode. All iterator bindings with this form are set to find mode. Passes applyCriteria to IteratorBindings to indicate if they should apply the ViewCritiera stored on the iterator binding onto the model collection.

Also, notify each iteratorChanged listener registered with this form of the change in the iterator (due to change in mode so that they update the displays with the find or data mode's data).


isFindMode

public boolean isFindMode()
Returns true if this form is in find mode.


getEditingMode

public java.lang.String getEditingMode()
Returns "* Find Mode" if this bindingContainer is in find mode. * @javabean.property


addStatusBarInterface

public void addStatusBarInterface(DCStatusBarInterface statusBar)
Helper method to add the given object to the JUApplication's StatusBars.


removeStatusBarInterface

public void removeStatusBarInterface(DCStatusBarInterface statusBar)
Helper method to remove the given object to the JUApplication's StatusBars.


displayStatus

public void displayStatus(DCIteratorBinding iterBinding,
                          java.lang.String msgId,
                          java.lang.Object[] params)
Helper method to display the given message and params via the JUApplication's displayStatus method. This method becomes a no-op if this form is not registered with a JUApplication


displayStatus

public void displayStatus(java.lang.String msg)
Helper method to display the given message string via the JUApplication's displayStatus method. This method becomes a no-op if this form is not registered with a JUApplication


getLocaleContext

public LocaleContext getLocaleContext()
Returns the locale context set into the BC4J application module if this binding-container's datacontrol is a Bc4J data control. Otherwise returns null.


isExecuteOnRollback

public boolean isExecuteOnRollback()
Returns true if this form binding executes all the ViewObjects it's associated with after rollback is called on the application via DCCtrlActionBinding's rollback action.


setExecuteOnRollback

public void setExecuteOnRollback(boolean flag)
Set false if this form binding should not execute all the ViewObjects it's associated with after rollback is called on the application via DCCtrlActionBinding's rollback action. The default is to execute all the ViewObjects on rollback.


release

public void release()
release all view and datacontrol references from this binding-container and all it's containee iterator bindings and control bindings.


release

public void release(int flags)
Applications should release the DataControl which will end up calling this method for all binding containers in the datacontrol.

Parameters:
flags - could be one of the enumerations in DCDataControl. See DCDataControl.release()

initializeViewComponent

protected void initializeViewComponent(java.util.ArrayList controls)
*** For internal framework use only ***


initializeApplicationModule

protected void initializeApplicationModule()
*** For internal framework use only *** Used to setup reference to DCDataControl and oracle.jbo.Application objects.


focusGained

protected void focusGained(DCIteratorBinding iterBinding,
                           DCControlBinding binding,
                           int attrIndex)
Invoked by the framework to notify various status bars of which control has gained the focus.


notifyIteratorChanged

protected void notifyIteratorChanged(DCIteratorBinding iterBnd,
                                     boolean refresh)
Notify each listener of the iteratorChanged event when an iterator changes its data due to execute, re-execute, or change in display mode (find mode or data mode).


rangeRefreshed

protected void rangeRefreshed(DCIteratorBinding iter,
                              RangeRefreshEvent event)
Invoked when a DCIteratorBinding receives a rangeRefreshed Event from BC4J RowSetIterator

Parameters:
event - a description of the new ranges.

rangeScrolled

protected void rangeScrolled(DCIteratorBinding iter,
                             ScrollEvent event)
Invoked when a DCIteratorBinding receives a rangeScrolled Event from BC4J RowSetIterator

Parameters:
event - a description of the new range.

rowInserted

protected void rowInserted(DCIteratorBinding iter,
                           InsertEvent event)
Invoked when a DCIteratorBinding receives a rowInserted Event from BC4J RowSetIterator

Parameters:
event - a description of the new Row object.

rowDeleted

protected void rowDeleted(DCIteratorBinding iter,
                          DeleteEvent event)
Invoked when a DCIteratorBinding receives a rowDeleted Event from BC4J RowSetIterator

Parameters:
event - a description of the deleted Row object.

rowUpdated

protected void rowUpdated(DCIteratorBinding iter,
                          UpdateEvent event)
Invoked when a DCIteratorBinding receives a rowUpdated Event from BC4J RowSetIterator

Parameters:
event - a description of the modified Row object.

navigated

protected void navigated(DCIteratorBinding iter,
                         NavigationEvent event)
Invoked when a DCIteratorBinding receives a navigated Event from BC4J RowSetIterator

Parameters:
event - a description of the new and previous current rows.

callBeforeSetAttribute

public java.lang.Object callBeforeSetAttribute(DCControlBinding ctrl,
                                               Row row,
                                               AttributeDef ad,
                                               java.lang.Object value)
Invoked before any control binding performs a setAttribute call on a BC4J row. This is used by DCPanelBinding to generate validation events to validate attribute values before they are set.


isEditingStopped

protected boolean isEditingStopped()
Jclient uses this to indicate if stopEdit completed before datacontrol can proceed with update cycle (commit etc).


callBeforeRowNavigated

public void callBeforeRowNavigated(DCIteratorBinding iter)
Forces the current control to stop its editing mode (if used, like in JTable). Calls beforeRowNavigated() method to notify all validation listeners.


callBeforeSaveTransaction

public void callBeforeSaveTransaction(DCDataControl dc)
Forces the current control to stop its editing mode (if used, like in JTable). Calls beforeSaveTransaction() method to notify all validation listeners.


beforeSetAttribute

public void beforeSetAttribute(DCBindingContainerValidationEvent ev)
Notifies all DCBindingContainerValidationListeners with the beforeSetAttribute event. This event is raised before a control binding sets the value from a control into the corresponding BC4J row's attribute.


beforeCurrencyChange

public void beforeCurrencyChange(DCBindingContainerValidationEvent ev)
Notifies all JUPanelValidationListeners with the beforeCurrencyChange event. This event is raised before an iterator-binding object moves the current row to another row.


beforeSaveTransaction

public void beforeSaveTransaction(DCBindingContainerValidationEvent ev)
Notifies all JUPanelValidationListeners with the beforeSaveTransaction event. The JClient framework calls this method before invoking commit() on the BC4J transaction.


get

public java.lang.Object get(java.lang.Object keyObj)
Lookup the keyObj in the namespace of this binding-container. If the keyObj is a string and matches one of the iterator bindings or container bindings return that. Otherwise lookup if the keyObj matches the name of one of the public spel-accessible values in this object and if so return that.

Specified by:
get in interface java.util.Map
Overrides:
get in class JboAbstractMap

internalGet

protected java.lang.Object internalGet(java.lang.String key)
This method may be overridden by subclasses to implement public spel lookup strings.

This method first checks for control binding with the given name and returns a control-binding with the matching name. If not, then iterator binding with a matching key/name is returned. If not, then if the following keys are checked:

Properties returned vis getter on this control bindings are:

  • def - returns getDef()
  • name - returns getName()
  • Overrides:
    internalGet in class JboAbstractMap

    hashCode

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

    refreshControl

    public void refreshControl()
    Refresh the binding container with control data.

    This method synhronizes the rangeSizes from iteratorBindings onto the collection that they are bound to and then executes (if not already executed) the collection sources to get the collection data by calling iterator binding's refreshControl method. The order of these calls is implied by the order in which the iterator bindings were added to this bindingContainer (or were represented in xml metadata).

    Method bound iterator bindings expect the methods be already executed or atleast their parameters(if any) be accessible to the Method Action associated with the iterator binding so that the method can be executed successfully to bind to a returned collection.


    resetInputState

    public void resetInputState()
    Resets the error state for all control bindings.


    getValidationListeners

    public final java.util.ArrayList getValidationListeners()
    Returns a list of ValidationListeners (returns an empty list if no such listener was registered).


    addValidationListener

    public final void addValidationListener(DCBindingContainerValidationListener l)
    Adds the given listener to this binding container's validation listeners list.


    removeValidationListener

    public final void removeValidationListener(DCBindingContainerValidationListener l)
    Removes the given listener from this binding container's validation listeners list.


    validateInputValues

    public void validateInputValues()
    Calls DataControl.validate() for each data control that has a collection to which an iterator binding in this container is bound to.


    processInputValues

    public void processInputValues(java.util.Map inputValues)

    toString

    public java.lang.String toString()

    processException

    public void processException(JboException ex)
    Matches a control-binding with the exception or one of it's detail exceptions if the exception or one of it's detail excpetions is an AttrValException and the control-binding is bound to that attribute.

    If the bindingContext is in JClient mode, then this exception is thrown, otherwise the exception is cached at the panelBinding level for the controller to get/access during the page-rendering phase or before invoking the next action.


    getExceptionsList

    public java.util.ArrayList getExceptionsList()
    Returns a list of exceptions that has been cached on this bindingContainer.


    cacheException

    public void cacheException(JboException ex)

    handleException

    public void handleException(java.lang.Exception ex,
                                boolean lastEntryInPiggyback)
    Description copied from interface: JboExceptionHandler
    Catches an exception thrown by the middle tier.

    Specified by:
    handleException in interface JboExceptionHandler
    Parameters:
    ex - an exception.
    lastEntryInPiggyback - true if ex is the last of a batch of exceptions and warnings generated by a transaction.

    handleWarning

    public void handleWarning(JboWarning warn)
    Description copied from interface: JboExceptionHandler
    Catches a warning thrown by the middle tier.

    Specified by:
    handleWarning in interface JboExceptionHandler
    Parameters:
    warn - a warning message.

    finishedProcessingPiggyback

    public void finishedProcessingPiggyback(java.lang.Exception[] exArr)
    Specified by:
    finishedProcessingPiggyback in interface JboExceptionHandler

    isErrorHandlerActive

    public boolean isErrorHandlerActive()

    setErrorHandlerActive

    public void setErrorHandlerActive(boolean flag)

    getOrderedVOUsageList

    protected ViewObject[] getOrderedVOUsageList(DCDataControl dc)
    Returns an ordered list of ViewObject usages in this panel so that a JboException parameters can be transformed from Entity-layer names and exception parameters to ViewObject names and parameters.


    getStateTokenId

    public java.lang.String getStateTokenId()
    Returns the container state token.


    getStateToken

    public java.lang.String getStateToken()
    Returns the container state.


    validateToken

    public void validateToken(java.lang.String sState)
                       throws java.lang.Exception
    validates that this container is in the same state as represented by the given string token

    Throws:
    java.lang.Exception

    getDataControl

    public DCDataControl getDataControl()
    *** For internal framework use only *** Returns the DCApplciation object to which this form binding belongs. This method is primarily for use in classic/direct bound JClient apps.


    findNamedObject

    public java.lang.Object findNamedObject(java.lang.String expr)
    *** For internal framework use only ***


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

     

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