[ 
https://issues.jboss.org/browse/RF-11999?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jean ANDRE updated RF-11999:
----------------------------

    Attachment: TabOnHeaderMouseDownError.png


Screen shot of the error and tabs layout.
                
>  TabPanel - Tab - onheadermousedown - onheadermouseup - javascript error - 
> item is undefined
> --------------------------------------------------------------------------------------------
>
>                 Key: RF-11999
>                 URL: https://issues.jboss.org/browse/RF-11999
>             Project: RichFaces
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>         Environment: RichFaces 4.2.0 CR1 - JSF/Mojorra 2.1.6 - FireFox 10 - 
> Windows 7 - WAS 8.0.0.1 - Spring 3.0.6
>            Reporter: Jean ANDRE
>         Attachments: index.xhtml, TabOnHeaderMouseDownError.png
>
>
> On rich:tab we use the attribute "onheadermousedown" which a javascript 
> function defined by a4j:jsFunction. When we switch tab, we got the following 
> error:
> {code}
> item is undefined - Line 363
>    /**
>    * @private
>    * */
>    __getItemIndex : function (itemName) {
>    var item;
>    for (var i = 0; i < this.items.length; i++) {
>       item = this.items[i];
> >>>>>  if (!item.disabled && item.getName() === itemName) {
>          return i;
>       }
>    }
> rf.log.info("TogglePanel.getItemIndex: item with name '" + itemName + "' not 
> found");
> return -1; }, 
> {code}
> The error may be linked to the RF-11763.
> XHTML fragment code
> ===================
> {code}
> <c:forEach items="#{desktopTabController.desktopTabBean.tabElements}" 
> var="tab">
>    <rich:tab id="#{tab.id}" name="#{tab.id}" 
> onheadermousedown="enterTab('#{tab.id}');">
>    <!--                -->
>    <!--  DYNAMIC TABS  -->
>    <!--                -->
>    <f:facet name="header">
>       <h:panelGrid columns="2" 
> title="#{desktopTabController.getTabHeader(tab.id)}">
>          <h:outputText 
> value="#{desktopTabController.getAdjustedTabHeader(tab.id)}" />
>        <h:graphicImage value="/images/closeButton.png"
>                   styleClass="closeButton"
>                      onclick="closeTab('#{tab.id}');event.stopPropagation();" 
> />
>       </h:panelGrid>
>    </f:facet>
>    <f:subview id="#{tab.id}-subView" rendered="#{tab.id eq 
> desktopTabController.activeTab}">
>       <ui:include src="#{tab.xhtmlFile}" />
>    </f:subview>
>    </rich:tab>
> </c:forEach>
> <!--               -->
> <!-- DESKTOP TABS  -->
> <!--               -->
> <a4j:jsFunction name="enterTab" render="menu-opened-tabs">
>    <a4j:param name="activeTab" assignTo="#{desktopTabController.activeTab}" />
> </a4j:jsFunction>
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        
_______________________________________________
richfaces-issues mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/richfaces-issues

Reply via email to