[richfaces-issues] [JBoss JIRA] Resolved: (RF-10449) TogglePanel.js: Array should not be iterated via for..in

Pavel Yaschenko (JIRA) jira-events at lists.jboss.org
Tue Feb 15 08:11:13 EST 2011


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

Pavel Yaschenko resolved RF-10449.
----------------------------------

    Resolution: Done


> TogglePanel.js: Array should not be iterated via for..in
> --------------------------------------------------------
>
>                 Key: RF-10449
>                 URL: https://issues.jboss.org/browse/RF-10449
>             Project: RichFaces
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: component-output
>    Affects Versions: 4.0.0.CR1
>            Reporter: Nick Belaevski
>            Assignee: Pavel Yaschenko
>            Priority: Trivial
>             Fix For: 4.0.0.CR1
>
>
> togglePanel.js uses the following:
>             this.items = [];
> and then:
>             for (var i in this.items) {
>                 if (!this.items[i].disabled && this.items[i].getName() === itemName) {
>                     return parseInt(i);
>                 }
>             }
> Iteration over Array should be using 'for' cycle around [0..items.length) and not for..in

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the richfaces-issues mailing list