This content has been marked as final. Show 8 replies
Here I am not using ApplicationModule or viewInstance where i can drop method from datacontrol to the page.
My requirement is, I have created 2 java classes, one in View project and other one in Model project (Created POJO datacontrol from this java class). How can i invoke method defined in model project from the java class defined in View project???
Here I am not using any pagedefinition files
Please guide me.
I am developing ADF browser based mobile application. Implemented UI's in view project(ADF Mobile Browser) and business logic(I mean used ADF webservice proxy client to integrate E-BS with ADF) in model project.
Now, in my view project I have created a managed bean to call method using "*beforephase*", then from the same method i need to invoke certain methods defined in my model project. So, I created a POJO data control in my model project. How can i invoke those methods defined in model project from java class(Managed bean) defined in view project??
Here I am not creating Application Module, PageDef files, it has only datacontrols.dcx
The simplest way to get this working is dragging the method and dropping it as a button on your page. Then double click the button so JDeveloper will generate a method in the managed bean that includes the code to invoke your method.
Then you can use that code from anywhere you need in your managed bean.
See sample here:
Thank you for you post Shay. I tried as you said, and it's giving me below error:
WARNING: Automatically initializing a DefaultContext for getCurrent.
Caller should ensure that a DefaultContext is proper for this use.
Memory leaks and/or unexpected behaviour may occur if the automatic initialization is performed improperly.
This message may be avoided by performing initADFContext before using getCurrent().
Its throwing me an error message at return BindingContext.getCurrent().getCurrentBindingsEntry();