myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lof...@apache.org
Subject svn commit: r918004 - in /myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago: component/AbstractUIGridLayout.java internal/layout/LayoutContext.java
Date Tue, 02 Mar 2010 12:44:39 GMT
Author: lofwyr
Date: Tue Mar  2 12:44:38 2010
New Revision: 918004

URL: http://svn.apache.org/viewvc?rev=918004&view=rev
Log:
add id to logging of the layout component tree

Modified:
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/AbstractUIGridLayout.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/internal/layout/LayoutContext.java

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/AbstractUIGridLayout.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/AbstractUIGridLayout.java?rev=918004&r1=918003&r2=918004&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/AbstractUIGridLayout.java
(original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/AbstractUIGridLayout.java
Tue Mar  2 12:44:38 2010
@@ -38,6 +38,7 @@
 import org.apache.myfaces.tobago.layout.PixelLayoutToken;
 import org.apache.myfaces.tobago.layout.RelativeLayoutToken;
 
+import javax.faces.context.FacesContext;
 import java.util.Arrays;
 import java.util.List;
 
@@ -303,6 +304,8 @@
   @Override
   public String toString() {
     return getClass().getSimpleName()
+        + "#"
+        + getClientId(FacesContext.getCurrentInstance())
         + (grid != null
         ? "(" + Arrays.toString(grid.getWidths()) + ", " + Arrays.toString(grid.getHeights())
+ ")"
         : "");

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/internal/layout/LayoutContext.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/internal/layout/LayoutContext.java?rev=918004&r1=918003&r2=918004&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/internal/layout/LayoutContext.java
(original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/internal/layout/LayoutContext.java
Tue Mar  2 12:44:38 2010
@@ -26,6 +26,7 @@
 import org.apache.myfaces.tobago.layout.Orientation;
 
 import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
 
 /*
 An algorithm for layouting ...
@@ -80,10 +81,13 @@
   }
 
   private void log(StringBuffer buffer, UIComponent component, int depth) {
+    FacesContext facesContext = FacesContext.getCurrentInstance();
     for (int i = 0; i < depth; i++) {
       buffer.append("  ");
     }
     buffer.append(component.getClass().getSimpleName());
+    buffer.append("#");
+    buffer.append(component.getClientId(facesContext));
     if (component instanceof LayoutBase) {
       buffer.append("(");
       buffer.append(((LayoutBase) component).getCurrentWidth());



Mime
View raw message