5 Replies Latest reply on Mar 25, 2013 6:02 PM by 931325

    provide close option on every Dyantab of template -adf11.6

      HI All ,

      i have a requirement on dynatab template such as provide Close icon on each tab , upon click of close icon the "Tab' should close .

      I have followed the below andrejusb approach , for launching the dynatab's and i Customized the Dynamic Tab Shell template jar and added to the project

      Please provide your thoughts relates to the above approach .

      Aappriciate inputs .

      Thanks inadvance
        • 1. Re: provide close option on every Dyantab of template -adf11.6
          Refer http://www.oracle.com/technetwork/issue-archive/2012/12-mar/o22adf-1518265.html

          Article published from Frank on Dynamic Tabs. In the sample provided, he has introduced two buttons on the innertoolbar which allows you to close the tabs .

          • 2. Re: provide close option on every Dyantab of template -adf 11.6
            Hi Rajdeep,

            Thanks for the udpate , i saw the above Frank approach and its based on the common toolbar option for closing the tabs.

            but my rquirement is different , i need to display close icon and close option on each tab ,as soon as any new Tab launches .

            User would be ablle to select the flag and also close the tab by choosing close icon over the Tab on commandNavigationItem.

            any hints ?

            thanks in advance
            • 3. Re: provide close option on every Dyantab of template -adf 11.6
              That article gives a complete exposure how you can close tabs. There is close icon in right corner of tab .. that can be used.

              For having a close tab button on each page fragment, -

              1. define a template for the page Fragment.
              2. All pageFragment that should open in a tab should be based on the template.
              3. Now you have close button available on each pagefragment ...\


              • 4. Re: provide close option on every Dyantab of template -adf 11.6
                HI ,

                thats not my requirement .

                I wanted to provide close icon in each Tab along with the Tab name .

                I achived the close icon on each CommandNavigationitem as per below appraoch , i have modified the template code as below . If we want to achive the close Icon on each Tab , select the af:NavigationPane -go to property inspector and change the property called as Itememoval =All ,so that all Tabs will display the close icon alone with the Tabname .

                Template code
                <af:navigationPane id="pt_np1"
                rendered="#{viewScope.tabContext.selectedTabIndex != -1}"
                value="#{viewScope.tabContext.tabMenuModel}" var="tab" itemRemoval="all">
                <f:facet name="nodeStamp">
                <af:commandNavigationItem id="tabIndex" rendered="#{tab.active}"
                inlineStyle="#{tab.dirty ? 'font-style: italic' : ''}"
                partialSubmit="true" text="#{tab.title}" immediate="true">
                <f:attribute name="tabIndex" value="#{tab.index}" />

                with the above code change all tabs will display the close icon , but now my question from begining is how can i close Tab upon click of close icon on a each tab ? (I.e how to call the removeCurrentTab() on af:commandNavigationItem component?)

                thanks in advance