My curiosity was piqued by all the tweets from JDeveloper and ADF experts about the hot reloading capabilities of JDeveloper 11gR2. Those capabilities that should allow we to run an application on the Integrated WebLogic Server, make changes in XML files – not just the JSPX page sources but also ADF PageDefinitions with Data Bindings and ADF BC definition files for ViewObjects and Entity Objects as well as Java Classes leveraging the Hot Swap capabilities already available in WebLogic Server 11g.
So I took JDeveloper 11gR2 for a simple spin. I created a very simple Fusion Web Application – a page with a single form based on an Employee ViewObject. I ran the page. It looks like this:
Not all columns in the underlying EMP table – or attributes in the EmployeeView ViewObject – have been bound into this form. Let’s see which changes I can craft and have ‘hot reloaded’.
The Bindings for this page currently look like this
With the application running, I add the Deptno attribute to the form:
The page now looks like this:
and the bindings have been extended with one more attribute binding:
After saving the changes, I rebuild the ViewController project. Note: this step is crucial, and I forgot it when I first tried to this feature. So remember: saving the changes is not going to trigger the hot relad – rebuilding the project is required for that!
When I reload the application in the browser, I was hoping for this hot reload to kick in and pick up the new binding definitions. Instead, the browser came back with:
Which frankly was a little disappointing. I still have not figured out how these changes can be made to hot reload.
I re-ran the application and now, sure enough, the Deptno field had been added:
Then I thought: well, let’s change the WHERE clause on the ViewObject – to exclude all CLERKs:
While I was at it, I decided to also change the UI Hints for Ename:
I saved the definition, rebuilt the Model project (There is that crucial step again) and reloaded the web application in the browser – a new fresh tab. Here is what I got:
All changes – the WHERE clause excluding CLERKs, the label for ENAME and both the tooltip and display width for ENAME – are hot reloaded.
I then created a second page – DeptForm – and a navigation case in the unbounded taskflow:
I also added a button in the EmployeeForm:
This time, after reloading the page and clicking on this button, navigation did take place to the DeptForm page – even though it failed to load the DeptForm page because it did not know the bindings that were just created. However, it had hot reloaded the navigation rule in the adf-config.xml file.
At this point I am a little at a loss with regard to the Page Bindings: is hot reloading of these definitions supported at all?am I doing something wrong? Do I need to set things up in order to have the hot loading of page bindings working ? Am I trying to hot reload the wrong kind of changes? It would seem that adding an attribute binding would seem the kind of thing hot reloading should support on the ADF Data Binding level.
Lucas, this might be a silly question, but did you rebuild your project/application after making the changes to your view object and page definition file?
This compile step should trigger the hot reload, and you should see a line in your log window that lets you know sources have been reloaded to your running application.