This content has been marked as final. Show 5 replies
you can call findDataControl(String) on the BindingContext and access the application module to invoke a method exposed on the Application Module
read this http://electrotek.wordpress.com/2008/01/23/how-to-get-an-applicationmodule-in-backing-bean/
read this best practice doc while invoking service layer methods from managed beans
Edited by: Abhijit Dutta on Mar 4, 2013 6:18 PM
The way to go is definitely to bind the method to the pagedef and use the operation binding to call the method.
It's not a best practice to get the application module in a bean, do some work on the application module, as the binding layer doesn't know about it and will not reflect the changes.
If you realy want to use the am method directly you have to cast the application module to your impl class as you don't have access to the method otherwise.
If you don't want to create an operation binding in the pagedef and don't want to cast the am then you are bust.