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 2013/02/26 11:20:16 UTC
svn commit: r1450107 - in /myfaces/tobago/branches/tobago-1.5.x:
tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/
tobago-theme/tobago-theme-scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/stand...
Author: lofwyr
Date: Tue Feb 26 10:20:15 2013
New Revision: 1450107
URL: http://svn.apache.org/r1450107
Log:
TOBAGO-1230: Using ColumnSelector causes log entries with level ERROR
- making the width of the column selector dependent from the theme
Modified:
myfaces/tobago/branches/tobago-1.5.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISheetLayout.java
myfaces/tobago/branches/tobago-1.5.x/tobago-theme/tobago-theme-scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/property/tobago-theme-config.properties
myfaces/tobago/branches/tobago-1.5.x/tobago-theme/tobago-theme-speyside/src/main/resources/org/apache/myfaces/tobago/renderkit/html/speyside/standard/property/tobago-theme-config.properties
Modified: myfaces/tobago/branches/tobago-1.5.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISheetLayout.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.5.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISheetLayout.java?rev=1450107&r1=1450106&r2=1450107&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.5.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISheetLayout.java (original)
+++ myfaces/tobago/branches/tobago-1.5.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISheetLayout.java Tue Feb 26 10:20:15 2013
@@ -50,7 +50,7 @@ import java.util.Map;
*/
public abstract class AbstractUISheetLayout extends AbstractUILayoutBase implements LayoutManager {
- private static final Logger LOG = LoggerFactory.getLogger(AbstractUIGridLayout.class);
+ private static final Logger LOG = LoggerFactory.getLogger(AbstractUISheetLayout.class);
private boolean horizontalAuto;
private boolean verticalAuto;
@@ -128,7 +128,9 @@ public abstract class AbstractUISheetLay
int index = 0;
for (LayoutComponent component : sheet.getComponents()) {
if (component == null) {
- LOG.error("fixme: UIColumnSelector must be a LayoutComponent!"); // fixme
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("fixme: UIColumnSelector must be a LayoutComponent!"); // fixme
+ }
index++;
continue;
}
@@ -251,7 +253,9 @@ public abstract class AbstractUISheetLay
*/
LayoutInfo layoutInfo =
new LayoutInfo(newTokens.getSize(), space.getPixel(), newTokens, data.getClientId(facesContext), false);
- parseFixedWidth(layoutInfo, renderedColumns);
+ final Measure columnSelectorWidth
+ = data.getLayoutComponentRenderer(facesContext).getCustomMeasure(facesContext, data, "columnSelectorWidth");
+ parseFixedWidth(layoutInfo, renderedColumns, columnSelectorWidth);
layoutInfo.parseColumnLayout(space.getPixel());
currentWidthList = layoutInfo.getSpaceList();
}
@@ -314,23 +318,20 @@ public abstract class AbstractUISheetLay
return result;
}
- private void parseFixedWidth(LayoutInfo layoutInfo, List<UIColumn> rendereredColumns) {
+ private void parseFixedWidth(LayoutInfo layoutInfo, List<UIColumn> renderedColumns, Measure columnSelectorWidth) {
LayoutTokens tokens = layoutInfo.getLayoutTokens();
for (int i = 0; i < tokens.getSize(); i++) {
LayoutToken token = tokens.get(i);
if (token instanceof AutoLayoutToken) {
int width = 0;
- if (!rendereredColumns.isEmpty()) {
- if (i < rendereredColumns.size()) {
- UIColumn column = rendereredColumns.get(i);
+ if (!renderedColumns.isEmpty()) {
+ if (i < renderedColumns.size()) {
+ UIColumn column = renderedColumns.get(i);
if (column instanceof AbstractUIColumnSelector) {
- width = 20; // FIXME: make dynamic (was removed by changing the layout
- LOG.error("20; // FIXME: make dynamic (was removed by changing the layout");
-
+ width = columnSelectorWidth.getPixel();
} else {
for (UIComponent component : (List<UIComponent>) column.getChildren()) {
width += 100; // FIXME: make dynamic (was removed by changing the layout
- LOG.error("100; // FIXME: make dynamic (was removed by changing the layout");
}
}
layoutInfo.update(width, i);
Modified: myfaces/tobago/branches/tobago-1.5.x/tobago-theme/tobago-theme-scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/property/tobago-theme-config.properties
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.5.x/tobago-theme/tobago-theme-scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/property/tobago-theme-config.properties?rev=1450107&r1=1450106&r2=1450107&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.5.x/tobago-theme/tobago-theme-scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/property/tobago-theme-config.properties (original)
+++ myfaces/tobago/branches/tobago-1.5.x/tobago-theme/tobago-theme-scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/property/tobago-theme-config.properties Tue Feb 26 10:20:15 2013
@@ -181,7 +181,7 @@ Sheet.headerHeight=20
Sheet.footerHeight=20
Sheet.rowHeight=20
Sheet.rowPadding=5
-Sheet.selectorMenuWidth=20
+Sheet.columnSelectorWidth=20
Sheet.cellPaddingWidth=4
Sheet.borderLeft=0
Sheet.borderTop=0
Modified: myfaces/tobago/branches/tobago-1.5.x/tobago-theme/tobago-theme-speyside/src/main/resources/org/apache/myfaces/tobago/renderkit/html/speyside/standard/property/tobago-theme-config.properties
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.5.x/tobago-theme/tobago-theme-speyside/src/main/resources/org/apache/myfaces/tobago/renderkit/html/speyside/standard/property/tobago-theme-config.properties?rev=1450107&r1=1450106&r2=1450107&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.5.x/tobago-theme/tobago-theme-speyside/src/main/resources/org/apache/myfaces/tobago/renderkit/html/speyside/standard/property/tobago-theme-config.properties (original)
+++ myfaces/tobago/branches/tobago-1.5.x/tobago-theme/tobago-theme-speyside/src/main/resources/org/apache/myfaces/tobago/renderkit/html/speyside/standard/property/tobago-theme-config.properties Tue Feb 26 10:20:15 2013
@@ -101,7 +101,6 @@ Sheet.headerHeight=21
Sheet.footerHeight=16
Sheet.rowHeight=21
Sheet.rowPadding=1
-Sheet.selectorMenuWidth=16
Sheet.cellPaddingWidth=4
Sheet.borderLeft=1
Sheet.borderRight=1