Forum Stats

  • 3,734,761 Users
  • 2,247,037 Discussions
  • 7,857,483 Comments

Discussions

Custom UIShell JDeveloper 12c

Miguel Angel
Miguel Angel Member Posts: 518
edited Aug 26, 2013 6:21PM in JDeveloper and ADF

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);
}
}

Best Answer

  • Cvele_new_account
    Cvele_new_account Member Posts: 4,810 Bronze Crown
    Accepted Answer

    Hi,

    The JDev 12c (actual release ) definitely not ready for UIShell apps, there are a series of bugs which are already logged:

    • Bug 17158398 - COMMAND COMPONENTS DO NOT WORK WHEN OPENING REGION IN DYNAMIC TAB
    • Bug 17156672 - UI NOT RENDERED CORRECTLY DUE TO CONTEXT PARAM DEFAULT_DIMENSION
    • Bug 17156560 - JAVA.LANG.ILLEGALSTATEEXCEPTION: COULD NOT FIND COMPONENT TO STREAM
    • Bug 17158597 - UPDATES ARE LOST WHEN DEFINING REGIONCONTROLLER IN PAGEDEF CONTROLLERCLASS PROP


      etc...

    This is precisely one of the reasons why I want to wait for the next bugfix release.

    But it is certainly necessary to make a metalink SR, for this to be resolved quickly.


    Without this, I just can not begin to develop a new app under 12c.

Answers

  • Frank Nimphius-Oracle
    Frank Nimphius-Oracle Member Posts: 29,689
    edited Aug 14, 2013 3:08AM

    Hi,

    so let me summarize: The sample itself when upgraded to 12c works okay. The copy of the sample code to your application fails.

    There is a difference between your code and the blog code though

      <af:showDetailItem id="sdiTab" stretchChildren="first" immediate="true"
       rendered="#{tab.activo}" disclosedTransient="true" 

    Looking at the tag documentation

    http://docs.oracle.com/cd/E28280_01/apirefs.1111/e12419/tagdoc/af_showDetailItem.html

    it says:

    "The disclosedTransient attribute is not supported by the rich client renderers and may only be used with the Apache MyFaces Trinidad RenderKit. If this attribute is set to true in an ADF page, the component will not function correctly. This attribute appears in ADF due to it being inherited from UIXShowDetail. The value must either not be set, or must be set to false, a value of true will cause problems."

    Can you test without this attribute and maybe share with me why you set it ?

    Frank

  • Miguel Angel
    Miguel Angel Member Posts: 518

    Yes that 's correct.

    The property disclosedTransient is also used in the example so I used it. I removed it but the application has the same errors.I have made a new copy with the java classes from the sample but doesn't work neither. Maybe you can help me with a test of my code. This is the link of my code. http://www.mediafire.com/download/4diey29x25v5b88/CustomUIShell.zip

    I am going to develope a new application and I want to make it with multi tabs.

  • Cvele_new_account
    Cvele_new_account Member Posts: 4,810 Bronze Crown
    Accepted Answer

    Hi,

    The JDev 12c (actual release ) definitely not ready for UIShell apps, there are a series of bugs which are already logged:

    • Bug 17158398 - COMMAND COMPONENTS DO NOT WORK WHEN OPENING REGION IN DYNAMIC TAB
    • Bug 17156672 - UI NOT RENDERED CORRECTLY DUE TO CONTEXT PARAM DEFAULT_DIMENSION
    • Bug 17156560 - JAVA.LANG.ILLEGALSTATEEXCEPTION: COULD NOT FIND COMPONENT TO STREAM
    • Bug 17158597 - UPDATES ARE LOST WHEN DEFINING REGIONCONTROLLER IN PAGEDEF CONTROLLERCLASS PROP


      etc...

    This is precisely one of the reasons why I want to wait for the next bugfix release.

    But it is certainly necessary to make a metalink SR, for this to be resolved quickly.


    Without this, I just can not begin to develop a new app under 12c.

  • Miguel Angel
    Miguel Angel Member Posts: 518

    Thank you for that information, I have tested my sample code with JDeveloper 11.1.2.3.0 and it works fine. As Cvele_new_account says, I have to wait until these bugs are resolved.

This discussion has been closed.