2 Replies Latest reply: Jan 6, 2014 5:04 PM by Miguel Angel RSS

    Navigate to initial task flow in dynamic region with JDeveloper 12c

    Miguel Angel

      I have a home page with a dynamic region and three links and I am working with page fragments. The initial bounded task flow is "btfInicio".

      The requirement is that in each bounded task flow I have to implement a close button to return to the initial bounded task flow. This is my code:

       

      My Bean for my home page.

      public class AdministradorActividades extends DataControlBean {
      
          private HashMap parametrosGenerales = new HashMap();
          private String taskFlowId = "/WEB-INF/btfInicio.xml#btfInicio";
          private RichRegion regionPrincipal;
      
          public String gestionarDatosClinicos() {
              taskFlowId = "/WEB-INF/datosClinicos/btfDatosClinicos.xml#btfDatosClinicos";
              refrescarRegion();
              return null;
          }
          
          public void refrescarRegion(){
              AdfFacesContext adfContext = AdfFacesContext.getCurrentInstance();
              UIComponent region = findComponentInRoot("rPrin");
              adfContext.addPartialTarget(region);
          }
      

       

      My Home page.

      <af:decorativeBox id="db4" theme="medium"
                                                                            inlineStyle="margin-bottom:5px; margin-left:5px; margin-right:5px; margin-top:5px;">
                                                              <f:facet name="center">
                                                                  <af:region value="#{bindings.regionDinamica.regionModel}"
                                                                             id="rPrin" partialTriggers="::lCli ::lCon ::lRep"/>
                                                              </f:facet>
                                                          </af:decorativeBox>
      

       

      My Home page Def:

      <taskFlow id="regionDinamica" xmlns="http://xmlns.oracle.com/adf/controller/binding"
                        taskFlowId="${pageFlowScope.managerRegion.taskFlowId}" activation="deferred"
                        parametersMap="#{pageFlowScope.managerRegion.parametrosGenerales}" Refresh="ifNeeded"/>
      

       

      I have tried this inside a fragment from my bounded task flow "btfdatosClinicos" where I have a button , but doesn't work. The home page is not refreshed:

       

              AdfFacesContext adfContext = AdfFacesContext.getCurrentInstance();
              AdministradorActividades admActividades = (AdministradorActividades) adfContext.getPageFlowScope().get("managerRegion");
              admActividades.setTaskFlowId("/WEB-INF/btfInicio.xml#btfInicio");
              UIComponent region = findComponentInRoot("rPrin");
              adfContext.addPartialTarget(region);
      

       

      If I Implement a control flow case inside my bounded task flow "btfdatosClinicos" to "btfInicio" then I can see the page fragment that correspond to the bounded task flow "btfInicio", but if I clic one of the three links, then the action event is not executed.