I've created a bounded taskflow with a single input parameter and also configured for url invoke.
main-flow-index-xml |
main-flow-index.xml (property) |
MainFlowIndexPage.jspx |
So with this URL:
http://localhost:7101/ParameterRetrieval/faces/adf.task-flow?adf.tfId=main-flow-index&adf.tfDoc=/WEB-INF/main-flow-index.xml&inputParam=myTestInputValue
We would get this page:
So, onward to the how-to redirect. For this I had to use a cool article by Andrejus regarding Security in Oracle ADF and Automatic Page Loading. So basically, we are going to make our own PagePhaseListener and as best practice dictates, we'll extend this object to a backing bean object which we will configure in our proxy's pageDef. So lets start.
TestPageRedirect.java |
TestPageRedirect.java - Implemented object of the PagePhaseListener where we trigger our redirect at the PrepareModel phase.
TestBacking.java |
TestBacking.java - Here's our backingBean object which extends our TestPageRedirect. We've already configured our onLoad to trigger our redirect which is based on F. Nimphius article on How-to efficiently redirect to an ADF Faces view using ADF Controller.
Next, we're going to configure our pageDef, well defined the backingBean in the taskflow as well.
adfc-config.xml |
TestRedirect.jspx |
TestRedirectPageDef.xml |
TestRedirectPageDef.xml - configure the ControllerClass to point to our backingBean.
After all of that is setup, we can now run TestRedirect.jspx and this should redirect us to our bounded taskflow.
Launching:
http://localhost:7101/ParameterRetrieval/faces/TestRedirect.jspx?inputParam=12345
will take us now to our bounded taskflow.
Success! So as an additional, lets add ADF Security :)
Lets launch: http://localhost:7101/ParameterRetrieval/faces/TestRedirect.jspx?inputParam=myHelloWorld
LoginPage |
No comments:
Post a Comment