Friday, October 30, 2009

How To Refactor Page Definition Files in JDeveloper 11g

You probably have noticed, if there is a custom folder structure in Oracle ADF ViewController project, newly generated Page Definition file always is placed in default location no matter where JSF page resides. I have heard, in next releases Oracle will generate Page Definition files based on JSF page package structure. However, now instead refactoring manually, we can use JDeveloper 11g automatic refactoring for Page Definitions.

Let's say developer creates Method Call in ADF Task Flow, this call invokes action from bindings - Create:


This means associated Page Definition file will be generated:


Its generated in default package location, while we want to have it specific package. We can move it manually, or we can use JDeveloper 11g refactoring functionality. Just select Page Definition file you want to move and from Refactor menu invoke Move command:


Page Definition file will be successfully moved to location you want and required changes will be done in DataBindings.cpx file as well:

1 comment:

  1. Lol this is so good, why on earth does not Refactor/Move appear on the right-click contextual menu?
    Thnx!

    ReplyDelete