3 Replies Latest reply: Dec 28, 2012 3:21 PM by EonvanTonder RSS

    Get disclosed showDetailItem [panelTabbed] when page renders

    Jai Om-Oracle
      Hello,

      My Jdev version is 11.1.1.6.
      I have a page where there are many showDetailItem under panelTabbed component at different levels.
      These showDetailItems are showing regions implemented as bounded taskflow using fragments. I am controlling taskflow activation logic using a pageFlowScope variable setting the value using something like this:
      <af:setPropertyListener from="tabLevel1"
                              to="#{pageFlowScope.TabLevel1}"
                              type="disclosure"/>
      Similarly other tabs are sharing variables as pageFlowScope.TabLevel2, pageFlowScope.TabLevel3...
      When the page renders first time, the value of pageScope variable is not set, since no disclosure listener is fired yet. I can not assume to activate the first Tab's taskflow since user may not have access [authorization] to first tab and in that case, it is not rendered at all.

      My problem is - How to figure out which tab is the first rendered tab at each level?

      Is there a way to capture which tab is disclosed under each panelTabbed component? I can then do something like setting the pageFlowScope variable for that level. My tabs are fixed at design time, so I can hard code showDetailItem's component Id to check/set.

      I tried binding panelTabbed in a bean and then try to iterate through it's children but it returns 0 children when page is rendered first time.

      So apparently, I am stuck and don't know how to proceed on this. Any help is highly appreciated.

      Thanks,
      Jai
        • 1. Re: Get disclosed showDetailItem [panelTabbed] when page renders
          EonvanTonder
          Jai,

          Have you considered using the dynamic tabs shell template? http://www.oracle.com/technetwork/developer-tools/adf/uishell-093084.html

          It sounds to me you would be better off setting the tab content from a backing bean, do you have some kind of menu? Add an actionlistener to your menu items to create tabs programmatically in your backing bean. Here is a good example of this technique for your version of ADF
          https://blogs.oracle.com/jheadstart/entry/core_adf11_uishell_with_menu

          Hope this helps
          • 2. Re: Get disclosed showDetailItem [panelTabbed] when page renders
            Jai Om-Oracle
            Hello,

            Thanks for your response.
            We are already using UIShell in our application. It is based on One-Page application concept.
            Menu is opening the pages in dynamic tabs supported by UIShell.

            The page has it's own tabs (showDetailItem under panelTabbed) defined at design time. I need to control activation of taskflows only when they are open.
            It works fine after user starts interacting with the tabs as disclosureListener is fired but first time is an issue.

            I need a solution to figure out the "open" tab at each level. Obviously, it's too late to change the design/navigation architecture of whole application.

            Thanks,
            Jai
            • 3. Re: Get disclosed showDetailItem [panelTabbed] when page renders
              EonvanTonder
              Jai Om wrote:
              I tried binding panelTabbed in a bean and then try to iterate through it's children but it returns 0 children when page is rendered first time.
              You may have inspected the panelTabbed too early, i.e. before the showDetailItems were created. Try to invoke a backing bean method when the document has finished loading and then inspect the different panel tabbed components in that method to discover your showDetailItems. You can use a pagePhaseListener or a clientlistener + serverlistener + custom event. Try google, there's plenty of examples of these approaches all over the web.