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

E10653-04

oracle.jbo.uicli.binding
Class JUCtrlActionBinding

java.lang.Object
  extended by java.util.AbstractMap
      extended by oracle.jbo.common.JboAbstractMap
          extended by oracle.adf.model.binding.DCControlBinding
              extended by oracle.jbo.uicli.binding.JUControlBinding
                  extended by oracle.jbo.uicli.binding.JUCtrlActionBinding
All Implemented Interfaces:
java.util.Map, ControlBinding, OperationBinding
Direct Known Subclasses:
JUActionBinding

public class JUCtrlActionBinding
extends JUControlBinding
implements OperationBinding

Implements actions on BC4J RowIterator to which this control is bound. This class supports the following actions:

If a button is bound to this binding class, then, on button press, the action event on the button binding should call invoke() method on this object to perform the desired action.

javabean.class
name=JUCtrlActionBinding

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 int ACTION_BINDING_CONTAINER_EXECUTE
           
static int ACTION_BINDING_CONTAINER_FIND
           
static int ACTION_COMMIT_TRANSACTION
           
static int ACTION_CREATE_INSERT_ROW
           
static int ACTION_CREATE_ROW
           
static int ACTION_CREATE_TEMP_WITH_PARAMS
           
static int ACTION_CREATE_WITH_PARAMS
           
static int ACTION_EXECUTE
           
static int ACTION_EXECUTE_WITH_PARAMS
           
static int ACTION_FIND
           
static int ACTION_FIRST
           
static int ACTION_INVOKE_METHOD
           
static int ACTION_ITERATOR_BINDING_EXECUTE
           
static int ACTION_ITERATOR_BINDING_FIND
           
static int ACTION_LAST
           
static int ACTION_NEXT
           
static int ACTION_NEXT_SET
           
static int ACTION_PREVIOUS
           
static int ACTION_PREVIOUS_SET
           
static int ACTION_REMOVE_CURRENT_ROW
           
static int ACTION_REMOVEROW_WITH_KEY
           
static int ACTION_RESET
           
static int ACTION_RESET_STATE
           
static int ACTION_ROLLBACK_TRANSACTION
           
static int ACTION_SETCURRENTROW_WITH_KEY
           
static int ACTION_SETCURRENTROW_WITH_KEYVALUE
           
 
Fields inherited from class oracle.adf.model.binding.DCControlBinding
ATTR_CURRENTROW, ATTR_DEF, ATTR_ERROR, ATTR_ERRORS, ATTR_FULLNAME, ATTR_ITER, ATTR_NAME, DC_BINDING_ERROR, mAttributeListener, mInternalGet_KeyResolved, mPermission, mPermissionInfo, ROW_KEY_STR
 
Fields inherited from class oracle.jbo.common.JboAbstractMap
MAP_NULL_VALUE
 
Constructor Summary
JUCtrlActionBinding(java.lang.Object control, DCBindingContainer form, DCInvokeMethodDef methodInfo)
           
JUCtrlActionBinding(java.lang.Object control, DCDataControl dc, int action)
          Creates an ActionBinding instance that works with the given control and on control's ActionEvent, call the invoke() method.
JUCtrlActionBinding(java.lang.Object control, DCIteratorBinding iterBinding, int action)
          Creates an ActionBinding instance that works with the given control and on control's ActionEvent, call the invoke() method.
 
Method Summary
 void _dbg_AfterInvokeOperation()
           
 void _dbg_invokeOperation(DCIteratorBinding iterBinding, java.lang.Object[] actionParams)
           
static java.lang.String actionIdToName(int id)
          *** For internal framework use only ***
static int actionNameToId(java.lang.String actionName)
          *** For internal framework use only ***
 void addActionBindingListener(JUCtrlActionBindingListener l)
          Adds the given listener to this Action Binding's listeners list.
 void addControlToPanel(java.lang.Object panel, java.lang.Object layoutObject, java.lang.Object layoutCons)
          *** For internal framework use only ***
 void addInvokeMethodListener(DCInvokeMethodListener l)
           
protected  JUCtrlActionBindingEvent createActionBindingEvent()
           
 void doIt()
          Performs the action that this binding is selected to perform.
 java.lang.Object execute()
          Invoke the bound action and return the operation returned value.
 java.util.ArrayList getActionBindingListeners()
          Returns a list of JUActionBindingListener (returns an empty list if no such listener was registered).
 int getActionId()
          Returns Action Id for this Action binding.
 DCDataControl getDataControl()
          Returns the datacontrol that this action or it's iteratorBinding is associated with.
 java.lang.Boolean getEnabled()
          Returns true if this action should be enabled.
 java.lang.String getEnabledString()
           
 JboException getError()
          Primarily for spel support.
 java.util.List getErrors()
          Added for satisfying the oracle.binding.ActionBinding interface.
 EventConsumer getEventConsumer()
          getEventConsumer returns the EventConsumer
 EventHandlerInvoker getEventHandlerInvoker()
           
 EventProducer getEventProducer()
          getEventProducer returns the EventProducer
 DCInvokeMethodDef getInvokeMethodDef()
          *** For internal framework use only *** Used for testing purposes only.
 OperationInfo getOperationInfo()
          Returns a description of the operation to invoke.
 java.util.ArrayList getParams()
          Returns an ordered list of parameter expressions that will be passed to the bound method on invocation.
 java.util.Map getParamsMap()
          Returns a map of parameter expressions.
 java.lang.String getPath()
          Returns a / separated name to the setInvoke() that could be used in el-expressions to invoke the method bound in this action binding.
 PermissionInfo getPermissionInfo()
           
 java.lang.String getPermissionTargetName()
           
 java.lang.Object getResult()
          Returns the return value (if any) from the method that this binding invokes.
 boolean ignoreUpdates()
           
protected  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 target, java.lang.String actions)
           
 void invoke()
          If this action is bound to a datacontrol, then calls dataControl.invokeAction to perform the action operations otherwise calls doIt() to perform the method action.
 boolean isActionEnabled()
          Returns true if this action should be enabled for a given iterator or datacontrol.
 boolean isArrayIteratorType()
           
 boolean isOperationEnabled()
          Returns true if this action should be enabled for a given iterator or datacontrol.
 void refreshControl()
          *** For internal framework use only ***
 void release(int flag)
           
 void removeActionBindingListener(JUCtrlActionBindingListener l)
          Removes the given listener from this Action Binding's listeners list.
 void removeInvokeMethodListener(DCInvokeMethodListener l)
           
 void reportException(java.lang.Exception ex)
          Report the given exception via the containing BindingContainer object.
protected  void resetInputState()
          Resets any exceptions and client-side values that this binding may hold.
 boolean resolvePath(java.util.Map postMap)
          Return true if this binding's path is found as a key in the given map.
 void setArrayIteratorType()
           
 void setEventHandlerInvoker(EventHandlerInvoker invoker)
           
 void setInvoke(java.lang.Object dummy)
           
 void setParams(java.util.ArrayList al)
          Set the ordered list of parameter expressions that should be passed to the bound method on invocation.
protected  void setupMethodInfo(DCBindingContainer form, DCInvokeMethodDef def)
           
 
Methods inherited from class oracle.jbo.uicli.binding.JUControlBinding
getCurrentRow, getFormBinding, getIteratorBinding, reportException, setFormBinding
 
Methods inherited from class oracle.adf.model.binding.DCControlBinding
addToDCExceptions, clearAttrDefs, evaluateBooleanExpression, executeQuery, executeQueryIfNeeded, get, getAllRowsInRange, getApplicationModule, getAttributeListener, getBindingContainer, getControl, getControlModel, getDCIteratorBinding, getDef, getDefFullName, getDefName, getFullName, getLayoutObject, getName, getPermission, getRowAtRangeIndex, getRowIterator, getState, getTransaction, getViewableExpr, getViewObject, hashCode, internalHasPermission, internalSetName, isControlQueriable, isControlViewable, isReleased, needsEstimatedRowCount, processInputException, release, removeFromDCExceptions, resetAttributeExceptionInRow, restoreFromState, setBindingContainer, setControl, setDataControlPinned, setDef, setIteratorBinding, setListener, setListener, setName, setViewableExpr, 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
 
Methods inherited from interface oracle.adf.model.ControlBinding
setListener
 
Methods inherited from interface oracle.binding.ControlBinding
getName, release, setListener
 

Field Detail

ACTION_EXECUTE

public static final int ACTION_EXECUTE
See Also:
Constant Field Values

ACTION_FIND

public static final int ACTION_FIND
See Also:
Constant Field Values

ACTION_BINDING_CONTAINER_EXECUTE

public static final int ACTION_BINDING_CONTAINER_EXECUTE
See Also:
Constant Field Values

ACTION_BINDING_CONTAINER_FIND

public static final int ACTION_BINDING_CONTAINER_FIND
See Also:
Constant Field Values

ACTION_ITERATOR_BINDING_EXECUTE

public static final int ACTION_ITERATOR_BINDING_EXECUTE
See Also:
Constant Field Values

ACTION_ITERATOR_BINDING_FIND

public static final int ACTION_ITERATOR_BINDING_FIND
See Also:
Constant Field Values

ACTION_NEXT

public static final int ACTION_NEXT
See Also:
Constant Field Values

ACTION_PREVIOUS

public static final int ACTION_PREVIOUS
See Also:
Constant Field Values

ACTION_FIRST

public static final int ACTION_FIRST
See Also:
Constant Field Values

ACTION_LAST

public static final int ACTION_LAST
See Also:
Constant Field Values

ACTION_NEXT_SET

public static final int ACTION_NEXT_SET
See Also:
Constant Field Values

ACTION_PREVIOUS_SET

public static final int ACTION_PREVIOUS_SET
See Also:
Constant Field Values

ACTION_RESET

public static final int ACTION_RESET
See Also:
Constant Field Values

ACTION_EXECUTE_WITH_PARAMS

public static final int ACTION_EXECUTE_WITH_PARAMS
See Also:
Constant Field Values

ACTION_REMOVE_CURRENT_ROW

public static final int ACTION_REMOVE_CURRENT_ROW
See Also:
Constant Field Values

ACTION_CREATE_INSERT_ROW

public static final int ACTION_CREATE_INSERT_ROW
See Also:
Constant Field Values

ACTION_CREATE_ROW

public static final int ACTION_CREATE_ROW
See Also:
Constant Field Values

ACTION_CREATE_WITH_PARAMS

public static final int ACTION_CREATE_WITH_PARAMS
See Also:
Constant Field Values

ACTION_CREATE_TEMP_WITH_PARAMS

public static final int ACTION_CREATE_TEMP_WITH_PARAMS
See Also:
Constant Field Values

ACTION_SETCURRENTROW_WITH_KEY

public static final int ACTION_SETCURRENTROW_WITH_KEY
See Also:
Constant Field Values

ACTION_SETCURRENTROW_WITH_KEYVALUE

public static final int ACTION_SETCURRENTROW_WITH_KEYVALUE
See Also:
Constant Field Values

ACTION_REMOVEROW_WITH_KEY

public static final int ACTION_REMOVEROW_WITH_KEY
See Also:
Constant Field Values

ACTION_COMMIT_TRANSACTION

public static final int ACTION_COMMIT_TRANSACTION
See Also:
Constant Field Values

ACTION_ROLLBACK_TRANSACTION

public static final int ACTION_ROLLBACK_TRANSACTION
See Also:
Constant Field Values

ACTION_RESET_STATE

public static final int ACTION_RESET_STATE
See Also:
Constant Field Values

ACTION_INVOKE_METHOD

public static final int ACTION_INVOKE_METHOD
See Also:
Constant Field Values
Constructor Detail

JUCtrlActionBinding

public JUCtrlActionBinding(java.lang.Object control,
                           DCBindingContainer form,
                           DCInvokeMethodDef methodInfo)
Parameters:
control - View-layer object that this action binding works with.

JUCtrlActionBinding

public JUCtrlActionBinding(java.lang.Object control,
                           DCIteratorBinding iterBinding,
                           int action)
Creates an ActionBinding instance that works with the given control and on control's ActionEvent, call the invoke() method.

Parameters:
control - The control that this binding works with.
iterBinding - JUIteratorBinding instance that this binding works with.
action - Indicates the selected action from the list of actions this class implements.

JUCtrlActionBinding

public JUCtrlActionBinding(java.lang.Object control,
                           DCDataControl dc,
                           int action)
Creates an ActionBinding instance that works with the given control and on control's ActionEvent, call the invoke() method.

Parameters:
control - The control that this binding works with.
dc - JUIteratorBinding instance that this binding works with.
action - Indicates the selected action from the list of actions this class implements.
Method Detail

getEventHandlerInvoker

public EventHandlerInvoker getEventHandlerInvoker()

setEventHandlerInvoker

public void setEventHandlerInvoker(EventHandlerInvoker invoker)

getEnabledString

public java.lang.String getEnabledString()
javabean.property

setupMethodInfo

protected void setupMethodInfo(DCBindingContainer form,
                               DCInvokeMethodDef def)

isActionEnabled

public boolean isActionEnabled()
Returns true if this action should be enabled for a given iterator or datacontrol.

javabean.property

isOperationEnabled

public boolean isOperationEnabled()
Returns true if this action should be enabled for a given iterator or datacontrol.

Specified by:
isOperationEnabled in interface OperationBinding
Returns:
True if the action is currently enabled. False otherwise.
javabean.property

getDataControl

public final DCDataControl getDataControl()
Returns the datacontrol that this action or it's iteratorBinding is associated with.


actionNameToId

public static int actionNameToId(java.lang.String actionName)
*** For internal framework use only ***


actionIdToName

public static java.lang.String actionIdToName(int id)
*** For internal framework use only ***


execute

public java.lang.Object execute()
Invoke the bound action and return the operation returned value. In case of error, return null.

Specified by:
execute in interface OperationBinding
Returns:
the result of the operation (null if the operation has no return type (void).

invoke

public final void invoke()
If this action is bound to a datacontrol, then calls dataControl.invokeAction to perform the action operations otherwise calls doIt() to perform the method action.

This allows datacontrol subclasses to perform custom implementation for all actions in the framework

Since:
9.0.5.1

getErrors

public java.util.List getErrors()
Added for satisfying the oracle.binding.ActionBinding interface.

Specified by:
getErrors in interface OperationBinding
Overrides:
getErrors in class DCControlBinding
Returns:
List with errors
See Also:
OperationBinding.invoke()

doIt

public void doIt()
Performs the action that this binding is selected to perform. This method gets the RowIterator from the associated Iterator binding and then calls an equivalent method on the RowIterator. BC4J runtime then sends appropriate events to various binding objects based on the action to update their display with the latest currency, data, etc.

Here's a list of actions and corresponding method calls on the BC4J side.


_dbg_invokeOperation

public final void _dbg_invokeOperation(DCIteratorBinding iterBinding,
                                       java.lang.Object[] actionParams)

setArrayIteratorType

public void setArrayIteratorType()

isArrayIteratorType

public boolean isArrayIteratorType()

refreshControl

public void refreshControl()
*** For internal framework use only ***

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.

Specified by:
refreshControl in class DCControlBinding

ignoreUpdates

public boolean ignoreUpdates()

getActionId

public int getActionId()
Returns Action Id for this Action binding.


addControlToPanel

public void addControlToPanel(java.lang.Object panel,
                              java.lang.Object layoutObject,
                              java.lang.Object layoutCons)
Description copied from class: JUControlBinding
*** For internal framework use only ***

Specified by:
addControlToPanel in class JUControlBinding

getOperationInfo

public OperationInfo getOperationInfo()
Description copied from interface: OperationBinding
Returns a description of the operation to invoke. If this operation is a built in operation, this method may return null or no MethodInfo.

Specified by:
getOperationInfo in interface OperationBinding

getInvokeMethodDef

public DCInvokeMethodDef getInvokeMethodDef()
*** For internal framework use only *** Used for testing purposes only.


setInvoke

public void setInvoke(java.lang.Object dummy)

initResources

protected void initResources()
Description copied from class: DCControlBinding
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.

Specified by:
initResources in class DCControlBinding

resetInputState

protected void resetInputState()
Description copied from class: DCControlBinding
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.

Specified by:
resetInputState in class DCControlBinding

getError

public JboException getError()
Primarily for spel support. Returns cached exceptions for some bindings.

Returns exception that occured on last setInputValue

Overrides:
getError in class DCControlBinding

getEnabled

public final java.lang.Boolean getEnabled()
Returns true if this action should be enabled.

Returns:
true if this action should be enabled.
javabean.property

getPath

public final java.lang.String getPath()
Returns a / separated name to the setInvoke() that could be used in el-expressions to invoke the method bound in this action binding.

Specified by:
getPath in interface ControlBinding
javabean.property

resolvePath

public boolean resolvePath(java.util.Map postMap)
Return true if this binding's path is found as a key in the given map.

Specified by:
resolvePath in interface ControlBinding

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:

  • params - returns getParams()
  • paramsMap - returns getParamsMap()
  • result - returns getResult()
  • enabled - returns isActionEnabled()
  • path - returns getPath()
  • text - returns getText()
  • Overrides:
    internalGet in class DCControlBinding

    getParamsMap

    public java.util.Map getParamsMap()
    Returns a map of parameter expressions. The key values in this map should be the argument names as stored in the metadata for a given method.

    Specified by:
    getParamsMap in interface OperationBinding

    getResult

    public java.lang.Object getResult()
    Returns the return value (if any) from the method that this binding invokes.

    Specified by:
    getResult in interface OperationBinding
    javabean.property

    getParams

    public java.util.ArrayList getParams()
    Returns an ordered list of parameter expressions that will be passed to the bound method on invocation.


    setParams

    public void setParams(java.util.ArrayList al)
    Set the ordered list of parameter expressions that should be passed to the bound method on invocation. Note that this list should contain el-expressions for values to be looked for in the bindingContext.


    reportException

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

    Overrides:
    reportException in class DCControlBinding

    release

    public void release(int flag)
    Overrides:
    release in class DCControlBinding

    getPermissionInfo

    public PermissionInfo getPermissionInfo()
    Overrides:
    getPermissionInfo in class DCControlBinding

    getPermissionTargetName

    public java.lang.String getPermissionTargetName()
    Overrides:
    getPermissionTargetName in class DCControlBinding

    internalHasPermission

    protected boolean internalHasPermission(java.lang.String target,
                                            java.lang.String actions)
    Overrides:
    internalHasPermission in class DCControlBinding

    addInvokeMethodListener

    public void addInvokeMethodListener(DCInvokeMethodListener l)

    removeInvokeMethodListener

    public void removeInvokeMethodListener(DCInvokeMethodListener l)

    getActionBindingListeners

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


    createActionBindingEvent

    protected JUCtrlActionBindingEvent createActionBindingEvent()

    addActionBindingListener

    public final void addActionBindingListener(JUCtrlActionBindingListener l)
    Adds the given listener to this Action Binding's listeners list.


    removeActionBindingListener

    public final void removeActionBindingListener(JUCtrlActionBindingListener l)
    Removes the given listener from this Action Binding's listeners list.


    getEventConsumer

    public EventConsumer getEventConsumer()
    getEventConsumer returns the EventConsumer

    See Also:
    JUEventConsumer

    getEventProducer

    public EventProducer getEventProducer()
    getEventProducer returns the EventProducer

    See Also:
    JUEventProducer

    _dbg_AfterInvokeOperation

    public void _dbg_AfterInvokeOperation()
    For internal use only. Application developers should not use this
    used for debugging

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

    E10653-04

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