You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2014/03/11 13:33:26 UTC
svn commit: r1576310 -
/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIGridLayout.java
Author: lofwyr
Date: Tue Mar 11 12:33:25 2014
New Revision: 1576310
URL: http://svn.apache.org/r1576310
Log:
TOBAGO-1372
- fix last commit: empty panels will not affect the sizes
Modified:
myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIGridLayout.java
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIGridLayout.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIGridLayout.java?rev=1576310&r1=1576309&r2=1576310&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIGridLayout.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIGridLayout.java Tue Mar 11 12:33:25 2014
@@ -167,11 +167,13 @@ public abstract class AbstractUIGridLayo
}
if (token instanceof AutoLayoutToken || token instanceof RelativeLayoutToken) {
- if (origin.getSpan(orientation) == 1 && (component.isRendered() || isRigid())) {
- intervalList.add(new Interval(component, orientation));
- } else {
- if (LOG.isDebugEnabled()) {
- LOG.debug("Components with span > 1 will be ignored in 'auto' layout rows/columns.");
+ if ((component.isRendered() || isRigid())) {
+ if (origin.getSpan(orientation) == 1) {
+ intervalList.add(new Interval(component, orientation));
+ } else {
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Components with span > 1 will be ignored in 'auto' layout rows/columns.");
+ }
}
}
}
@@ -183,14 +185,16 @@ public abstract class AbstractUIGridLayo
heads[i].setIntervalList(intervalList);
}
if (token instanceof AutoLayoutToken) {
- if (intervalList.size() > 0) {
- heads[i].setCurrent(intervalList.getCurrent());
- } else {
- heads[i].setCurrent(Measure.valueOf(100));
- LOG.warn("Found an 'auto' token in {} definition, but there is no component inside with span = 1! " +
- "So the value for 'auto' can't be evaluated (clientId={}). Using 100px.",
- orientation == Orientation.HORIZONTAL ? "columns" : "rows",
- getClientId(getFacesContext()));
+ if (heads[i].isRendered()) {
+ if (intervalList.size() > 0) {
+ heads[i].setCurrent(intervalList.getCurrent());
+ } else {
+ heads[i].setCurrent(Measure.valueOf(100));
+ LOG.warn("Found an 'auto' token in {} definition, but there is no component inside with span = 1! " +
+ "So the value for 'auto' can't be evaluated (clientId={}). Using 100px.",
+ orientation == Orientation.HORIZONTAL ? "columns" : "rows",
+ getClientId(getFacesContext()));
+ }
}
}
i++;