You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lu...@apache.org on 2011/09/23 20:21:19 UTC
svn commit: r1174940 - in /myfaces/core/trunk:
api/src/main/java/javax/faces/component/UIComponent.java
shared/src/main/java/org/apache/myfaces/shared/renderkit/RendererUtils.java
Author: lu4242
Date: Fri Sep 23 18:21:19 2011
New Revision: 1174940
URL: http://svn.apache.org/viewvc?rev=1174940&view=rev
Log:
small fix call getChildCount always.
Modified:
myfaces/core/trunk/api/src/main/java/javax/faces/component/UIComponent.java
myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/RendererUtils.java
Modified: myfaces/core/trunk/api/src/main/java/javax/faces/component/UIComponent.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/component/UIComponent.java?rev=1174940&r1=1174939&r2=1174940&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/component/UIComponent.java (original)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/component/UIComponent.java Fri Sep 23 18:21:19 2011
@@ -674,9 +674,8 @@ public abstract class UIComponent implem
this.encodeChildren(context);
} // let children render itself
else {
- int childCount = this.getChildCount();
- if (childCount > 0) {
- for (int i =0; i < childCount; i++) {
+ if (this.getChildCount() > 0) {
+ for (int i =0; i < this.getChildCount(); i++) {
UIComponent comp = this.getChildren().get(i);
comp.encodeAll(context);
}
Modified: myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/RendererUtils.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/RendererUtils.java?rev=1174940&r1=1174939&r2=1174940&view=diff
==============================================================================
--- myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/RendererUtils.java (original)
+++ myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/RendererUtils.java Fri Sep 23 18:21:19 2011
@@ -516,10 +516,9 @@ public final class RendererUtils
public static void renderChildren(FacesContext facesContext, UIComponent component)
throws IOException
{
- int childCount = component.getChildCount();
- if (childCount > 0)
+ if (component.getChildCount() > 0)
{
- for (int i = 0; i < childCount; i++)
+ for (int i = 0; i < component.getChildCount(); i++)
{
UIComponent child = component.getChildren().get(i);
//renderChild(facesContext, child);