Quantcast
Channel: Asa Welle's Oracle ADF Blog » Oracle ADF
Viewing all articles
Browse latest Browse all 10

Opening a Taskflow from Backing within Same Window

$
0
0

If you ever need to open an Oracle Adf taskflow from the backing bean and not open up a separate tab or window, this code should help:

private void launchWindow() {
FacesContext fctx = FacesContext.getCurrentInstance();
String taskflowId = “generic-task-flow”;
String taskflowDocument = “/WEB-INF/generic-task-flow.xml”;
Map<String, Object> params = new HashMap<String, Object>();
String taskflowURL = ControllerContext.getInstance().getTaskFlowURL(false, new TaskFlowId(taskflowDocument, taskflowId), params);
ExtendedRenderKitService erks = Service.getRenderKitService(fctx, ExtendedRenderKitService.class);
StringBuilder script = new StringBuilder();
  script.append(“window.open(\””+taskflowURL+”\””).append(“,\”_self\”);”);
erks.addScript(FacesContext.getCurrentInstance(), script.toString());
}



Viewing all articles
Browse latest Browse all 10

Latest Images

Trending Articles





Latest Images