0 Replies Latest reply on Feb 27, 2008 12:43 PM by daumkep

    Error with rich:tabPanel and Javascript hash table

    daumkep

      Hi all,

      I have a strange error when using a javascript hash and a rich:tabPanel together. In my example code below I would expect to get ONE alert when the javascript is called. Instead, I get dozens of alerts. For some reason, the javascript array and the rich:tabPanel don't seem to like each other. Does anybody have an idea? Is it already known? Anybody can reproduce it?

      Thank you for your help
      Philipp


      <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
      <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
      <%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
      <%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
      
      <body>
      <script>
      var elem2Array = new Array();
      elem2Array['in1'] = 'out1';
      for (var element in elem2Array) {
       alert(element);
      }
      </script>
      <f:view>
      <rich:tabPanel>
      <rich:tab>
      <h:outputText value="Panel1"></h:outputText>
      </rich:tab>
      </rich:tabPanel>
      </f:view>
      </body>