To allow parameter passing to the bounded task flows that will be launched on a separated tab, we need to modify the dynamicTabShellDefinition.xml file in the oracle-page-templates-ext.jar. Below is the step by step procedure to do this:
- Copy the oracle-page-templates-ext.jar from %MiddlewareHome%\jdeveloper\adfv\jlib\ folder
- Create a new folder in drive C like C:\temp and paste the copied jar.
- Extract the contents of the jar.
- Open command prompt and navigate to the C:\temp folder.
- Enter the following command:
jar xf oracle-page-templates-ext.jar - 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;"
- Delete the jar that we have copied into the temp directory. We do this so that we can easily repack a jar later.
- In windows explorer, browse the "dynamicTabShellDefinition.xml" file in "C:\temp\oracle\ui\pattern\dynamicShell\model" directory
- Right click the file and click "open with...". Open it with JDeveloper.
- Modify the parameter definition to as follows:
<parameters> <parameter id="tabContext" value="${viewScope.tabContext}"/> <parameter id="parameterMap" value="${requestScope.parameterMap}"/> </parameters> - Redefine all the taskFlow/region bindings to define the "parametersMap" attribute value to "#{bindings.parameterMap}".
<taskFlow id="r0" taskFlowId="${viewScope.tabContext.taskflowIds[0]}" activation="deferred" xmlns="http://xmlns.oracle.com/adf/controller/binding" parametersMap="#{bindings.parameterMap}"> <parameters> <parameter id="tabContext" value="${bindings.tabContext}" xmlns="http://xmlns.oracle.com/adfm/uimodel"/> </parameters> </taskFlow>You need to do this to all the 15 region definition. - Save your modification.
- 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. - Modify libraries and classpath.
- Open your application in JDeveloper.
- Right-click your ViewController project and click project properties.
- Remove the Oracle Extended Page Templates in the classpath entries.
- Add the jar file that we created in the step above.
If you wanted to see a sample test case using the ADF UI Shell that connects to HR Schema, see the following post:
UI Shell in Action
Cheers!
