Uploaded image for project: 'RichFaces'
  1. RichFaces
  2. RF-12054

TabPanel onitemchange of outer tab fired by inner tab

    XMLWordPrintable

    Details

      Description

      When changing outer tab, "onitemchange" event of outer tab is fired and alert with text 'onitemchange' is shown.
      But when changing inner tab both "onitemchange" event of outer tab and inner tab are fired and two alerts are show, one with text 'onitemchange' and second with 'onitemchange inner'.
      It's wrong behaviour, because outer tab is not switched and its "onitemchange" event shouldn't be fired. Same situation with "onbeforeitemchange".

      Page code to reproduce:

       
      <html contentType="text/html" xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html"
          xmlns:f="http://java.sun.com/jsf/core" xmlns:rich="http://richfaces.org/rich">
      <h:head></h:head>
      <h:body>
          <h:form>
              <rich:tabPanel onitemchange="alert('onitemchange')">
                  <rich:tab name="tab1" header="tab1">tab1</rich:tab>
                  <rich:tab name="tab2" header="tab2">
                      <rich:tabPanel onitemchange="alert('onitemchange inner')">
                          <rich:tab name="tabinner1" header="tab inner 1">tab inner 1</rich:tab>
                          <rich:tab name="tabinner2" header="tab inner 2">tab inner 2</rich:tab>
                      </rich:tabPanel>
                  </rich:tab>
              </rich:tabPanel>
          </h:form>
      </h:body>
      </html> 
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                michpetrov Michal Petrov
                Reporter:
                przemod Przemysław Dębski
              • Votes:
                2 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: