Invoking taskflow dynamically on to dynamic Region from Tree Nodes

Hello,
I have a tree , each node represents application task flow want to invoke the corresponding task flow when node is clicked into same Dynamic Region, is it possible?
Any idea will be greatly appreciated.
Thanks
Ram

Thanks for quick response, I have a mouse double click event on tree node to fire task flow.
I added a method in region bean to change and update the view scope from treeListener.
public void handleTreeDoubleClick(ClientEvent ce){
System.out.println(ce.getComponent().toString());
RichTree tree = (RichTree)ce.getComponent();
System.out.println("double click");
System.out.println("sNodeValue : menuTreeSelectionListener "+sNodeValue);
FacesContext fctx = FacesContext.getCurrentInstance();
String rowKeyString = sNodeValue;
RegionBean regionBean = new RegionBean();
// regionBean.setDynamicTaskFlowId(TaskFlowId.parse(""));
System.out.println("changing the task flow ...");
regionBean.refreshRegion(TaskFlowId.parse("/WEB-INF/task-flow-welcome.xml#task-flow-welcome"));
public void refreshRegion(TaskFlowId TaskFlowId) {
System.out.println("taskflow id :"+TaskFlowId.toString());
this.setDynamicTaskFlowId(TaskFlowId);
oracle.adf.view.rich.context.AdfFacesContext adfFacesContext = oracle.adf.view.rich.context.AdfFacesContext.getCurrentInstance();
adfFacesContext.getPageFlowScope().put("CurrentTaskflowId", TaskFlowId);
But region is not getting refrehed with new taskflow id:
console output.............
changing the task flow ...
taskflow id :/WEB-INF/task-flow-welcome.xml#task-flow-welcome
any thoughts?
Thanks
Ram

Similar Messages

  • Swap task flow in dynamic region from menuitem in menubar

    Hello,
    I have a dynamic region and two task flows. I have action listeners that swap the task flows into the dynamic regions. When these action listeners are tied to buttons, everything works as expected, but if i attach them to menuitems on a menubar, despite the fact the the listener is executed (based on log file debugging), the task flow in the region does not change.
    Can anyone please give me an idea why, and exactly how someone can swap a task flow in a dynamic region from a menuitem.
    I'm using Jdeveloper 11.1.1.0.1
    Thanks
    Edited by: fakintoy on Apr 22, 2009 3:45 PM
    Edited by: fakintoy on Apr 22, 2009 3:46 PM
    Edited by: fakintoy on Apr 22, 2009 4:06 PM

    Hi,
    My guess is that the region is not added to the list of partial targets. Add a partialTrigger on the region pointing on the menu item.
    p.s. Code snippet would really help to get a more precise answer here
    Regards,
    ~ Simon

  • Navigation from tree node to page

    Hi
    plz suggest me from where should i start. I have similar use case as given in this link
    http://jdevadf.oracle.com/adf-richclient-demo/faces/index.jspx
    left side i have tree and right side pages .Whenever i click on tree node corresponding page should display.
    How can i achieve this ?
    Thanks
    nitesh

    You know that the sample you are referring to comes with the source code. You just have to click on the page source link to get to the source.
    One way to archive this is to use a link element to render the node. The link can directly navigate to the right target or show the right region.
    If you need something not sophisticated you can use a selection listener (http://www.oracle.com/technetwork/developer-tools/adf/learnmore/november2011-otn-harvest-1389769.pdf) and to everything from a bean method.
    As you did not give any information about your Jdev version and how the tree is connected to the navigation it's hard to give more advice.
    Timo

  • Reg: navigation from tree node to page

    Hi
    plz suggest me form where should i start. I have similar use case as given in this link
    http://jdevadf.oracle.com/adf-richclient-demo/faces/index.jspx
    left side i have tree and right side corresponding pages.Whenever i click on tree node corresponding page should display.
    How can i achieve this ?
    Thanks
    nitesh

    Hi Nitesh,
    You should do something like this http://apex.oracle.com/pls/apex/f?p=54687:38:135151340818055:::::
    or even a simpler version http://www.grassroots-oracle.com/2013/02/apex-tree-region-use-case-privileges.html
    Best of luck,
    Alex.

  • ADF dynamic region - Browser is blank

    Hi All,
    I am following a hands-on practice in Oracle JDeveloper 11g Handbook. I have created two bounded task flows named "searchEmployee-flow.xml" and "departmentTee-flow.xml". I want to call these task flows from af:commandLink in a dynamic region. In the Choose Managed Bean for Dynamic Scope dialog I have provided following steps:
    1. Click New (green “+”) to add a managed bean. Set Bean Name as “searchScreenBB,” Class Name as “SearchScreenBean,” and Package as “tuhra.view.backing.” Click OK. Click OK.
    2. I wrote UIManager class to switch page fragments:
    package tuhra.view;
    public class UIManager implements Serializable
    public enum Screen {EMPLOYEE_SEARCH, DEPARTMENT_TREE}
    private Screen searchScreenFocus = Screen.EMPLOYEESEARCH;
    public void setSearchScreenFocus(String focus) {
    this._searchScreenFocus = Screen.valueOf(focus);
    public void setSearchScreenFocus(UIManager.Screen focus){
    this._searchScreenFocus = focus;
    public UIManager.Screen getSearchScreenFocus() {
    return _searchScreenFocus;
    3.
    I opened adfc-config (under Page Flows in the Application Navigator). On the Overview tab, selected Managed Beans and added a bean (using the green “+”) and fill in Name as “uiState,” Class as “tuhra.view.UIManager,” and Scope as “session.”
    4.
    Updated SearchScreenBean.java to read as in the following code listing (without the line numbers).
    package tuhra.view.backing;
    import java.util.HashMap;
    import oracle.adf.controller.TaskFlowId;
    import tuhra.view.UIManager;
    public class SearchScreenBean {
    private static final HashMap<UIManager.Screen,String> REGIONMAP;
    static {
    REGIONMAP = new HashMap<UIManager.Screen,String>(2);
    REGIONMAP.put(UIManager.Screen.EMPLOYEE_SEARCH,
    "/WEB-INF/searchEmployees-flow.xml#searchEmployees-flow");
    REGIONMAP.put(UIManager.Screen.DEPARTMENT_TREE,
    "/WEB-INF/departmentTree-flow.xml#departmentTree-flow");
    private UIManager _uiManager;
    public TaskFlowId getDynamicTaskFlowId(){
    return TaskFlowId.parse(
    REGIONMAP.get(_uiManager.getSearchScreenFocus()));
    public void setUiManager(UIManager _uiManager){
    this._uiManager = _uiManager;
    6.
    To have JSF inject the UI manager value, I switched back to the adfc-config.xml editor and locate the Managed Beans area on the Overview tab and performed folliwing steps as told in book:
    6.1. Select the searchScreenBB bean and then click Add (green “+”) in the Managed Properties: searchScreenBB table. Set the managed property Name to “uiManager” (to match the setUiManager() method in the bean), the Class to tuhra.view.UIManager, and the Value to “#{uiState}.”
    6.2. Now that the logic to switch the screens is in place, you can define how the UI will activate the change in searchScreenFocus values. You could of course use a custom method in SearchScreenBean, but using a af:setPropertyListener is simpler. In the employeeSearch.jspx file, locate the af:commandLink that surrounds the “Search for Employees” image.
    6.3. Drop into the af:commandLink a Set Property Listener (Operations panel). Set From as “#{'EMPLOYEE_SEARCH'},” To as “#{uiState.searchScreenFocus},” and Type as “action.” Click OK.
    6.4. Repeat the preceding step for the “View by Department” link. This time, fill in From as “#{'DEPARTMENT_TREE'}.”
    6.5. Click Save All.
    When I run the form as directed, It is blank and is giving following error messages:
    [Application tuhra2 deployed to Server Instance IntegratedWebLogicServer]
    Target URL -- http://127.0.0.1:7101/tuhra2/faces/employeeSearch.jspx
    Caused by: oracle.adf.controller.ControllerException: ADFC-02001: The ADF Controller cannot find '/WEB-INF/searchEmployees-flow.xml'.
         at oracle.adfinternal.controller.metadata.provider.MdsMetadataResourceProvider.getMetadataObjects(MdsMetadataResourceProvider.java:473)
         at oracle.adfinternal.controller.metadata.provider.MdsMetadataResourceProvider.loadUnmutalbeMetadataResources(MdsMetadataResourceProvider.java:372)
         at oracle.adfinternal.controller.metadata.provider.MdsMetadataResourceProvider.getResources(MdsMetadataResourceProvider.java:183)
         at oracle.adf.controller.internal.metadata.MetadataService.getTaskFlowDefinition(MetadataService.java:239)
         at oracle.adfinternal.controller.activity.TaskFlowCallActivityLogic.findTaskFlowDefinition(TaskFlowCallActivityLogic.java:1072)
         at oracle.adfinternal.controller.activity.TaskFlowCallActivityLogic.invokeTaskFlow(TaskFlowCallActivityLogic.java:224)
         at oracle.adfinternal.controller.engine.ControlFlowEngine.invokeTaskFlow(ControlFlowEngine.java:217)
         ... 82 more
    Caused by: oracle.mds.core.MetadataNotFoundException: MDS-00013: no metadata found for metadata object "/WEB-INF/searchEmployees-flow.xml"
         at oracle.mds.core.MetadataObject.getBaseMO(MetadataObject.java:1279)
         at oracle.mds.core.MDSSession.getBaseMO(MDSSession.java:3040)
         at oracle.mds.core.MDSSession.getMetadataObject(MDSSession.java:1211)
         at oracle.mds.core.MOResolver.getMetadataObjects(MOResolver.java:213)
         at oracle.adfinternal.controller.metadata.provider.MdsMetadataResourceProvider.getMetadataObjects(MdsMetadataResourceProvider.java:421)
         ... 88 more
    <Jul 7, 2011 11:21:14 AM PKT> <Error> <HTTP> <BEA-101020> <[ServletContext@18426608[app:tuhra2 module:tuhra2 path:/tuhra2 spec-version:2.5]] Servlet failed with Exception
    oracle.adf.controller.ControllerException: ADFC-06002: unhandled exception
         at oracle.adfinternal.controller.util.Utils.createAndLogControllerException(Utils.java:208)
         at oracle.adfinternal.controller.engine.ControlFlowEngine.handleException(ControlFlowEngine.java:640)
         at oracle.adfinternal.controller.engine.ControlFlowEngine.invokeTaskFlow(ControlFlowEngine.java:235)
         at oracle.adfinternal.controller.state.ChildViewPortContextImpl.invokeTaskFlow(ChildViewPortContextImpl.java:104)
         at oracle.adfinternal.controller.state.ControllerState.createChildViewPort(ControllerState.java:1380)
         Truncated. see log file for complete stacktrace
    Caused By: oracle.adf.controller.ControllerException: ADFC-02001: The ADF Controller cannot find '/WEB-INF/searchEmployees-flow.xml'.
         at oracle.adfinternal.controller.metadata.provider.MdsMetadataResourceProvider.getMetadataObjects(MdsMetadataResourceProvider.java:473)
         at oracle.adfinternal.controller.metadata.provider.MdsMetadataResourceProvider.loadUnmutalbeMetadataResources(MdsMetadataResourceProvider.java:372)
         at oracle.adfinternal.controller.metadata.provider.MdsMetadataResourceProvider.getResources(MdsMetadataResourceProvider.java:183)
         at oracle.adf.controller.internal.metadata.MetadataService.getTaskFlowDefinition(MetadataService.java:239)
         at oracle.adfinternal.controller.activity.TaskFlowCallActivityLogic.findTaskFlowDefinition(TaskFlowCallActivityLogic.java:1072)
         Truncated. see log file for complete stacktrace
    Caused By: oracle.mds.core.MetadataNotFoundException: MDS-00013: no metadata found for metadata object "/WEB-INF/searchEmployees-flow.xml"
         at oracle.mds.core.MetadataObject.getBaseMO(MetadataObject.java:1279)
         at oracle.mds.core.MDSSession.getBaseMO(MDSSession.java:3040)
         at oracle.mds.core.MDSSession.getMetadataObject(MDSSession.java:1211)
         at oracle.mds.core.MOResolver.getMetadataObjects(MOResolver.java:213)
         at oracle.adfinternal.controller.metadata.provider.MdsMetadataResourceProvider.getMetadataObjects(MdsMetadataResourceProvider.java:421)
         Truncated. see log file for complete stacktrace
    >
    <Jul 7, 2011 11:21:14 AM PKT> <Notice> <Diagnostics> <BEA-320068> <Watch 'UncheckedException' with severity 'Notice' on server 'DefaultServer' has triggered at Jul 7, 2011 11:21:14 AM PKT. Notification details:
    WatchRuleType: Log
    WatchRule: (SEVERITY = 'Error') AND ((MSGID = 'WL-101020') OR (MSGID = 'WL-101017') OR (MSGID = 'WL-000802') OR (MSGID = 'BEA-101020') OR (MSGID = 'BEA-101017') OR (MSGID = 'BEA-000802'))
    WatchData: DATE = Jul 7, 2011 11:21:14 AM PKT SERVER = DefaultServer MESSAGE = [ServletContext@18426608[app:tuhra2 module:tuhra2 path:/tuhra2 spec-version:2.5]] Servlet failed with Exception
    oracle.adf.controller.ControllerException: ADFC-06002: unhandled exception
         at oracle.adfinternal.controller.util.Utils.createAndLogControllerException(Utils.java:208)
         at oracle.adfinternal.controller.engine.ControlFlowEngine.handleException(ControlFlowEngine.java:640)
         at oracle.adfinternal.controller.engine.ControlFlowEngine.invokeTaskFlow(ControlFlowEngine.java:235)
         at oracle.adfinternal.controller.state.ChildViewPortContextImpl.invokeTaskFlow(ChildViewPortContextImpl.java:104)
         at oracle.adf.view.rich.component.fragment.UIXRegion$RegionContextChange.doChangeImpl(UIXRegion.java:1199)
         at jsp_servlet.__employeesearch_jspx._jspService(__employeesearch_jspx.java:65)
         at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.ServletStubImpl.onAddToMapException(ServletStubImpl.java:416)
         at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:253)
         at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:410)
         at com.sun.faces.application.ViewHandlerImpl.executePageToBuildView(ViewHandlerImpl.java:469)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
         at java.security.AccessController.doPrivileged(Native Method)
    Caused By: oracle.adf.controller.ControllerException: ADFC-02001: The ADF Controller cannot find '/WEB-INF/searchEmployees-flow.xml'.
         at oracle.adfinternal.controller.metadata.provider.MdsMetadataResourceProvider.getMetadataObjects(MdsMetadataResourceProvider.java:473)
         at oracle.adfinternal.controller.metadata.provider.MdsMetadataResourceProvider.loadUnmutalbeMetadataResources(MdsMetadataResourceProvider.java:372)
         at oracle.adfinternal.controller.metadata.provider.MdsMetadataResourceProvider.getResources(MdsMetadataResourceProvider.java:183)
         at oracle.adf.controller.internal.metadata.MetadataService.getTaskFlowDefinition(MetadataService.java:239)
         at oracle.adfinternal.controller.activity.TaskFlowCallActivityLogic.findTaskFlowDefinition(TaskFlowCallActivityLogic.java:1072)
         at oracle.adfinternal.controller.activity.TaskFlowCallActivityLogic.invokeTaskFlow(TaskFlowCallActivityLogic.java:224)
         at oracle.adfinternal.controller.engine.ControlFlowEngine.invokeTaskFlow(ControlFlowEngine.java:217)
         at oracle.adfinternal.controller.state.ChildViewPortContextImpl.invokeTaskFlow(ChildViewPortContextImpl.java:104)
         at oracle.adfinternal.controller.state.ControllerState.createChildViewPort(ControllerState.java:1380)
         at oracle.adfinternal.controller.ControllerContextImpl.createChildViewPort(ControllerContextImpl.java:78)
         at oracle.adf.controller.internal.binding.DCTaskFlowBinding.createRegionViewPortContext(DCTaskFlowBinding.java:440)
         at oracle.adf.controller.internal.binding.DCTaskFlowBinding.getViewPort(DCTaskFlowBinding.java:358)
         at oracle.adf.controller.internal.binding.TaskFlowRegionModel.doProcessBeginRegion(TaskFlowRegionModel.java:164)
         at oracle.adf.controller.internal.binding.TaskFlowRegionModel.processBeginRegion(TaskFlowRegionModel.java:112)
         at oracle.adf.view.rich.component.fragment.UIXRegion$RegionContextChange.doChangeImpl(UIXRegion.java:1199)
         at oracle.adf.view.rich.context.DoableContextChange.doChange(DoableContextChange.java:91)
         at oracle.adf.view.rich.component.fragment.UIXRegion._beginInterruptibleRegion(UIXRegion.java:693)
         at oracle.adf.view.rich.component.fragment.UIXRegion.processRegion(UIXRegion.java:498)
         at oracle.adfinternal.view.faces.taglib.region.RegionTag.doStartTag(RegionTag.java:127)
         at jsp_servlet.__employeesearch_jspx._jspx___tag21(__employeesearch_jspx.java:1036)
         at jsp_servlet.__employeesearch_jspx._jspService(__employeesearch_jspx.java:65)
         at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.ServletStubImpl.onAddToMapException(ServletStubImpl.java:416)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:326)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:183)
    SUBSYSTEM = HTTP USERID = <WLS Kernel> SEVERITY = Error THREAD = [ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)' MSGID = BEA-101020 MACHINE = bilal-PC TXID = CONTEXTID = d87127fb8baddada:4155b820:130fd94af8a:-8000-00000000000006c4 TIMESTAMP = 1310019674635
    WatchAlarmType: AutomaticReset
    WatchAlarmResetPeriod: 30000
    >
    <Jul 7, 2011 11:21:20 AM PKT> <Alert> <Diagnostics> <BEA-320016> <Creating diagnostic image in c:\users\administrator\appdata\roaming\jdeveloper\system11.1.1.5.37.60.13\defaultdomain\servers\defaultserver\adr\diag\ofm\defaultdomain\defaultserver\incident\incdir_16 with a lockout minute period of 1.>
    Any help will be highly appreciated.
    Thanks

    Hi
    This error occurs on account of the scope of backing bean Taskflow id not set up correctly and taskflow id leads to null pointer exception.
    Open EmplloyeeSearch.jspx - go to bindings. click taskflow - dynamic region in binding. Set the property as follows:
    #{backingBeanScope.searchScreenBB.dynamicTaskFlowId}
    This should resolve the issue.
    Edited by: Krithivasan N on Mar 6, 2012 11:52 AM

  • How to access Dynamic Region parameters  from a called taskflow?

    HI,
    i have i dynamic region embedded into a page.
    The region points to a bounded task flow. I want to pass parameters to the taskflow and doing that by specifying region params.
    <taskFlow id="dynamicRegion1" taskFlowId="${test.dynamicTaskFlowId}"
    xmlns="http://xmlns.oracle.com/adf/controller/binding">
    <parameters>
    <parameter id="inputParameter0" value="#{backing.comp1.value}"
    xmlns="http://xmlns.oracle.com/adfm/uimodel"/>
    </parameters>
    </taskFlow>
    But for me is not clear, how can i acces them from a taskflow that i called (to which points region)
    Regards,
    Krasimir

    Hi,
    check out my blog http://biemond.blogspot.com there are some examples even about dymanic region and refreshing region
    Edwin

  • Problem with taskflows within the Dynamic region

    Hi,
    I am creating a application which have two bounded taskflows search-flow and admin flow.In admin-flow taskflow i have two jsff pages admin_login and welcome.whenever we click login button present in login.jsff it should navigate to welcome page.I have created the control flow case (from outcome is welcome).I have created a Home.jspx in adfc-config.xml.Using the splitter i divided the page into two facets.In facet 1 there are two command links search, admin.In the second facet i have dropped search flow as dynamic region and written the following beanclass.
    package com.Search;
    import oracle.adf.controller.TaskFlowId;
    public class Search {
    private String SearchtaskFlowId = "/WEB-INF/Search-fllow.xml#Search-fllow";
    private String AdminTaskFlowId = "/WEB-INF/Admin-flow.xml#Admin-flow";
    private String currentTF = "home";
    public SearchFlight() {
    public TaskFlowId getDynamicTaskFlowId() {
    if (this.getCurrentTF().equalsIgnoreCase("home"))
    return TaskFlowId.parse(SearchtaskFlowId);
    else
    return TaskFlowId.parse(AdminTaskFlowId);
    public void setCurrentTF(String currentTF) {
    this.currentTF = currentTF;
    public String getCurrentTF() {
    return currentTF;
    When i click the admin link in home.jspx the admin_login.jsff page is opening.After entering the credentials and clicking login button it is going to the search page of search task-flow not to the welcome.jsff.
    The admin_login.jsff is
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    <af:decorativeBox id="db1">
    <f:facet name="center">
    <af:panelGroupLayout layout="scroll"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
    id="pgl1" inlineStyle="width:50cm; height:50.0cm;">
    <p>
    <af:inputText label="UserName" id="it1"
    binding="#{LoginBean.userName}"/><af:inputText label="Password"
    id="it2"
    secret="true"
    binding="#{LoginBean.password}"/><af:commandButton text="Login"
    id="cb1" binding= "#{LoginBean.login}"
    action="#{LoginBean.login_action}" />
    </p>
    <p>
    <af:commandButton text="Cancel" id="cb2"/>
    </p>
    </af:panelGroupLayout>
    </f:facet>
    <f:facet name="top">
    <h:outputFormat value="Administrator Login" id="of1"
    style="font-family:Verdana, Arial, Helvetica, sans-serif; font-size:large; color:Purple;"/>
    </f:facet>
    </af:decorativeBox>
    <!--oracle-jdev-comment:preferred-managed-bean-name:NewLoginBean-->
    </jsp:root>
    The loginbean for the admin_login.jsff is
    package com.LoginBean;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Statement;
    import oracle.adf.view.rich.component.rich.input.RichInputText;
    import oracle.adf.view.rich.component.rich.nav.RichCommandButton;
    import oracle.jdbc.OracleDriver;
    public class Login {
    public Login() {
    private RichInputText userName;
    private RichInputText password;
    private RichCommandButton login;
    public void setUserName(RichInputText userName) {
    this.userName = userName;
    public RichInputText getUserName() {
    return userName;
    public void setPassword(RichInputText password) {
    this.password = password;
    public RichInputText getPassword() {
    return password;
    public void setLogin(RichCommandButton login) {
    this.login = login;
    public RichCommandButton getLogin() {
    return login;
    public String login_action() {
    // Add event code here...
    String UserName = this.getUserName().getValue().toString();
    String Password = this.getPassword().getValue().toString();
    Connection conn;
    try {
    conn = getConnection();
    Statement stmt = conn.createStatement();
    ResultSet rset = stmt.executeQuery ("SELECT 'x' FROM administrator where username = '"+UserName+"' and password='"+Password+"' " );
    if (rset.next()) {
    conn.close();
    return "welcome";
    conn.close();
    } catch (SQLException e) {
    System.out.println(e);
    return "error";
    public static Connection getConnection() throws SQLException {
    String username = "hr";
    String password = "hr";
    String thinConn = "jdbc:oracle:thin:@localhost:1521:XE";
    DriverManager.registerDriver(new OracleDriver());
    Connection conn =
    DriverManager.getConnection(thinConn, username, password);
    conn.setAutoCommit(false);
    return conn;
    }

    in your web.xml find this entry and put success_url. to weblogic.jspx
    <servlet>
        <servlet-name>adfAuthentication</servlet-name>
        <servlet-class>oracle.adf.share.security.authentication.AuthenticationServlet</servlet-class>
        <init-param>
          <param-name>success_url</param-name>
          <param-value>/faces/index</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
      </servlet>

  • Page Template Popup with Dynamic Region TaskFlow

    Hi.
    I have a Page Template that is used extensively in my application to provide a consistent explorer panel containing tree links to various pages in the application. I'm trying now to enable users to edit configuration via a tree link. I would like to implement this as a Popup in the page template which contains a dynamic region that contains a bounded Task FLow (so I can control the transaction for the edit activity). I'm running into all manner of issues...
    The Tree node is defined as follows:
    <f:facet name="cognition_model_view.viewRepListVO">
           <af:group id="pt_g4">
              <af:commandImageLink id="pt_ot15" text="#{node.Viewname}"
                                                action="callRouter"
                                                actionListener="#{backingBeanScope.templateBacking.viewsGoActionListener}"
                                                icon="/pics/folder-icon.png"
                                                shortDesc="View: #{node.Viewdesc} | Filter: #{node.Filtername}"
                                                partialSubmit="true"/>
              <af:commandImageLink id="pt_ot16"
                                                icon="/pics/edit1.png"
                                                shortDesc="Edit View Config"
                                                partialSubmit="true">
                     <af:setPropertyListener from="#{node.Appname}"
                                                       to="#{backingBeanScope.templateBacking.editViewAppName}"
                                                       type="action"/>
                     <af:setPropertyListener from="#{node.Viewname}"
                                                       to="#{backingBeanScope.templateBacking.editViewName}"
                                                       type="action"/>
                     <af:setPropertyListener to="#{backingBeanScope.templateBacking.editViewType}"
                                                       from="#{node.Sourceview}"
                                                       type="action"/>
                     <af:showPopupBehavior popupId="::pt_p_edView"
                                                       triggerType="click"/>
              </af:commandImageLink>
            </af:group>
    </f:facet>The property listeners are to hold values that will be passed as parameters to the region's task flow.
    The Popup is defined here:
    <af:popup id="pt_p_edView" contentDelivery="lazyUncached"
                  popupCanceledListener="#{backingBeanScope.editPopupTFHandler.cancelPopup}"
                  popupFetchListener="#{backingBeanScope.editPopupTFHandler.showPopup}"
                  binding="#{backingBeanScope.editPopupTFHandler.editPopup}">
            <af:panelWindow id="pt_pw1"
                            title="#{backingBeanScope.templateBacking.editViewName} - Edit View Configuration"
                            contentHeight="250" contentWidth="500" stretchChildren="first" modal="true">
                <af:region value="#{bindings.dynamicRegion1.regionModel}" id="pt_r1"/>
            </af:panelWindow>
        </af:popup>The taskflow binding for the template is as follows:
        <taskFlow id="dynamicRegion1" taskFlowId="${backingBeanScope.editPopupTFHandler.dynamicTaskFlowId}" xmlns="http://xmlns.oracle.com/adf/controller/binding">
          <parameters>
            <parameter id="inputApplicationName" value="#{backingBeanScope.templateBacking.editViewAppName}"/>
            <parameter id="inputViewType" value="#{backingBeanScope.templateBacking.editViewType}"/>
            <parameter id="inputViewName" value="#{backingBeanScope.templateBacking.editViewName}"/>
          </parameters>
        </taskFlow>The managed bean to hold the dynamic taskflowId (editPopupTFHandler) is referenced in the adfc-config.xml file at "backingBean" scope, and looks like this:
    public class editPopupTFHandler {
        private String taskFlowId = "/WEB-INF/editViews/editViewsTF.xml#editViewsTF";
        private String emptyTaskFlowId = "";
        private String currentTaskFlowId = taskFlowId;
        private RichPopup editPopup;
        public editViewPopupTFHandler() {
        public String getDynamicTaskFlowId() {
            return currentTaskFlowId;
        public void cancelPopup(PopupCanceledEvent pce) {
            currentTaskFlowId = emptyTaskFlowId;
        public void showPopup (PopupFetchEvent popupFetchEvent) {
               currentTaskFlowId = taskFlowId;
        public void setEditPopup(RichPopup editPopup) {
            this.editPopup = editPopup;
        public RichPopup getEditPopup() {
            return editPopup;
    }If I don't define the bean at backingBean scope, I get a Target Unreachable error from any page using the template.
    When I attempt to use the link to the popup, the popup displays but the region content does not. Is this a scoping issue?
    Additionally, after pressing combinations of the 2 commandimagelink components, the first link stops submitting... this may be a side-effect of the region display though?
    Again, as I'm quite new to ADF I don't know how to overcome or avoid these issues, or whether there is a better method to achieve an edit capability in a popup window from a page template.
    Thanks for your help. I'm using JDeveloper 11.1.2.1.0 by the way.

    Hello again. I've managed to get the dynamic region displaying once I restarted JDeveloper and re-created the Region and backingBean. This has happened before - is JDeveloper known to get "confused" (like me!) in this way?
    There are still issues though. The backingBean contains a PopupCanceledListener as follows:
        public void cancelPopup(PopupCanceledEvent pce) {
            System.out.println("CANCEL POPUP - Current Task FLow now empty");
            currentTaskFlowId = emptyTaskFlowId;  // where emptyTaskFlowId = ""
            System.out.println("CANCEL currentTaskFlowId = " + currentTaskFlowId);
        }Simple enough, but the dynamicTaskFlowId is not holding its cleared value. Subsequent call to the getter shows a non-null value...?
    The Popup has the ContentDelivery="lazyUncached" and ChildCreation="deferred". The TaskFlow Binding has Refresh="default" and activation="deferred". With these property values the Popup is displays the correct value on its first use but then keeps that same value on any subsequent selection. I don't know whether this is because of the TaskFlow not correctly resetting or something else...
    Can anyone help me please. This is beyond frustrating. The behaviour of these various property settings is not at all predictable for me... Thanks.

  • Dynamic regions and taskflow in an adf library 11g

    Hi,
    I am facing a small issue. I have a an adf view project that uses an ADF Library containing a task flow. This view project has the following.
    1. A main page (with a splitter panel) that has two buttons (showpage1 and showpage2 as dynamic region links) which display a message from either of these pages in a dynamic region in the page. These two pages have their separate bounded task flows.
    This works great, i can click on either of these buttons and the dynamic region displays the default views of these task flows one at a time.
    2. When i add yet another button for a bounded task flow that comes from the above-mentioned adf library things break. Now i am able to only display the view from the 3rd taskflow by clicking the corresponding 3rd button. Clicking on showpage1 and showpage2 buttons do not show corresponding taskflows/views.
    I can send you my sample project right away if you wish.
    Thanks,
    The only difference seems to be that the following info. is added in web.xml when I start using the adf library's task flow.
    <filter>
    <filter-name>ADFLibraryFilter</filter-name>
    <filter-class>oracle.adf.library.webapp.LibraryFilter</filter-class>
    </filter>
    <filter-mapping>
    <filter-name>ADFLibraryFilter</filter-name>
    <url-pattern>/*</url-pattern>
    <servlet>
    <servlet-name>adflibResources</servlet-name>
    <servlet-class>oracle.adf.library.webapp.ResourceServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>adflibResources</servlet-name>
    <url-pattern>/adflib/*</url-pattern>
    </servlet-mapping>
    Edited by: user11219846 on Aug 5, 2009 4:10 PM

    Hi Can you send across your sample app where you are using the library and the ADF library as well to [email protected]? I'll take a look and letyou know. Thanks.
    Edited by: Vijay Allen Raj on Sep 7, 2009 12:55 PM

  • How to publish contextual event from dynamic region

    Hi Experts, plz help.
    Scenario :
    I have a page , say Page A.
    I have two bounded task flows, say HeaderTF and LinesTF.
    HeaderTF is placed as a static Region in page A and LinesTF is a dynamic region in page A.
    LinesTF has a table with Amount Column.
    HeaderTF has a text field which shows the total of amount column.
    Requirement :
    when user adds new rows or changes existing rows or deletes any rows in LinesTF, total field in HeaderTF should be updated.
    On change of amount value in lines, I am calculating and updating the total attribute of header VO as all of them are sharing same DC.
    but the value is not reflecting becos partial triggers cannot be kept for total field.
    So I am using contextual events.
    I created a contextual events for amount field, delete button and table as well (In LinesTF).
    and I created handler method in AM which calculates total and dragged it as a text field in HeaderTF.
    Now when I am trying to subscribe from pagedef of pageA, i am able to find the handler which is created in HeaderTF but could not find any contextual events in event lov.
    Question :
    1. Is my approach correct?
    2. Cant we publish contextual events from dynamic regions?
    3. Is there any alternate way of achieving this?
    I did not try refreshing HeaderTF by passing input params because I dont want the entire region to be refreshed.

    Try creating the event mapping - please see "28.7.2 How to Create Contextual Events Manually" in Dev Guide http://download.oracle.com/docs/cd/E15523_01/web.1111/b31974/web_adv.htm#CACJBFGI

  • ADF Dynamic region in a popup does not load

    Hi Experts,
    JDEV version used 11.1.1.5
    I have a page which has a table and each row has a command link on one of the columns.
    When I click on the command link an action listener is invoked which decides the DYNAMIC TF that is to be loaded in a pop up .
    The pop up has a dynamic adf region in it.
    Based on the record clicked (using command link) task flow is loaded in the dynamic region of the the Popup .
    But, when i click the same link for the second time or a different record the popup is displayed as blank , The taskflow in the dynamic region is not loaded at all.(getDynamicTaskFlowId is invoked and is also returing the correct TF to be loaded)
    First time it works as expected  , but its not happening from the second time.
    I have used conditional activation , but later due to the above issue I have tried to put an expression #{true} for the active property to test if it works. It didn't.
    Please note that first time there is no issue.It does not work from the second click on same record or any other record.
    Any other suggestions to fix the above issue  are much appreciated.
    Thanks,
    Vikranth

    Hi Frank,
    I have followed the same approach. However in my case its a dynamic af:region which is causing the issue.
    Any other pointers is much apprecitaed.
    Thanks,
    Vikranth

  • How to use a menu model with a dynamic region and a task flow parameter

    I am using JDeveloper/ADF 11.1.2.1
    I have a menu model that changes which task flow is displayed in a given dynamic region using a backing bean. That works fine. I would like to be able to pass parameters to that task flow based on which menu item is clicked. For example: i have a task flow which shows a page where input fields are used to filter a table. Depending on the value of the task flow parameter I want to change which input fields are displayed. So i will have multiple menu items which refer to the same task flow but have a different set of parameters. I have tried using request scope variables and setting them in the backing bean for the dynamic region which works until the query is submitted at which point the request scope has changed and the value is no longer available. I have tried a number of other 'creative' approaches but have not gotten anything to work. Anyone done this before? Or have an idea on how to solve it?

    Frank,
    I did a fair bit of digging based on your suggestions and some things I found in your Oracle Fusion Developer's Guide book and I came up with something that works really well. It is fairly elegant but requires code. It would be nice if something like a setPropertyListener could be rolled into the menu model. That would make my solution completely declarative.
    Here is my solution:
    My task flow requires a the value #{pageFlowScope.type} to be set. My application has a dynamic region that is changed on the fly using a menu model. The region uses a backing bean (mainRegionManagerBean) which is in the viewScope to manage what taskflow is shown in the region. There are multiple menu items in the menu model that point to the same task flow but pass different values to the #{pageFlowScope.type} parameter. So i wired the menu items up to different methods in the mainRegionManagerBean which set the value for me. See the relevant code below.
    I would be very interested in the feedback from someone with more experience than I on my solution. Maybe there is a more elegant way...
    In the backing bean there is a primary method that was created by generating a dynamic region link which sets the task flow id and then other methods which call it and set the relevant parameters. (JSFUtils is a helper class i wrote to centralize some common tasks):
    public String shipmentTraceMasterTaskflow()
    taskFlowId = "/WEB-INF/taskflow/master/shipmentTraceMasterTaskflow.xml#shipmentTraceMasterTaskflow";
    JSFUtils.setValue("pageFlowScope.type", "");
    return null;
    public String shipmentTraceProNumber()
    shipmentTraceMasterTaskflow();
    JSFUtils.setValue("pageFlowScope.type", "pronumber");
    return null;
    public String shipmentTraceBOLNumber()
    shipmentTraceMasterTaskflow();
    JSFUtils.setValue("pageFlowScope.type", "bolnumber");
    return null;
    In the menu model (notice that these reference the different methods from above):
    <itemNode id="itemNode_ProNumberTrace" label="ProNumber Trace" action="#{viewScope.mainRegionManagerBean.shipmentTraceProNumber}" focusViewId=""/>
    <itemNode id="itemNode_BOLNumberTrace" label="BOL Number Trace" action="#{viewScope.mainRegionManagerBean.shipmentTraceBOLNumber}" focusViewId=""/>
    On the page:
    <af:region value="#{bindings.dynamicRegion1.regionModel}" id="r1"/>
    In the pagedef:
    <taskFlow id="dynamicRegion1" taskFlowId="${viewScope.mainRegionManagerBean.dynamicTaskFlowId}" activation="deferred" xmlns="http://xmlns.oracle.com/adf/controller/binding" Refresh="ifNeeded">
    <parameters>
    <parameter id="type" value="#{pageFlowScope.type}"/>
    </parameters>
    </taskFlow>
    Edited by: Adam Stortz on Nov 22, 2011 11:10 AM

  • Dynamic Regions and parameters - issue

    Jdev 11.1.1.6
    I have a main page that contains a dynamic region. I want to pass parameters to the region.
    Note that I have successfully created parameters for a NORMAL region inside a "parent" form. With a normal "child" region in a "parent",
    1. Open the "child" taskflow, click on the whitepace, go to overview, then paraemeters and define a parameter name and value, ex: InputParam and #{pageFlowScope.InputParam}.
    2. Open the "parent" form, click on the region, go to bindings, and edit the region. You see the parameter you specified, InputParam and you can enter a value. This value will come from the parent.
    3. Set refresh to if needed.
    However,
    With a dynamic region containing more than one "child" taskflow, I am getting an error. I do everything the same above.
    However, when I have the taskflow selected on the bindings tab of the parent form, and click on the structure window, parameter node, The ID text field is surrounded by orange, and a message displays that the reference to "InputParam" is not found.
    How are the name or id values specified for a dynamic region? How does one map a parameter from the parent to the "child"? Do you need to put this into a bean?
    Thanks,
    Stuart

    1) Parent A tasflow contains Child B taskflow.
    2) Child B expects a parameter called 'inputParameterChild'
    3) This will be defined inside the child B taskflow with 'java.lang.String' and value as '#{pageFlowScope.inputParam}'
    4) When you click the child B taskflow in parent A taskflow you will see the parameter expected by child B as 'inputParameterChild'
    5) Now you can pass the value as '#{pageFlowScope.inputParam}' , here you should have the inputParam set in the bean or in the parent taskflow as explained in step 2 and 3
    are you still facing the issue?

  • Open popup in dynamic region once region changes flows

    I need to open a popup in a flow if boolean is set to true in the pageFlowScope bean of the dynamic flow bean used in a dynamic region. The parent page/flow is configured in the adfc-config.xml and is controlled by a session bean.
    So the scenario is the main page has links to several different pages, each of which has a mean of editing a widget. The Widget edit page has a Tree object that lists the items by user defined categories. Double the tree widget opens a popup with the editor section for that particular widget. These widgets rely on each other and if there is a problem in a contained widget, then I provide a clickable link to go to that object. I'm able to get the main page to change regions to the correct widget flow.
    Once I get to the new widget control flow, the tree is displayed as usual and in the pageFlowScope bean I've set a boolean and populated the widget definition for display. Unfortuately, I have found a way to open the popup.
    I've tried a phase listener calling a method in the parent page. However, I'm not able to find the pageFlowScope bean by any means. I've set the pageFlowScope bean into the session and get it in the phaseListener method, but all attempts to show the popup seem to go into the great void. I've even added a button with the actionListener to pageFlowScope.myBean.showPopup, but can trigger the action event for that either.
    Using: JDeveloper 11g. Not using BC. Any help would be greatly appreciated.

    Thank you. That worked.
    I have one more question. How can I change the task flow in the dynamicRegion from another taskFlow. For example: I have taskFlow1 loaded into the dynamic region and I want on a button click from taskFlow1 to load taskFlow2 into the dynamicRegion. Is it possible?

  • Dynamic Region Issues

    Jdev 11.1.1.5 - JDK 1.6_31
    I have put a dynamic region on a page with 4 taskflows defined as the regions. Each taskflow is a train.
    I have a bean that controls the loading (the default bean) with a load for each screen.. ie public .. myRegion1, etc... in addition to the getDynamicTF that is created by default.
    public TaskFlowId getDynamicTaskFlowId() {
    return TaskFlowId.parse(taskFlowId);
    public String myjobFlow() {
    taskFlowId = "/WEB-INF/myJobstaskFlowCall.xml#myJobstaskFlowCall";
    return null;
    Everything works fine - the pages load and all is OK - until I select a tab in one of the regions.
    This will cause the generation of the event to get the taskflow from the bean. (getDynamicTaskFlowId)
    because the bean is backing scoped - it does not know the current taskflow (lost when the bean is destroyed)
    I tried to change the scope - but I get a controller error saying the backingBeanScope.DynamicRegionBean cannot be found!
    can anyone tell me the location of the controller file - or how to change the scope - or how to get around this issue.

    Hi,
    instead of using backingBeanScope use viewScope..
    and change expression wherever necessary like
    in page and more important in pageDef file..
    like
    from
    backingBeanScope.bean to viewScope.bean
    Hope this helps..

Maybe you are looking for

  • The volume for "IMG_1038.JPG" cannot be found

    I copied some photos off a friend's memory stick directly into one of my iphoto folders. Now when i try to move or change the photos, the I get this message (in the topic). When i oped the thumbnail, i can see the enlarged photo, but after 3 seconds

  • How do I change colour of Mountain Lion Finder window icons?

    The icons are all grey and actually make it harder to locate things. I know there is Side Effects to change this but it's Beta and I don't know if this trustworthy. Anyone know of a safe way to do this?

  • InContext editing error: This region contains content with dynamic behavior added..

    We just set up a web site with InContext editing following the procedures in Business Catalyst documentation to do that. But now when we go to the administration section of the site, and turn on InContext editing, it won't let us update the text. We

  • Airplay mirroring video works on PC but goes black on ios device

    Using Airplay I can mirror fine from my Ipad 3 (ios 6) or my iPhone 4S (ios 6) to my PC (Vista Ultimate) until I try to play a video (i.e. can mirror photos fine on both devices) -- and then the screen goes black on the ios device and the video only

  • Can't  start EM after creating DB via DBCA

    I have now installed, uninstalled and re-installed 10G about five times on my W2K laptop without being able to successfully start EM or log into a DB via SQLPlus, etc. There are two issues I am experiencing: 1) If I am not connected to the web thru m