This discussion is archived
1 2 Previous Next 19 Replies Latest reply: Aug 21, 2013 11:05 PM by 979970 RSS

Nested tab in adf

979970 Newbie
Currently Being Moderated


I have a page tab(say A) which contains three sub tabs(B, C, D). Clicking on tab A will show contents related to it and clicking on other three tabs will show their respective content. Now I want to show in the same page under the base tab's showdetail node whenever any sub tab is clicked. How to proceed with this?

  • 1. Re: Nested tab in adf
    raykdogs Explorer
    Currently Being Moderated

    Add an OutputText or something similar between the base tab and sub tabs.

    Bind that control to a backing bean.

    Point the disclosureListener of the sub tab (ShowDetailItem) to a backing bean.

    In the backing bean, use something like this:

    if (disclosureEvent.isExpanded()) {

      setOutputText(disclosureEvent.getComponent().getId())

    }

  • 2. Re: Nested tab in adf
    979970 Newbie
    Currently Being Moderated


    Hi Ray,

    Thanks for your reply...by setting the content of the output text will it also replace the previous content that was in the page? For example, if I've clicked on the base tab first and then click on one of the sub tabs will it hide the previous content and show the current content in place of that?

  • 3. Re: Nested tab in adf
    Frank Nimphius Employee ACE
    Currently Being Moderated

  • 4. Re: Nested tab in adf
    979970 Newbie
    Currently Being Moderated

    Hi,

    I'm using panelTab to create tabs in JDeveloper 11.1.1.7.0.

  • 5. Re: Nested tab in adf
    raykdogs Explorer
    Currently Being Moderated

    Hi 979970,

     

    I am not sure I understand.  If the below doesn't answer your question, please provide additional information.

    By using setOutputText(disclosureEvent.getComponent().getId()); in your backing bean, the value of the utputText will change.  So, whatever subtab you select will be displayed in the outputText.  If you change to a different base tab, the outputText will no longer display.  You would need to add another outputText to the showDetailItem for each base tab and set the disclosureListener of each subtab accordingly.

     

    I hope that helps.

    Ray

  • 6. Re: Nested tab in adf
    979970 Newbie
    Currently Being Moderated

    Hi ray,

    I tried with the below code :

    <af:panelStretchLayout id="psl1">

              <f:facet name="center">

                <af:panelTabbed id="pt1">//basetab

                  <af:showDetailItem text="showDetailItem 1" id="sdi1">

                  <af:outputText value="outputText3" id="ot19" binding="#{simpleBean.ot}"/>

                      <af:panelTabbed id="pt2" inlineStyle="width:971px; height:496px;">//subtab

                           <af:showDetailItem text="showDetailItem 2" id="sdi2" disclosureListener="#{simpleBean.setContentBT}">

                             <af:table ....>//subtab's table

                                  ---------

                                  ---------

                             </af:table>

                           </af:showDetailItem>

                      </af:panelTabbed>

                           <af:table ....>//basetab's table 

                                  ---------

                                  ---------

                           </af:table>

                      </af:showDetailItem>

                </af:panelTabbed>

    And backing bean code:

     

        public void setContentBT(DisclosureEvent disclosureEvent) {

            // Add event code here...

            getOt().setValue(disclosureEvent.getComponent().getId());

        }

    Where am I going wrong? 

  • 7. Re: Nested tab in adf
    raykdogs Explorer
    Currently Being Moderated

    A couple of things that I notice:

    You need to have the showDetailItems (subtabs) as a partial trigger on the outputText.

    If you are binding your outputText to simpleBean.ot, your disclosureListener method should have

    ot.setValue()

    not

    getOt.setValue.

  • 8. Re: Nested tab in adf
    979970 Newbie
    Currently Being Moderated

    Hi Ray,

    the disclosureListener method is not getting invoked. You have any idea why?

  • 9. Re: Nested tab in adf
    MarcSantos Explorer
    Currently Being Moderated

    Hi,

    one thing you have to be aware of is that after clicking on a tab not the corresponding 'tab disclosure listener' is fired but ALL disclosure listeners are fired.

    To find the right component try this code

    public void tabClicked(DisclosureEvent disclosureEv) {

       if (disclosureEv.isExpanded()) {

            ...

       }

    }

  • 10. Re: Nested tab in adf
    979970 Newbie
    Currently Being Moderated

    Hi Marc,

    I have ckecked fot the currently selected tab using the code u've mentioned. But the listener method is not getting called!!How can we implement nested tab functionality in adf where the base tab page and the sub tabs' pages will be shown in the same page?

  • 11. Re: Nested tab in adf
    MarcSantos Explorer
    Currently Being Moderated

    mmmh,

    you could try this:

    add the following line as first line in your disclosure listener:

    disclosureEvent.getComponent().processUpdates(FacesContext.getCurrentInstance());

     

    I never tried this on a disclosureEvent but only on simple ValueChangeEvents...

  • 12. Re: Nested tab in adf
    raykdogs Explorer
    Currently Being Moderated

    Hi 979970,

    You could add

    System.Out.Println("disclosureEvent reached");

    to the beginning of the disclosure event.  Then keep an eye on your log when you click on tabs.

    If this doesn't work, can you post the source for the subtabs PanelTabbed component, the Managed Bean section of your adfc-config.xml, and the function in your bean that you expect to be called by the disclosure listener.

    Ray

  • 13. Re: Nested tab in adf
    979970 Newbie
    Currently Being Moderated

    Ray,

    Can you provide me a demo of the solution you suggested?

    Here we are replacing the content of the output text with disclosureEvent.getComponent().getId() which is the id of the selected tab. But it is not the content.

  • 14. Re: Nested tab in adf
    raykdogs Explorer
    Currently Being Moderated

    Here we are replacing the content of the output text with disclosureEvent.getComponent().getId() which is the id of the selected tab. But it is not the content.

    Are you trying to display which tab was selected or some content in the selected tab?  I think we may be going down different paths.

1 2 Previous Next

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points