13 September 2014

Calling Method Before Page Load Using Custom Data Control in ADF

Hi Friends, In this we are going to see how you can create custom data control and how you can call a method before page load using custom data control. 

So let get started :

Create the Java Class in your project view controller.


Then create your own method in that java class which you want to call before page load.



Now right click on your java class and select option "Create Data Control". It will create xml file with your java class name and also it will create DataControl.dcx file.




 Now create the jspx page.





 Right click on you newly created jspx page and select the option as "Go to Page Definition".

Since then page definition is not there it will prompt you to create.


 Click Ok.


Now in Bindings section click on Add icon and select the "methodAction" from the list.


Now you can see your bean appearing as data control. So select it and then in Operation select your method name and click on Ok.


Now click on Add icon of  "Executables" section and select "invokeAction" option.


Now give any meaningful id and bind this with your method and click on OK.


Now click on the Edit icon of "Executables" section and then go to "Common" option.


Now change the "Refresh" value to "prepareModel".


Now run you page and once it will be opened in browser you can see that method has been called successfully before page load.



Happy Coding :)

0 on: "Calling Method Before Page Load Using Custom Data Control in ADF"