Showing posts with label URL activity. Show all posts
Showing posts with label URL activity. Show all posts

Monday, August 26, 2013

ADF Task Flow URL View Activity

Using URL activity we can redirect view port to any URL addressable resources like

  • Bounded task flow 
  • View activities in the unbounded task flow 
  • External resources 

Create a bounded task flow below

URL activity has 
  • Option to provide URL based on EL 
  • Add optional parameter with name,value and a converter


Create a managed bean in the request scope
package test.view;


public class TestUrl {
 private String goUrl="http://www.google.com";
   
    public void setGoUrl(String goUrl) {
        this.goUrl = goUrl;
    }

    public String getGoUrl() {
        return goUrl;
    }

}
Source code for url_view1.jspx 

<?xml version='1.0' encoding='UTF-8'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1" xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
  <af:panelGroupLayout id="pgl1">
    <af:button text="button 1" id="b1" action="testURL"/>
  </af:panelGroupLayout>
</jsp:root>
Drag and drop the task flow as a region in the restUrl.jspx .Run the page and click on the button will redirect to the external URL.