To access an
OperationBinding in a backing bean, call
getOperationBinding() on the
DCBindingContainer - the data control binding container - and specify the operation binding identifier that you assigned to the operation during the declarative binding process. Once you have the
OperationBinding call its
execute() method to execute it. If you need to pass any arguments to the operation, call
getParamsMap() to get the operation parameters map and
put() on the map the specific argument. Call
getResult() after the call to
execute() to retrieve the result of the execution. Here is an example.
Example:
// in the context of a backing bean
OperationBinding operation = bindings.getOperationBinding("operation_name");
operation.getParamsMap().put("parameter_name", parameterValue);
operation.execute();
if (operation.getResult() != null) {
Boolean result = (Boolean) operation.getResult(); // cast to the expected result type
}
Context:
Backing Bean
Whats a point in this, if you can get same info from Developer Guide?
ReplyDeleteHi there. Can you point me to where in the Developer Guide there is a single paragraph regarding this topic? Anyway, the topics listed here have a personal documentation usage. If they can be of help to anybody else this is added bonus as far as I concern.
ReplyDeleteThanks for this Nick.
ReplyDeleteIt may well be in the developer's guide but I found this before I was able to find it in the developer's guide.
Thanks very much. This is a very useful tip. I have bookmarked your blog for reference!
ReplyDeleteHi,
ReplyDeleteOperationBinding is available in two packages.. bu this bit never said to use ftom which package..
Anyways Thanks for the help :)
It should be OperationBinding interface from the the oracle.binding package.
ReplyDeleteVery helpful tip. Thank you.
ReplyDeleteDo you know if there's a difference between what's returned by the execute method and what's returned by getResult? Normally they seem to return the same, but once in a while it seem like only getResult works. A bit confused ;)
ReplyDeleteExcellent post!! very helpful :)
ReplyDeleteGood one...
ReplyDeleteHI,
ReplyDeleteIs there a way to retrieve the name of Iterator related to that OperationBinding programmatically ?
Thanks