You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by we...@apache.org on 2020/07/09 08:56:31 UTC
[myfaces-tobago] branch tobago-2.x updated: TOBAGO-2049 - Tobago2:
Sheet Layout Problem
This is an automated email from the ASF dual-hosted git repository.
weber pushed a commit to branch tobago-2.x
in repository https://gitbox.apache.org/repos/asf/myfaces-tobago.git
The following commit(s) were added to refs/heads/tobago-2.x by this push:
new 8059060 TOBAGO-2049 - Tobago2: Sheet Layout Problem
8059060 is described below
commit 80590607883d60a3b3dfee0aee5785f964cd9911
Author: Volker Weber <v....@inexso.de>
AuthorDate: Thu Jul 9 10:56:24 2020 +0200
TOBAGO-2049 - Tobago2: Sheet Layout Problem
---
.../tobago/internal/component/AbstractUISheetLayout.java | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISheetLayout.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISheetLayout.java
index e0e8750..9153f1f 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISheetLayout.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISheetLayout.java
@@ -20,6 +20,7 @@
package org.apache.myfaces.tobago.internal.component;
import org.apache.myfaces.tobago.component.Attributes;
+import org.apache.myfaces.tobago.component.UIColumnSelector;
import org.apache.myfaces.tobago.internal.layout.Grid;
import org.apache.myfaces.tobago.internal.layout.IntervalList;
import org.apache.myfaces.tobago.internal.layout.LayoutUtils;
@@ -131,12 +132,19 @@ public abstract class AbstractUISheetLayout extends AbstractUILayoutBase impleme
final List<Integer> widthList = sheet.getWidthList();
int index = 0;
- for (final LayoutComponent component : sheet.getComponents()) {
+ List<LayoutComponent> components = sheet.getComponents();
+ for (int i = 0; i < components.size(); i++) {
+ LayoutComponent component = components.get(i);
if (component == null) {
if (LOG.isDebugEnabled()) {
LOG.debug("todo: UIColumnSelector must be a LayoutComponent!"); // fixme
}
- index++;
+ AbstractUIColumn column = sheet.getAllColumns().get(index);
+ if (column instanceof UIColumnSelector && column.isRendered()) {
+ // XXX here only index++ if columnSelector is rendered,
+ // because the widthList has only the rendered=true, todo: change it.
+ index++;
+ }
continue;
}
final UIColumn column = component instanceof AbstractUIColumnNode