A presentation on JSF 2.0 by me
Happy coding with Techartifact 🙂
Latest tip and information on Java and Oracle Fusion Middleware/Weblogic
A presentation on JSF 2.0 by me
Happy coding with Techartifact 🙂
Here is a very cool way of quickly creating a basic skeleton to invoke an AM :1) Create a Test java class.
2) Inside the mail class, type in keyword ‘bc4jclient’ :
package model; public class Class1 { public Class1() { super(); } public static void main(String[] args) { Class1 class1 = new Class1(); bc4jclient } }</blockquote> <div></div> <blockquote>3) Press Ctrl + Enter.4) Voila!! A small skeleton to invoke AM gets created:
package model; import oracle.jbo.*; import oracle.jbo.client.Configuration; import oracle.jbo.domain.*; import oracle.jbo.domain.Number; public class Class1 { public Class1() { super(); } public static void main(String[] args) { Class1 class1 = new Class1(); String amDef = "test.TestModule"; String config = "TestModuleLocal"; ApplicationModule am = Configuration.createRootApplicationModule(amDef, config); ViewObject vo = am.findViewObject("TestView"); // Work with your appmodule and view object here Configuration.releaseRootApplicationModule(am, true); } }
Requirement – Executing AmImpl method in managed bean in Oracle ADF
We can execute the AmImpl method in managed bean using following method.We can get the bindings object.
BindingContainer bindings = getBindings(); int checkListID = ((BigDecimal)valueChangeEvent.getNewValue()).intValue(); OperationBinding refreshChecklist = bindings.getOperationBinding("checklistQuery");//checklistQuery is method name in Applicationmoduleimpl file refreshChecklist.getParamsMap().put("checklistId", checkListID); // checklistId is parameter for that method.
happy coding with techartifact