Calling JavaScript from ManagedBean
Often there are requirements to call the invoke javascript from actionListener to set focus or scroll etc. Here goes the code to invoke javascript :
Enjoy !!!
BindingContext bctx = BindingContext.getCurrent(); ((DCBindingContainer)bctx.getCurrentBindingsEntry()).reportException(ex);
| Scenario Description | Button Text in Sample App | Requires Explicit Handling to show messaage to User | |
| 1 | Drag and Drop AM Method on Page as command Button | throwJboExceptionFromAM | No |
| 2 | Call AM method in Bean method through bindings | Call throwJboExceptionFromAM in Bean through Bindings | No. By default, all exception are handled by ADFm Error Handler when calling AMMethod through bindings. When you check for exception in operationBinding and report it expliclity .. It is basically duplicating the message |
| 3 | throw an exception in ActionListener | ThrowingExceptionInActionListener | Yes. See the button in section Handled and it's actionListener. How the exception is reported . |