2 Replies Latest reply on Oct 3, 2013 5:51 PM by 981554

    Handling close event in UI shell

    981554

      Hi Experts,

      I am facing some challenge to figure out where to write close icon action code

       

       

        <af:commandNavigationItem id="tabIndex" rendered="#{tab.active}" immediate="false"

                                              actionListener="#{viewScope.dynTabManager.tabActivatedEvent}"

                                              inlineStyle="#{tab.dirty ? 'font-style: italic' : ''}"

                                              partialSubmit="true"

                                              textAndAccessKey="#{tab.title}"

                                              remove="#{tab.closeable ? 'inherit' : 'no'}"

                                              itemListener="#{viewScope.dynTabManager.removeTab}">

                      <f:attribute name="tabId" value="#{tab.id}"/>

      </commandNavigationItem>

       

      If we see below link correct answer part

      It is stating

      "closeIcon commanlink actionListener to be bound to "#{viewScope.tabContext.closeIcon}""

      but we don't any componet for close icon it is comming by enablibg

        remove="#{tab.closeable ? 'inherit' : 'no'}" in command navigationItem.

       

      Please help

       

      Re: Dynamic Tab UI Shell - close tab action & number of open tabs control

        • 1. Re: Handling close event in UI shell
          Frank Nimphius-Oracle

          Hi,

           

          from the description, this must be a command link on the tab. For this you download the Dynamic tab Shell source code and edit the dynamicTabShell.jspx file. Here you edit the close icon link and reference the managed bean method mentioned in the post. After this you then use your version of the template instead the one shipped with the product.

           

          Frank 

          • 2. Re: Handling close event in UI shell
            981554

            Hi Frank,

            Thanks for your reply.

            Code which is shipped with UI shell is

             

            <af:panelBorderLayout id="pt_psl6" styleClass="AFStretchWidth"

                                                                      rendered="#{viewScope.tabContext.tabsRendered}">

                                                  <af:navigationPane id="pt_np1"

                                                                     binding="#{viewScope.tabContext.tabsNavigationPane}"

                                                                     rendered="#{viewScope.tabContext.selectedTabIndex != -1}"

                                                                     value="#{viewScope.tabContext.tabMenuModel}" var="tab">

                                                     <f:facet name="nodeStamp">

                                                       <af:commandNavigationItem id="tabIndex" rendered="#{tab.active}"

                                                         actionListener="#{viewScope.tabContext.tabActivatedEvent}"

                                                         inlineStyle="#{tab.dirty ? 'font-style: italic' : ''}"

                                                         partialSubmit="true" text="#{tab.title}" immediate="true">

                                                         <f:attribute name="tabIndex" value="#{tab.index}" /> 

                                                       </af:commandNavigationItem>

                                                     </f:facet>

                                                   </af:navigationPane>

                                                   <f:facet name="end">

                                                    <af:commandImageLink

                                                       icon="/oracle/ui/pattern/dynamicShell/images/close.png"

                                                       hoverIcon="/oracle/ui/pattern/dynamicShell/images/closeHover.png"

                                                       actionListener="#{viewScope.tabContext.tabRemovedEvent}"

                                                       rendered="#{viewScope.tabContext.selectedTabIndex != -1}"

                                                       immediate="true"

                                                       partialSubmit="true" id="pt_cil1"/>

                                                  </f:facet>

                                                </af:panelBorderLayout>

             

            Now with above code Close Icon is coming to End(Extream Right corner) But I want close icon to come next to tab title.

             

            With below code close icon is coming next to tab title, but I don't have hold of close with below code

             

            <af:commandNavigationItem id="tabIndex"

                                                                          rendered="#{tab.active}"

                                                                          actionListener="#{viewScope.tabContext.tabActivatedEvent}"

                                                                          inlineStyle="#{tab.dirty ? 'font-style: italic' : ''}"

                                                                          partialSubmit="true"

                                                                          text="#{pageFlowScope.LoginBean.labelMap[tab.title]}"

                                                                          shortDesc="#{tab.title}"

                                                                          immediate="true"

                                                                          remove="#{tab.index eq 0 ? 'no' : 'inherit'}"

                                                                          itemListener="#{viewScope.tabContext.processItemEvent}"

                                                                          returnListener="#{viewScope.tabContext.tabReturnEventListener}">

             

            Please assist me on how to bring commandNavigationItem and our close link next to each other