4 Replies Latest reply on Aug 26, 2013 10:21 PM by Miguel Angel

    Custom UIShell JDeveloper 12c

    Miguel Angel

      I have migrated to JDeveloper 12c the example from this link http://perumaladf.blogspot.com/2013/01/making-mdi-application-by-using.html. This is working fine, so I copy the code and test it , but my copy doesn't work as expected. The only difference of my code from the example is that in the example there are three proyects in the same workspace, in my case I have two proyects in my workspace ( the code for the uishell tabs is in my ViewController project).

      These are my errors:

       

      • In my application when I select another tab, the first time works fine, but when I want to select another tab, it doesnt' work(the code doesn't get executed). The disclosure listener is not working fine.
      • If I have a table I got the error: Could not find component to stream. The AdministradorBean(bean that manages the tabs) is in view scope.
      • If I have a form with navigation buttons(previous,next,last,first), I click on next button, the navigation is not executed.

       

      This is part of my code of my uishell.jsf :

       

       <af:panelTabbed id="ptTabs" tabRemoval="all" dimensionsFrom="parent">
                                              <af:forEach var="tab" items="#{viewScope.tabBean.listaTabs}" varStatus="vs">
                                                  <af:showDetailItem id="sdiTab" stretchChildren="first" immediate="true"
                                                                     rendered="#{tab.activo}" disclosedTransient="true"
                                                                     textAndAccessKey="#{tab.titulo}"
                                                                     disclosed="#{tab.id== viewScope.tabBean.idTabSeleccionado}"
                                                                     itemListener="#{viewScope.tabBean.cerrarTab}"
                                                                     disclosureListener="#{viewScope.tabBean.seleccionarTab}">
                                                      <af:region value="#{bindings.mtfPrincipal.taskFlowBindings[tab.id].regionModel}"
                                                                 id="rTabs"/>
                                                      <f:attribute name="TAB_ID" value="#{tab.id}"/>
                                                  </af:showDetailItem>
                                              </af:forEach>
      </af:panelTabbed>
      

       

       

      This is the disclosure event of AdministradorBean.java:

       

      public void seleccionarTab(DisclosureEvent event) {
       UIComponent component = event.getComponent();
       String idTabActual = String.valueOf(component.getAttributes().get("TAB_ID"));
       setIdTabSeleccionado(idTabActual);
       actualizarTabs();
       }
      

       

      This the "actualizarTabs" method:

       

      public void actualizarTabs() {
       UIComponent uiComp = buscarComponenteEnArbol("ptTabs");
       if (uiComp != null) {
       AdfFacesContext.getCurrentInstance().addPartialTarget(uiComp);
       }
       }