Skip to content

Commit 6775aed

Browse files
committed
1 parent 7f64b48 commit 6775aed

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

src/main/java/org/primefaces/component/api/UITabPanel.java

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1016,9 +1016,10 @@ public void processDecodes(FacesContext context) {
10161016
}
10171017
else {
10181018
if (this.isDynamic()) {
1019-
for (UIComponent component : getChildren()) {
1020-
if (component instanceof Tab) {
1021-
Tab tab = (Tab) component;
1019+
for (int i = 0; i < getChildCount(); i++) {
1020+
UIComponent child = getChildren().get(i);
1021+
if (child instanceof Tab) {
1022+
Tab tab = (Tab) child;
10221023
if (tab.isLoaded()) {
10231024
tab.processDecodes(context);
10241025
}
@@ -1061,9 +1062,10 @@ public void processValidators(FacesContext context) {
10611062
}
10621063
else {
10631064
if (this.isDynamic()) {
1064-
for (UIComponent component : getChildren()) {
1065-
if (component instanceof Tab) {
1066-
Tab tab = (Tab) component;
1065+
for (int i = 0; i < getChildCount(); i++) {
1066+
UIComponent child = getChildren().get(i);
1067+
if (child instanceof Tab) {
1068+
Tab tab = (Tab) child;
10671069
if (tab.isLoaded()) {
10681070
tab.processValidators(context);
10691071
}
@@ -1101,9 +1103,10 @@ public void processUpdates(FacesContext context) {
11011103
}
11021104
else {
11031105
if (this.isDynamic()) {
1104-
for (UIComponent component : getChildren()) {
1105-
if (component instanceof Tab) {
1106-
Tab tab = (Tab) component;
1106+
for (int i = 0; i < getChildCount(); i++) {
1107+
UIComponent child = getChildren().get(i);
1108+
if (child instanceof Tab) {
1109+
Tab tab = (Tab) child;
11071110
if (tab.isLoaded()) {
11081111
tab.processUpdates(context);
11091112
}
@@ -1434,9 +1437,10 @@ public boolean isRepeating() {
14341437

14351438
public void resetLoadedTabsState() {
14361439
if (!this.isRepeating() && this.isDynamic()) {
1437-
for (UIComponent component : getChildren()) {
1438-
if (component instanceof Tab) {
1439-
Tab tab = (Tab) component;
1440+
for (int i = 0; i < getChildCount(); i++) {
1441+
UIComponent child = getChildren().get(i);
1442+
if (child instanceof Tab) {
1443+
Tab tab = (Tab) child;
14401444
tab.setLoaded(false);
14411445
}
14421446
}

0 commit comments

Comments
 (0)