You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ta...@apache.org on 2020/06/18 13:14:40 UTC
[myfaces] branch master updated: MYFACES-4341
This is an automated email from the ASF dual-hosted git repository.
tandraschko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/myfaces.git
The following commit(s) were added to refs/heads/master by this push:
new 93ed27b MYFACES-4341
93ed27b is described below
commit 93ed27bd82e341068816d329a532e32ceee8ac26
Author: Thomas Andraschko <ta...@apache.org>
AuthorDate: Thu Jun 18 15:14:32 2020 +0200
MYFACES-4341
---
api/src/main/java/javax/faces/component/UIData.java | 7 ++++++-
.../apache/myfaces/view/facelets/component/UIRepeat.java | 16 +++++++---------
2 files changed, 13 insertions(+), 10 deletions(-)
diff --git a/api/src/main/java/javax/faces/component/UIData.java b/api/src/main/java/javax/faces/component/UIData.java
index 4fb529c..c165dee 100644
--- a/api/src/main/java/javax/faces/component/UIData.java
+++ b/api/src/main/java/javax/faces/component/UIData.java
@@ -2116,6 +2116,12 @@ public class UIData extends UIComponentBase implements NamingContainer, UniqueId
@Override
public boolean visitTree(VisitContext context, VisitCallback callback)
{
+ boolean skipIterationHint = context.getHints().contains(VisitHint.SKIP_ITERATION);
+ if (skipIterationHint)
+ {
+ return super.visitTree(context, callback);
+ }
+
// push the Component to EL
pushComponentToEL(context.getFacesContext(), this);
try
@@ -2163,7 +2169,6 @@ public class UIData extends UIComponentBase implements NamingContainer, UniqueId
}
}
- boolean skipIterationHint = context.getHints().contains(VisitHint.SKIP_ITERATION);
if (skipIterationHint)
{
// If SKIP_ITERATION is enabled, do not take into account rows.
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/component/UIRepeat.java b/impl/src/main/java/org/apache/myfaces/view/facelets/component/UIRepeat.java
index 9863a4d..92fbe68 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/component/UIRepeat.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/component/UIRepeat.java
@@ -1243,17 +1243,16 @@ public class UIRepeat extends UIComponentBase implements NamingContainer
_facesContext = facesContext;
}
+ // override the behavior from UIComponent to visit all children once per "row"
@Override
public boolean visitTree(VisitContext context, VisitCallback callback)
{
- // override the behavior from UIComponent to visit
- // all children once per "row"
-
boolean skipIterationHint = context.getHints().contains(VisitHint.SKIP_ITERATION);
if (skipIterationHint)
{
return super.visitTree(context, callback);
}
+
// push the Component to EL
pushComponentToEL(context.getFacesContext(), this);
try
@@ -1267,8 +1266,6 @@ public class UIRepeat extends UIComponentBase implements NamingContainer
final int prevIndex = _index;
final int prevCount = _count;
- // validate attributes
- _validateAttributes();
// reset index and save scope values
_captureScopeValues();
@@ -1290,12 +1287,13 @@ public class UIRepeat extends UIComponentBase implements NamingContainer
default:
// determine if we need to visit our children
// Note that we need to do this check because we are a NamingContainer
- Collection<String> subtreeIdsToVisit = context
- .getSubtreeIdsToVisit(this);
- boolean doVisitChildren = subtreeIdsToVisit != null
- && !subtreeIdsToVisit.isEmpty();
+ Collection<String> subtreeIdsToVisit = context.getSubtreeIdsToVisit(this);
+ boolean doVisitChildren = subtreeIdsToVisit != null && !subtreeIdsToVisit.isEmpty();
if (doVisitChildren)
{
+ // validate attributes
+ _validateAttributes();
+
// visit the facets of the component
if (getFacetCount() > 0)
{