Wednesday, March 17, 2010

ADF UI Shell: Customizing the Dynamic Tab Shell Layout

A user in Oracle UI Shell Functional Pattern thread asked me on a step by step guide on how to re-size the space taken by the Legal area at the bottom part of the UI Shell, thus I came up with this post.


If you wanted to modify some layout of the Oracle Dynamic Tabs template, you can do the following:
  1. Copy the oracle-page-templates-ext.jar from %MiddlewareHome%\jdeveloper\adfv\jlib\ folder
  2. Create a new folder in drive C like C:\temp and paste the copied jar.
  3. Extract the contents of the jar.
    1. Open command prompt and navigate to the C:\temp folder.
    2. Enter the following command:
      jar xf oracle-page-templates-ext.jar
          
    3. If the jar command cannot be recognized, then you need to add the java bin folder path into the "Path" system variables. Ex. "C:\Oracle\Middleware\jdk160_14_R27.6.5-32\bin;"
  4. Delete the jar that we have copied into the temp directory. We do this so that we can easily repack a jar later.
  5. In windows explorer, browse the "dynamicTabShell.jspx" file in "C:\temp\oracle\ui\pattern\dynamicShell" directory
  6. Right click the file and click "open with...". Open it with JDeveloper.
  7. Modify the bottom height of the panelStretchLayout component highlighted in the following screen shot. Modify the size from the default "50px" to the value you desired like for example "15px".
    The effect of your modification can be immediately noticed on the design view of the page.
  8. Save your modification.
  9. Repackage the file in a jar. Open a command prompt navigate to the temp folder we created earlier then run the following command:
    jar cfM0 oracle-page-templates.jar *
    
    0 (Zero)
    You can give the jar a different name if you like.
  10. Modify libraries and classpath.
    1. Open your application in JDeveloper.
    2. Right-click your ViewController project and click project properties.
    3. Remove the Oracle Extended Page Templates in the classpath entries.
    4. Add the jar file that we created in the step above.
  11. Run your application. In my case I applied it to the accompanying UIShellSherman_v02 sample app of the UI Shell.

For more information about unpacking and packaging jar files, see the following links:
If you wanted to extend the UI Shell to allow passing of parameters to the bounded task flows, click here.

Cheers!

3 comments:

  1. Update to this post: The new UI Shell with fixes, more variables to control the layout settings, and support for parameter passing has already been released. Check it out through JDeveloper "Check for Updates".

    ReplyDelete
  2. Pino,
    Just point out that what should be the page path in pageDef file after creating new jar for tabshell page.

    Default path
    --------------------


    I am getting this error - oracle.jbo.NoDefException: JBO-25002: Definition oracle.ui.pattern.dynamicShell.model.dynamicTabShellDefinition of type Form Binding Definition is not found.

    ReplyDelete