myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lof...@apache.org
Subject [myfaces-tobago] 01/02: Unittesting for lableLayout rendering.
Date Thu, 15 Oct 2020 13:14:07 GMT
This is an automated email from the ASF dual-hosted git repository.

lofwyr pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/myfaces-tobago.git

commit 3657bff8e511b37902d89b11a87c183af52a0b51
Author: Udo Schnurpfeil <udo.schnurpfeil@irian.eu>
AuthorDate: Thu Oct 15 15:13:00 2020 +0200

    Unittesting for lableLayout rendering.
---
 .../myfaces/tobago/component/LabelLayout.java      |  21 +-
 .../tobago/component/SupportsLabelLayout.java      |   4 +
 .../tobago/internal/component/AbstractUIFile.java  |  12 ++
 .../tobago/internal/component/AbstractUIInput.java |  12 ++
 .../tobago/internal/component/AbstractUIOut.java   |  12 ++
 .../component/AbstractUISelectBoolean.java         |  12 ++
 .../component/AbstractUISelectManyBase.java        |  12 ++
 .../component/AbstractUISelectOneBase.java         |  12 ++
 .../tobago/internal/component/AbstractUIStars.java |  13 ++
 .../renderer/LabelLayoutRendererBase.java          | 122 ++++++-----
 .../renderer/MessageLayoutRendererBase.java        |  20 --
 .../renderkit/renderer/SegmentLayoutRenderer.java  |   6 +-
 .../internal/config/AbstractTobagoTestBase.java    |  24 +++
 .../renderkit/renderer/InRendererUnitTest.java     | 238 +++++++++++++++++++++
 .../test/resources/renderer/in/label-flexLeft.html |  23 +-
 .../resources/renderer/in/label-flexRight.html     |  23 +-
 .../test/resources/renderer/in/label-flowLeft.html |  23 +-
 .../resources/renderer/in/label-flowRight.html     |  23 +-
 .../resources/renderer/in/label-gridBottom.html    |  23 +-
 .../test/resources/renderer/in/label-gridLeft.html |  23 +-
 .../resources/renderer/in/label-gridRight.html     |  23 +-
 .../test/resources/renderer/in/label-gridTop.html  |  23 +-
 .../src/test/resources/renderer/in/label-none.html |  22 +-
 .../resources/renderer/in/label-segmentLeft.html   |  27 +++
 .../resources/renderer/in/label-segmentRight.html  |  27 +++
 .../src/test/resources/renderer/in/label-skip.html |  23 +-
 .../src/test/resources/renderer/in/label-top.html  |  23 +-
 .../src/test/resources/renderer/in/simple.html     |  22 +-
 .../src/main/webapp/WEB-INF/faces-config.xml       |   6 +
 .../030-select/30-selectOneRadio/Radio.xhtml       |  42 ++--
 .../Label_Layout.xhtml}                            |   0
 .../Grid_Layout_Label_Vertical.xhtml               |   2 +-
 .../40-test/4800-labelLayout/LabelLayout.xhtml     |  29 +--
 .../src/main/webapp/logging-info.xhtml             |  14 +-
 34 files changed, 571 insertions(+), 370 deletions(-)

diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/component/LabelLayout.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/component/LabelLayout.java
index b6cfc22..e8a3699 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/component/LabelLayout.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/component/LabelLayout.java
@@ -19,6 +19,8 @@
 
 package org.apache.myfaces.tobago.component;
 
+import org.apache.myfaces.tobago.internal.util.Deprecation;
+
 import javax.faces.component.UIComponent;
 import javax.faces.context.FacesContext;
 
@@ -66,7 +68,10 @@ public enum LabelLayout {
 
   /**
    * skip rendering the surrounding container.
+   *
+   * @deprecated since 5.0.0, not needed, because there is no surrounding container.
    */
+  @Deprecated
   skip,
 
   /**
@@ -95,15 +100,21 @@ public enum LabelLayout {
     return labelLayout == segmentLeft || labelLayout == segmentRight;
   }
 
+  /**
+   * @deprecated since 5.0.0. Please use {@link SupportsLabelLayout#setNextToRenderIsLabel(boolean)}.
+   */
+  @Deprecated
   public static void setSegment(final FacesContext facesContext, final LabelLayout labelLayout) {
-    if (labelLayout != segmentLeft && labelLayout != segmentRight) {
-      throw new IllegalArgumentException("not supported: " + labelLayout);
-    }
-    facesContext.getAttributes().put(SEGMENT_TO_RENDER_KEY, labelLayout);
+    Deprecation.LOG.error("not longer supported - see javadoc");
   }
 
+  /**
+   * @deprecated since 5.0.0. Please use {@link SupportsLabelLayout#isNextToRenderIsLabel()}.
+   */
+  @Deprecated
   public static LabelLayout getSegment(final FacesContext facesContext) {
-    return (LabelLayout) facesContext.getAttributes().get(SEGMENT_TO_RENDER_KEY);
+    Deprecation.LOG.error("not longer supported - see javadoc");
+    return null;
   }
 
   public static void removeSegment(final FacesContext facesContext) {
diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/component/SupportsLabelLayout.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/component/SupportsLabelLayout.java
index 1f316a5..c547748 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/component/SupportsLabelLayout.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/component/SupportsLabelLayout.java
@@ -24,4 +24,8 @@ public interface SupportsLabelLayout {
   LabelLayout getLabelLayout();
 
   void setLabelLayout(LabelLayout labelLayout);
+
+  boolean isNextToRenderIsLabel();
+
+  void setNextToRenderIsLabel(boolean nextToRenderIsLabel);
 }
diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIFile.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIFile.java
index c616298..a5f08d0 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIFile.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIFile.java
@@ -38,6 +38,8 @@ import javax.servlet.http.Part;
 public abstract class AbstractUIFile extends UIInput implements SupportsLabelLayout, Visual, ClientBehaviorHolder,
     SupportFieldId, SupportsHelp {
 
+  private transient boolean nextToRenderIsLabel;
+
   @Override
   public void validate(final FacesContext facesContext) {
     if (isRequired()) {
@@ -74,4 +76,14 @@ public abstract class AbstractUIFile extends UIInput implements SupportsLabelLay
   public String getFieldId(final FacesContext facesContext) {
     return getClientId(facesContext) + ComponentUtils.SUB_SEPARATOR + "field";
   }
+
+  @Override
+  public boolean isNextToRenderIsLabel() {
+    return nextToRenderIsLabel;
+  }
+
+  @Override
+  public void setNextToRenderIsLabel(final boolean nextToRenderIsLabel) {
+    this.nextToRenderIsLabel = nextToRenderIsLabel;
+  }
 }
diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIInput.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIInput.java
index a029ea8..1381aa5 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIInput.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIInput.java
@@ -35,6 +35,8 @@ import javax.faces.context.FacesContext;
 public abstract class AbstractUIInput extends javax.faces.component.UIInput
     implements SupportsAccessKey, SupportsLabelLayout, Visual, ClientBehaviorHolder, SupportFieldId, SupportsHelp {
 
+  private transient boolean nextToRenderIsLabel;
+
   public abstract Integer getTabIndex();
 
   public abstract boolean isFocus();
@@ -47,4 +49,14 @@ public abstract class AbstractUIInput extends javax.faces.component.UIInput
   public String getFieldId(final FacesContext facesContext) {
     return getClientId(facesContext) + ComponentUtils.SUB_SEPARATOR + "field";
   }
+
+  @Override
+  public boolean isNextToRenderIsLabel() {
+    return nextToRenderIsLabel;
+  }
+
+  @Override
+  public void setNextToRenderIsLabel(final boolean nextToRenderIsLabel) {
+    this.nextToRenderIsLabel = nextToRenderIsLabel;
+  }
 }
diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIOut.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIOut.java
index e2b83c8..0322812 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIOut.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIOut.java
@@ -30,6 +30,8 @@ import javax.faces.component.UIOutput;
  */
 public abstract class AbstractUIOut extends UIOutput implements SupportsLabelLayout, Visual {
 
+  private transient boolean nextToRenderIsLabel;
+
   public abstract boolean isEscape();
 
   public abstract boolean isKeepLineBreaks();
@@ -47,4 +49,14 @@ public abstract class AbstractUIOut extends UIOutput implements SupportsLabelLay
   public abstract boolean isCompact();
 
   public abstract SanitizeMode getSanitize();
+
+  @Override
+  public boolean isNextToRenderIsLabel() {
+    return nextToRenderIsLabel;
+  }
+
+  @Override
+  public void setNextToRenderIsLabel(final boolean nextToRenderIsLabel) {
+    this.nextToRenderIsLabel = nextToRenderIsLabel;
+  }
 }
diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISelectBoolean.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISelectBoolean.java
index a9a708f..9fa149e 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISelectBoolean.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISelectBoolean.java
@@ -36,6 +36,8 @@ import javax.faces.context.FacesContext;
 public abstract class AbstractUISelectBoolean extends UISelectBoolean
     implements Visual, ClientBehaviorHolder, SupportFieldId, SupportsAccessKey, SupportsLabelLayout, SupportsHelp {
 
+  private transient boolean nextToRenderIsLabel;
+
   @Override
   public boolean isSelected() {
     Object value = getSubmittedValue();
@@ -89,4 +91,14 @@ public abstract class AbstractUISelectBoolean extends UISelectBoolean
   public boolean isLabelLayoutSkip() {
     return getLabelLayout() == LabelLayout.skip;
   }
+
+  @Override
+  public boolean isNextToRenderIsLabel() {
+    return nextToRenderIsLabel;
+  }
+
+  @Override
+  public void setNextToRenderIsLabel(final boolean nextToRenderIsLabel) {
+    this.nextToRenderIsLabel = nextToRenderIsLabel;
+  }
 }
diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISelectManyBase.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISelectManyBase.java
index c0e9211..fe2a46e 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISelectManyBase.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISelectManyBase.java
@@ -33,6 +33,8 @@ import java.util.Collection;
 public abstract class AbstractUISelectManyBase extends UISelectMany
     implements Visual, SupportsLabelLayout, ClientBehaviorHolder, SupportsHelp {
 
+  private transient boolean nextToRenderIsLabel;
+
   @Override
   public Object[] getSelectedValues() {
     final Object value = getValue();
@@ -50,4 +52,14 @@ public abstract class AbstractUISelectManyBase extends UISelectMany
   public abstract boolean isReadonly();
 
   public abstract boolean isFocus();
+
+  @Override
+  public boolean isNextToRenderIsLabel() {
+    return nextToRenderIsLabel;
+  }
+
+  @Override
+  public void setNextToRenderIsLabel(final boolean nextToRenderIsLabel) {
+    this.nextToRenderIsLabel = nextToRenderIsLabel;
+  }
 }
diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISelectOneBase.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISelectOneBase.java
index 3b3e8ba..069350a 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISelectOneBase.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISelectOneBase.java
@@ -36,6 +36,8 @@ public abstract class AbstractUISelectOneBase extends javax.faces.component.UISe
 
   public static final String MESSAGE_VALUE_REQUIRED = "org.apache.myfaces.tobago.UISelectOne.REQUIRED";
 
+  private transient boolean nextToRenderIsLabel;
+
   @Override
   public void validate(final FacesContext facesContext) {
     if (isRequired() && !isReadonly()) {
@@ -63,4 +65,14 @@ public abstract class AbstractUISelectOneBase extends javax.faces.component.UISe
   public abstract boolean isFocus();
 
   public abstract Integer getTabIndex();
+
+  @Override
+  public boolean isNextToRenderIsLabel() {
+    return nextToRenderIsLabel;
+  }
+
+  @Override
+  public void setNextToRenderIsLabel(final boolean nextToRenderIsLabel) {
+    this.nextToRenderIsLabel = nextToRenderIsLabel;
+  }
 }
diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIStars.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIStars.java
index 6d931ec..67ddc8c 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIStars.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIStars.java
@@ -40,6 +40,8 @@ public abstract class AbstractUIStars extends UIInput
   private int rangeValue;
   private int rangeMax;
 
+  private transient boolean nextToRenderIsLabel;
+
   @Override
   public void processEvent(ComponentSystemEvent event) throws AbortProcessingException {
 
@@ -95,4 +97,15 @@ public abstract class AbstractUIStars extends UIInput
   public String getFieldId(final FacesContext facesContext) {
     return getClientId(facesContext) + ComponentUtils.SUB_SEPARATOR + "field";
   }
+
+  @Override
+  public boolean isNextToRenderIsLabel() {
+    return nextToRenderIsLabel;
+  }
+
+  @Override
+  public void setNextToRenderIsLabel(final boolean nextToRenderIsLabel) {
+    this.nextToRenderIsLabel = nextToRenderIsLabel;
+  }
+
 }
diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/LabelLayoutRendererBase.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/LabelLayoutRendererBase.java
index 9f12d0e..2f39e77 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/LabelLayoutRendererBase.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/LabelLayoutRendererBase.java
@@ -41,8 +41,8 @@ import java.io.IOException;
 import java.util.List;
 
 /**
- * Manages the rendering of the <b>label</b> and the <b>field</b> together with different possibilities for
- * the position of the label (defined by {@link org.apache.myfaces.tobago.component.Attributes#labelLayout}
+ * Manages the rendering of the <b>label</b> and the <b>field</b> together with different possibilities for the position
+ * of the label (defined by {@link org.apache.myfaces.tobago.component.Attributes#labelLayout}
  */
 public abstract class LabelLayoutRendererBase extends DecodingInputRendererBase {
 
@@ -53,13 +53,21 @@ public abstract class LabelLayoutRendererBase extends DecodingInputRendererBase
 
     encodeBeginSurroundingLabel(facesContext, component);
 
-    encodeBeginMessageField(facesContext, component);
+    if (((SupportsLabelLayout) component).isNextToRenderIsLabel()) {
+      // skip, because its only the lable to render
+    } else {
+      encodeBeginMessageField(facesContext, component);
+    }
   }
 
   @Override
   public void encodeEnd(final FacesContext facesContext, final UIComponent component) throws IOException {
 
-    encodeEndMessageField(facesContext, component);
+    if (((SupportsLabelLayout) component).isNextToRenderIsLabel()) {
+      // skip, because its only the lable to render
+    } else {
+      encodeEndMessageField(facesContext, component);
+    }
 
     // render the styles here, because inside of <select> its not possible.
     if (component.getRendersChildren()) {
@@ -105,57 +113,68 @@ public abstract class LabelLayoutRendererBase extends DecodingInputRendererBase
     final Markup markup = (Markup) ComponentUtils.getAttribute(component, Attributes.markup);
 
     final LabelLayout labelLayout = ((SupportsLabelLayout) component).getLabelLayout();
+    final boolean nextToRenderIsLabel = ((SupportsLabelLayout) component).isNextToRenderIsLabel();
     final boolean flex;
+
     switch (labelLayout) {
-      case skip:
-        writer.startElement(getComponentTag());
-        writer.writeIdAttribute(clientId);
-        encodeAttributes(facesContext, component);
-        return;
       case flexLeft:
       case flexRight:
         flex = true;
         break;
       case segmentLeft:
       case segmentRight:
-        if (LabelLayout.getSegment(facesContext) == labelLayout) {
+        if (nextToRenderIsLabel) {
           clientId += ComponentUtils.SUB_SEPARATOR + "label";
         }
         flex = false;
         break;
+      case flowLeft:
+      case gridLeft:
+      case gridRight:
+      case gridTop:
+      case gridBottom:
+        encodeLabel(facesContext, component, writer, labelLayout);
+        flex = false;
+        break;
       case none:
       case top:
-      case flowLeft:
       case flowRight:
       default:
         flex = false;
     }
 
-    if (labelLayout == LabelLayout.gridLeft || labelLayout == LabelLayout.gridRight
-        || labelLayout == LabelLayout.gridTop || labelLayout == LabelLayout.gridBottom) {
-      writer.startElement(HtmlElements.LABEL);
-      writer.writeIdAttribute(clientId + ComponentUtils.SUB_SEPARATOR + "label");
+//    if (labelLayout == LabelLayout.gridLeft || labelLayout == LabelLayout.gridRight
+//        || labelLayout == LabelLayout.gridTop || labelLayout == LabelLayout.gridBottom) {
+//      writer.startElement(HtmlElements.LABEL);
+//      writer.writeIdAttribute(clientId + ComponentUtils.SUB_SEPARATOR + "label");
+//    } else {
+    if (nextToRenderIsLabel) {
+      // skip, because its only the lable to render
     } else {
       writer.startElement(getComponentTag());
       writer.writeIdAttribute(clientId);
       encodeAttributes(facesContext, component);
+      writer.writeClassAttribute(
+          flex ? TobagoClass.FLEX_LAYOUT : null,
+          flex ? TobagoClass.LABEL__CONTAINER :  null,
+          BootstrapClass.MB_3,
+          ComponentUtils.getBooleanAttribute(component, Attributes.required) ? TobagoClass.REQUIRED : null,
+          markup != null && markup.contains(Markup.SPREAD) ? TobagoClass.SPREAD : null);
     }
-    writer.writeClassAttribute(
-        flex ? TobagoClass.FLEX_LAYOUT : null,
-        BootstrapClass.MB_3,
-        TobagoClass.LABEL__CONTAINER,
-        ComponentUtils.getBooleanAttribute(component, Attributes.required) ? TobagoClass.REQUIRED : null,
-        markup != null && markup.contains(Markup.SPREAD) ? TobagoClass.SPREAD : null);
 
     switch (labelLayout) {
       case none:
-        break;
       case flexRight:
       case flowRight:
+      case flowLeft:
+      case gridLeft:
+      case gridRight:
+      case gridTop:
+      case gridBottom:
         break;
       case segmentLeft:
       case segmentRight:
-        if (LabelLayout.getSegment(facesContext) == labelLayout) {
+        if (nextToRenderIsLabel) {
           encodeLabel(facesContext, component, writer, labelLayout);
         }
         break;
@@ -163,23 +182,23 @@ public abstract class LabelLayoutRendererBase extends DecodingInputRendererBase
         encodeLabel(facesContext, component, writer, labelLayout);
     }
 
-    switch (labelLayout) {
-      case gridLeft:
-      case gridRight:
-      case gridTop:
-      case gridBottom:
-        writer.endElement(HtmlElements.LABEL);
-
-        writer.startElement(getComponentTag());
-        writer.writeIdAttribute(clientId);
-        encodeAttributes(facesContext, component);
-        writer.writeClassAttribute(
-            BootstrapClass.MB_3,
-            ComponentUtils.getBooleanAttribute(component, Attributes.required) ? TobagoClass.REQUIRED : null,
-            markup != null && markup.contains(Markup.SPREAD) ? TobagoClass.SPREAD : null);
-        break;
-      default:
-    }
+//    switch (labelLayout) {
+//      case gridLeft:
+//      case gridRight:
+//      case gridTop:
+//      case gridBottom:
+//        writer.endElement(HtmlElements.LABEL);
+
+//        writer.startElement(getComponentTag());
+//        writer.writeIdAttribute(clientId);
+//        encodeAttributes(facesContext, component);
+//        writer.writeClassAttribute(
+//            BootstrapClass.MB_3,
+//            ComponentUtils.getBooleanAttribute(component, Attributes.required) ? TobagoClass.REQUIRED : null,
+//            markup != null && markup.contains(Markup.SPREAD) ? TobagoClass.SPREAD : null);
+//        break;
+//      default:
+//    }
   }
 
   protected void encodeEndSurroundingLabel(final FacesContext facesContext, final UIComponent component)
@@ -188,23 +207,22 @@ public abstract class LabelLayoutRendererBase extends DecodingInputRendererBase
     final TobagoResponseWriter writer = getResponseWriter(facesContext);
     final LabelLayout labelLayout = ((SupportsLabelLayout) component).getLabelLayout();
 
-    switch (labelLayout) {
-      case skip:
-      case none:
-        break;
-      case flexRight:
-      case flowRight:
-        encodeLabel(facesContext, component, writer, labelLayout);
-        break;
-      default:
-        // nothing to do
+    if (labelLayout == LabelLayout.flexRight) {
+      encodeLabel(facesContext, component, writer, labelLayout);
     }
 
-    writer.endElement(getComponentTag());
+    final boolean nextToRenderIsLabel = ((SupportsLabelLayout) component).isNextToRenderIsLabel();
+    if (!nextToRenderIsLabel) {
+      writer.endElement(getComponentTag());
+    }
+
+    if (labelLayout == LabelLayout.flowRight) {
+      encodeLabel(facesContext, component, writer, labelLayout);
+    }
   }
 
   protected void encodeLabel(final FacesContext facesContext, final UIComponent component,
-      final TobagoResponseWriter writer, final LabelLayout labelLayout)
+                             final TobagoResponseWriter writer, final LabelLayout labelLayout)
       throws IOException {
     // TBD: maybe use an interface for getLabel()
     final String label = ComponentUtils.getStringAttribute(component, Attributes.label);
diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/MessageLayoutRendererBase.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/MessageLayoutRendererBase.java
index 140957e..091ec26 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/MessageLayoutRendererBase.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/MessageLayoutRendererBase.java
@@ -19,9 +19,7 @@
 
 package org.apache.myfaces.tobago.internal.renderkit.renderer;
 
-import org.apache.myfaces.tobago.component.LabelLayout;
 import org.apache.myfaces.tobago.component.SupportsHelp;
-import org.apache.myfaces.tobago.component.SupportsLabelLayout;
 import org.apache.myfaces.tobago.internal.util.StringUtils;
 import org.apache.myfaces.tobago.renderkit.css.BootstrapClass;
 import org.apache.myfaces.tobago.renderkit.css.CssItem;
@@ -44,30 +42,12 @@ public abstract class MessageLayoutRendererBase extends LabelLayoutRendererBase
 
   @Override
   public void encodeBeginMessageField(final FacesContext facesContext, final UIComponent component) throws IOException {
-
-    final LabelLayout labelLayout = ((SupportsLabelLayout) component).getLabelLayout();
-    final LabelLayout segment = LabelLayout.getSegment(facesContext);
-
-    if (labelLayout == LabelLayout.segmentLeft && segment != LabelLayout.segmentRight
-        || labelLayout == LabelLayout.segmentRight && segment != LabelLayout.segmentLeft) {
-      return; // skip, because this component is the label
-    }
-
     encodeBeginMessagesContainer(facesContext, component);
     encodeBeginField(facesContext, component);
   }
 
   @Override
   public void encodeEndMessageField(final FacesContext facesContext, final UIComponent component) throws IOException {
-
-    final LabelLayout labelLayout = ((SupportsLabelLayout) component).getLabelLayout();
-    final LabelLayout segment = LabelLayout.getSegment(facesContext);
-
-    if (labelLayout == LabelLayout.segmentLeft && segment != LabelLayout.segmentRight
-        || labelLayout == LabelLayout.segmentRight && segment != LabelLayout.segmentLeft) {
-      return; // skip, because this component is the label
-    }
-
     encodeEndField(facesContext, component);
     encodeEndMessagesContainer(facesContext, component);
   }
diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/SegmentLayoutRenderer.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/SegmentLayoutRenderer.java
index a446b8f..ad6a361 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/SegmentLayoutRenderer.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/SegmentLayoutRenderer.java
@@ -103,13 +103,15 @@ public class SegmentLayoutRenderer extends RendererBase {
     if (child instanceof SupportsLabelLayout
         && LabelLayout.isSegment(((SupportsLabelLayout) child).getLabelLayout())) {
 
+      final SupportsLabelLayout labeledChild = (SupportsLabelLayout) child;
+
       // left part
-      LabelLayout.setSegment(facesContext, LabelLayout.segmentLeft);
+      labeledChild.setNextToRenderIsLabel(labeledChild.getLabelLayout() == LabelLayout.segmentLeft);
       encodeDiv(facesContext, writer, generator, child);
       generator.next();
 
       // right part
-      LabelLayout.setSegment(facesContext, LabelLayout.segmentRight);
+      labeledChild.setNextToRenderIsLabel(labeledChild.getLabelLayout() == LabelLayout.segmentRight);
       encodeDiv(facesContext, writer, generator, child);
       generator.next();
 
diff --git a/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/config/AbstractTobagoTestBase.java b/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/config/AbstractTobagoTestBase.java
index ff5e123..ea63aa2 100644
--- a/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/config/AbstractTobagoTestBase.java
+++ b/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/config/AbstractTobagoTestBase.java
@@ -23,6 +23,7 @@ import org.apache.myfaces.test.base.junit4.AbstractJsfTestCase;
 import org.apache.myfaces.test.config.ResourceBundleVarNames;
 import org.apache.myfaces.test.mock.MockFacesContext;
 import org.apache.myfaces.test.mock.MockHttpServletRequest;
+import org.apache.myfaces.tobago.component.RendererTypes;
 import org.apache.myfaces.tobago.component.Tags;
 import org.apache.myfaces.tobago.component.UIButton;
 import org.apache.myfaces.tobago.component.UIGridLayout;
@@ -31,13 +32,24 @@ import org.apache.myfaces.tobago.component.UILink;
 import org.apache.myfaces.tobago.component.UIOut;
 import org.apache.myfaces.tobago.component.UIPanel;
 import org.apache.myfaces.tobago.component.UIPopup;
+import org.apache.myfaces.tobago.component.UISegmentLayout;
 import org.apache.myfaces.tobago.component.UIStyle;
 import org.apache.myfaces.tobago.config.TobagoConfig;
 import org.apache.myfaces.tobago.context.TobagoContext;
+import org.apache.myfaces.tobago.internal.renderkit.renderer.ButtonRenderer;
+import org.apache.myfaces.tobago.internal.renderkit.renderer.GridLayoutRenderer;
+import org.apache.myfaces.tobago.internal.renderkit.renderer.InRenderer;
+import org.apache.myfaces.tobago.internal.renderkit.renderer.LinkRenderer;
+import org.apache.myfaces.tobago.internal.renderkit.renderer.OutRenderer;
+import org.apache.myfaces.tobago.internal.renderkit.renderer.PanelRenderer;
+import org.apache.myfaces.tobago.internal.renderkit.renderer.PopupRenderer;
+import org.apache.myfaces.tobago.internal.renderkit.renderer.SegmentLayoutRenderer;
+import org.apache.myfaces.tobago.internal.renderkit.renderer.StyleRenderer;
 import org.apache.myfaces.tobago.internal.webapp.HtmlResponseWriter;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
 
+import javax.faces.render.RenderKit;
 import java.io.IOException;
 import java.io.StringWriter;
 import java.nio.charset.StandardCharsets;
@@ -91,6 +103,18 @@ public abstract class AbstractTobagoTestBase extends AbstractJsfTestCase {
     application.addComponent(Tags.popup.componentType(), UIPopup.class.getName());
     application.addComponent(Tags.style.componentType(), UIStyle.class.getName());
     application.addComponent(Tags.gridLayout.componentType(), UIGridLayout.class.getName());
+    application.addComponent(Tags.segmentLayout.componentType(), UISegmentLayout.class.getName());
+
+    final RenderKit renderKit = facesContext.getRenderKit();
+    renderKit.addRenderer(UIIn.COMPONENT_FAMILY, RendererTypes.IN, new InRenderer());
+    renderKit.addRenderer(UIOut.COMPONENT_FAMILY, RendererTypes.OUT, new OutRenderer());
+    renderKit.addRenderer(UIPanel.COMPONENT_FAMILY, RendererTypes.PANEL, new PanelRenderer());
+    renderKit.addRenderer(UILink.COMPONENT_FAMILY, RendererTypes.LINK, new LinkRenderer());
+    renderKit.addRenderer(UIButton.COMPONENT_FAMILY, RendererTypes.BUTTON, new ButtonRenderer());
+    renderKit.addRenderer(UIPopup.COMPONENT_FAMILY, RendererTypes.POPUP, new PopupRenderer());
+    renderKit.addRenderer(UIStyle.COMPONENT_FAMILY, RendererTypes.STYLE, new StyleRenderer());
+    renderKit.addRenderer(UIGridLayout.COMPONENT_FAMILY, RendererTypes.GRID_LAYOUT, new GridLayoutRenderer());
+    renderKit.addRenderer(UISegmentLayout.COMPONENT_FAMILY, RendererTypes.SEGMENT_LAYOUT, new SegmentLayoutRenderer());
 
     application.setMessageBundle("org.apache.myfaces.tobago.context.TobagoMessageBundle");
 
diff --git a/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/renderkit/renderer/InRendererUnitTest.java b/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/renderkit/renderer/InRendererUnitTest.java
new file mode 100644
index 0000000..5b999b6
--- /dev/null
+++ b/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/renderkit/renderer/InRendererUnitTest.java
@@ -0,0 +1,238 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.myfaces.tobago.internal.renderkit.renderer;
+
+import org.apache.myfaces.tobago.component.LabelLayout;
+import org.apache.myfaces.tobago.component.RendererTypes;
+import org.apache.myfaces.tobago.component.Tags;
+import org.apache.myfaces.tobago.component.UIIn;
+import org.apache.myfaces.tobago.component.UISegmentLayout;
+import org.apache.myfaces.tobago.internal.config.AbstractTobagoTestBase;
+import org.apache.myfaces.tobago.layout.SegmentMeasureList;
+import org.apache.myfaces.tobago.util.ComponentUtils;
+import org.junit.Assert;
+import org.junit.jupiter.api.Test;
+
+import java.io.BufferedReader;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.stream.Collectors;
+
+public class InRendererUnitTest extends AbstractTobagoTestBase {
+
+  @Test
+  public void simple() throws IOException {
+    final UIIn c = (UIIn) ComponentUtils.createComponent(
+        facesContext, Tags.in.componentType(), RendererTypes.In, "id");
+    c.encodeAll(facesContext);
+
+    Assert.assertEquals(loadHtml("renderer/in/simple.html"), formattedResult());
+  }
+
+  @Test
+  public void labelLayoutFlexLeft() throws IOException {
+    final UIIn c = (UIIn) ComponentUtils.createComponent(
+        facesContext, Tags.in.componentType(), RendererTypes.In, "id");
+    c.setLabel("label");
+    c.setLabelLayout(LabelLayout.flexLeft); // same as default
+    c.encodeAll(facesContext);
+
+    Assert.assertEquals(loadHtml("renderer/in/label-flexLeft.html"), formattedResult());
+  }
+
+  @Test
+  public void labelLayoutFlexRight() throws IOException {
+    final UIIn c = (UIIn) ComponentUtils.createComponent(
+        facesContext, Tags.in.componentType(), RendererTypes.In, "id");
+    c.setLabel("label");
+    c.setLabelLayout(LabelLayout.flexRight);
+    c.encodeAll(facesContext);
+
+    Assert.assertEquals(loadHtml("renderer/in/label-flexRight.html"), formattedResult());
+  }
+
+  @Test
+  public void labelLayoutFlowLeft() throws IOException {
+    final UIIn c = (UIIn) ComponentUtils.createComponent(
+        facesContext, Tags.in.componentType(), RendererTypes.In, "id");
+    c.setLabel("label");
+    c.setLabelLayout(LabelLayout.flowLeft);
+    c.encodeAll(facesContext);
+
+    Assert.assertEquals(loadHtml("renderer/in/label-flowLeft.html"), formattedResult());
+  }
+
+  @Test
+  public void labelLayoutFlowRight() throws IOException {
+    final UIIn c = (UIIn) ComponentUtils.createComponent(
+        facesContext, Tags.in.componentType(), RendererTypes.In, "id");
+    c.setLabel("label");
+    c.setLabelLayout(LabelLayout.flowRight);
+    c.encodeAll(facesContext);
+
+    Assert.assertEquals(loadHtml("renderer/in/label-flowRight.html"), formattedResult());
+  }
+
+  @Test
+  public void labelLayoutTop() throws IOException {
+    final UIIn c = (UIIn) ComponentUtils.createComponent(
+        facesContext, Tags.in.componentType(), RendererTypes.In, "id");
+    c.setLabel("label");
+    c.setLabelLayout(LabelLayout.top);
+    c.encodeAll(facesContext);
+
+    Assert.assertEquals(loadHtml("renderer/in/label-top.html"), formattedResult());
+  }
+
+  @Test
+  public void labelLayoutGridLeft() throws IOException {
+    final UIIn c = (UIIn) ComponentUtils.createComponent(
+        facesContext, Tags.in.componentType(), RendererTypes.In, "id");
+    c.setLabel("label");
+    c.setLabelLayout(LabelLayout.gridLeft);
+    c.encodeAll(facesContext);
+
+    Assert.assertEquals(loadHtml("renderer/in/label-gridLeft.html"), formattedResult());
+  }
+
+  @Test
+  public void labelLayoutGridRight() throws IOException {
+    final UIIn c = (UIIn) ComponentUtils.createComponent(
+        facesContext, Tags.in.componentType(), RendererTypes.In, "id");
+    c.setLabel("label");
+    c.setLabelLayout(LabelLayout.gridRight);
+    c.encodeAll(facesContext);
+
+    Assert.assertEquals(loadHtml("renderer/in/label-gridRight.html"), formattedResult());
+  }
+
+  @Test
+  public void labelLayoutGridTop() throws IOException {
+    final UIIn c = (UIIn) ComponentUtils.createComponent(
+        facesContext, Tags.in.componentType(), RendererTypes.In, "id");
+    c.setLabel("label");
+    c.setLabelLayout(LabelLayout.gridTop);
+    c.encodeAll(facesContext);
+
+    Assert.assertEquals(loadHtml("renderer/in/label-gridTop.html"), formattedResult());
+  }
+
+  @Test
+  public void labelLayoutGridBottom() throws IOException {
+    final UIIn c = (UIIn) ComponentUtils.createComponent(
+        facesContext, Tags.in.componentType(), RendererTypes.In, "id");
+    c.setLabel("label");
+    c.setLabelLayout(LabelLayout.gridBottom);
+    c.encodeAll(facesContext);
+
+    Assert.assertEquals(loadHtml("renderer/in/label-gridBottom.html"), formattedResult());
+  }
+
+  @Test
+  public void labelLayoutSegmentLeft() throws IOException {
+
+    final UISegmentLayout l = (UISegmentLayout) ComponentUtils.createComponent(
+        facesContext, Tags.segmentLayout.componentType(), RendererTypes.SegmentLayout, "segid");
+    l.setMedium(SegmentMeasureList.parse("3seg 9seg"));
+
+    final UIIn c = (UIIn) ComponentUtils.createComponent(
+        facesContext, Tags.in.componentType(), RendererTypes.In, "id");
+    c.setLabel("label");
+    c.setLabelLayout(LabelLayout.segmentLeft);
+
+    l.getChildren().add(c);
+    l.encodeAll(facesContext);
+
+    Assert.assertEquals(loadHtml("renderer/in/label-segmentLeft.html"), formattedResult());
+  }
+
+  @Test
+  public void labelLayoutSegmentRight() throws IOException {
+
+    final UISegmentLayout l = (UISegmentLayout) ComponentUtils.createComponent(
+        facesContext, Tags.segmentLayout.componentType(), RendererTypes.SegmentLayout, "segid");
+    l.setMedium(SegmentMeasureList.parse("9seg 3seg"));
+
+    final UIIn c = (UIIn) ComponentUtils.createComponent(
+        facesContext, Tags.in.componentType(), RendererTypes.In, "id");
+    c.setLabel("label");
+    c.setLabelLayout(LabelLayout.segmentRight);
+
+    l.getChildren().add(c);
+    l.encodeAll(facesContext);
+
+    Assert.assertEquals(loadHtml("renderer/in/label-segmentRight.html"), formattedResult());
+  }
+
+  @Test
+  public void labelSkip() throws IOException {
+    final UIIn c = (UIIn) ComponentUtils.createComponent(
+        facesContext, Tags.in.componentType(), RendererTypes.In, "id");
+    c.setLabel("label");
+    c.setLabelLayout(LabelLayout.skip);
+    c.encodeAll(facesContext);
+
+    Assert.assertEquals(loadHtml("renderer/in/label-skip.html"), formattedResult());
+  }
+
+  @Test
+  public void labelNone() throws IOException {
+    final UIIn c = (UIIn) ComponentUtils.createComponent(
+        facesContext, Tags.in.componentType(), RendererTypes.In, "id");
+    c.setLabel("label");
+    c.setLabelLayout(LabelLayout.none);
+    c.encodeAll(facesContext);
+
+    Assert.assertEquals(loadHtml("renderer/in/label-none.html"), formattedResult());
+  }
+
+  private String formattedResult() throws IOException {
+    return format1To2Indent(getLastWritten());
+  }
+
+  private String loadHtml(final String fileName) throws IOException {
+    final ClassLoader classLoader = ClassLoader.getSystemClassLoader();
+    try (InputStream is = classLoader.getResourceAsStream(fileName)) {
+      if (is == null) {
+        throw new FileNotFoundException(fileName);
+      }
+      try (final InputStreamReader isr = new InputStreamReader(is);
+           final BufferedReader reader = new BufferedReader(isr)) {
+        return reader.lines().collect(Collectors.joining(System.lineSeparator()))
+            .replaceAll("<!--[^>]*-->", "")
+            .replaceAll("^\n\n", "");
+      }
+    }
+  }
+
+  private String format1To2Indent(final String xml) {
+    return xml.replaceAll("^\n", "")
+    .replaceAll("\n <", "\n\t<")
+    .replaceAll("\n  <", "\n\t\t<")
+    .replaceAll("\n   <", "\n\t\t\t<")
+    .replaceAll("\n    <", "\n\t\t\t\t<")
+    .replaceAll("\n     <", "\n\t\t\t\t\t<")
+    .replaceAll("\n      <", "\n\t\t\t\t\t\t<")
+    .replaceAll("\n       <", "\n\t\t\t\t\t\t\t<")
+        .replaceAll("\t", "  ");
+  }
+}
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4600-gridLayout/20-label-vertical/Grid_Layout_Label_Vertical.xhtml b/tobago-core/src/test/resources/renderer/in/label-flexLeft.html
similarity index 56%
copy from tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4600-gridLayout/20-label-vertical/Grid_Layout_Label_Vertical.xhtml
copy to tobago-core/src/test/resources/renderer/in/label-flexLeft.html
index 6d4dd0a..ecf357c 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4600-gridLayout/20-label-vertical/Grid_Layout_Label_Vertical.xhtml
+++ b/tobago-core/src/test/resources/renderer/in/label-flexLeft.html
@@ -1,5 +1,3 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
 <!--
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -17,20 +15,7 @@
  * limitations under the License.
 -->
 
-<ui:composition template="/main.xhtml"
-                xmlns="http://www.w3.org/1999/xhtml"
-                xmlns:tc="http://myfaces.apache.org/tobago/component"
-                xmlns:ui="http://java.sun.com/jsf/facelets">
-
-  <tc:box id="box" label="Grid Layout with lableLayout top and bottom (vertical)">
-    <tc:gridLayout id="grid" columns="1fr 2fr">
-
-      <tc:in id="first1" label="First Name 1" labelLayout="gridTop">
-      </tc:in>
-      <tc:in id="last1" label="Last Name 1" labelLayout="gridBottom">
-      </tc:in>
-
-    </tc:gridLayout>
-  </tc:box>
-
-</ui:composition>
+<tobago-in id='id' class='tobago-flexLayout tobago-label-container mb-3'>
+  <label for='id::field' class='col-form-label'>label</label>
+  <input type='text' name='id' id='id::field' class='tobago-in form-control'>
+</tobago-in>
\ No newline at end of file
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4600-gridLayout/20-label-vertical/Grid_Layout_Label_Vertical.xhtml b/tobago-core/src/test/resources/renderer/in/label-flexRight.html
similarity index 56%
copy from tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4600-gridLayout/20-label-vertical/Grid_Layout_Label_Vertical.xhtml
copy to tobago-core/src/test/resources/renderer/in/label-flexRight.html
index 6d4dd0a..c9a8290 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4600-gridLayout/20-label-vertical/Grid_Layout_Label_Vertical.xhtml
+++ b/tobago-core/src/test/resources/renderer/in/label-flexRight.html
@@ -1,5 +1,3 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
 <!--
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -17,20 +15,7 @@
  * limitations under the License.
 -->
 
-<ui:composition template="/main.xhtml"
-                xmlns="http://www.w3.org/1999/xhtml"
-                xmlns:tc="http://myfaces.apache.org/tobago/component"
-                xmlns:ui="http://java.sun.com/jsf/facelets">
-
-  <tc:box id="box" label="Grid Layout with lableLayout top and bottom (vertical)">
-    <tc:gridLayout id="grid" columns="1fr 2fr">
-
-      <tc:in id="first1" label="First Name 1" labelLayout="gridTop">
-      </tc:in>
-      <tc:in id="last1" label="Last Name 1" labelLayout="gridBottom">
-      </tc:in>
-
-    </tc:gridLayout>
-  </tc:box>
-
-</ui:composition>
+<tobago-in id='id' class='tobago-flexLayout tobago-label-container mb-3'>
+  <input type='text' name='id' id='id::field' class='tobago-in form-control'>
+  <label for='id::field' class='col-form-label'>label</label>
+</tobago-in>
\ No newline at end of file
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4600-gridLayout/20-label-vertical/Grid_Layout_Label_Vertical.xhtml b/tobago-core/src/test/resources/renderer/in/label-flowLeft.html
similarity index 56%
copy from tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4600-gridLayout/20-label-vertical/Grid_Layout_Label_Vertical.xhtml
copy to tobago-core/src/test/resources/renderer/in/label-flowLeft.html
index 6d4dd0a..d9032c7 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4600-gridLayout/20-label-vertical/Grid_Layout_Label_Vertical.xhtml
+++ b/tobago-core/src/test/resources/renderer/in/label-flowLeft.html
@@ -1,5 +1,3 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
 <!--
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -17,20 +15,7 @@
  * limitations under the License.
 -->
 
-<ui:composition template="/main.xhtml"
-                xmlns="http://www.w3.org/1999/xhtml"
-                xmlns:tc="http://myfaces.apache.org/tobago/component"
-                xmlns:ui="http://java.sun.com/jsf/facelets">
-
-  <tc:box id="box" label="Grid Layout with lableLayout top and bottom (vertical)">
-    <tc:gridLayout id="grid" columns="1fr 2fr">
-
-      <tc:in id="first1" label="First Name 1" labelLayout="gridTop">
-      </tc:in>
-      <tc:in id="last1" label="Last Name 1" labelLayout="gridBottom">
-      </tc:in>
-
-    </tc:gridLayout>
-  </tc:box>
-
-</ui:composition>
+<label for='id::field' class='col-form-label'>label</label>
+<tobago-in id='id' class='mb-3'>
+  <input type='text' name='id' id='id::field' class='tobago-in form-control'>
+</tobago-in>
\ No newline at end of file
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4600-gridLayout/20-label-vertical/Grid_Layout_Label_Vertical.xhtml b/tobago-core/src/test/resources/renderer/in/label-flowRight.html
similarity index 56%
copy from tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4600-gridLayout/20-label-vertical/Grid_Layout_Label_Vertical.xhtml
copy to tobago-core/src/test/resources/renderer/in/label-flowRight.html
index 6d4dd0a..88b3b7d 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4600-gridLayout/20-label-vertical/Grid_Layout_Label_Vertical.xhtml
+++ b/tobago-core/src/test/resources/renderer/in/label-flowRight.html
@@ -1,5 +1,3 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
 <!--
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -17,20 +15,7 @@
  * limitations under the License.
 -->
 
-<ui:composition template="/main.xhtml"
-                xmlns="http://www.w3.org/1999/xhtml"
-                xmlns:tc="http://myfaces.apache.org/tobago/component"
-                xmlns:ui="http://java.sun.com/jsf/facelets">
-
-  <tc:box id="box" label="Grid Layout with lableLayout top and bottom (vertical)">
-    <tc:gridLayout id="grid" columns="1fr 2fr">
-
-      <tc:in id="first1" label="First Name 1" labelLayout="gridTop">
-      </tc:in>
-      <tc:in id="last1" label="Last Name 1" labelLayout="gridBottom">
-      </tc:in>
-
-    </tc:gridLayout>
-  </tc:box>
-
-</ui:composition>
+<tobago-in id='id' class='mb-3'>
+  <input type='text' name='id' id='id::field' class='tobago-in form-control'>
+</tobago-in>
+<label for='id::field' class='col-form-label'>label</label>
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4600-gridLayout/20-label-vertical/Grid_Layout_Label_Vertical.xhtml b/tobago-core/src/test/resources/renderer/in/label-gridBottom.html
similarity index 56%
copy from tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4600-gridLayout/20-label-vertical/Grid_Layout_Label_Vertical.xhtml
copy to tobago-core/src/test/resources/renderer/in/label-gridBottom.html
index 6d4dd0a..ec69b5a 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4600-gridLayout/20-label-vertical/Grid_Layout_Label_Vertical.xhtml
+++ b/tobago-core/src/test/resources/renderer/in/label-gridBottom.html
@@ -1,5 +1,3 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
 <!--
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -17,20 +15,7 @@
  * limitations under the License.
 -->
 
-<ui:composition template="/main.xhtml"
-                xmlns="http://www.w3.org/1999/xhtml"
-                xmlns:tc="http://myfaces.apache.org/tobago/component"
-                xmlns:ui="http://java.sun.com/jsf/facelets">
-
-  <tc:box id="box" label="Grid Layout with lableLayout top and bottom (vertical)">
-    <tc:gridLayout id="grid" columns="1fr 2fr">
-
-      <tc:in id="first1" label="First Name 1" labelLayout="gridTop">
-      </tc:in>
-      <tc:in id="last1" label="Last Name 1" labelLayout="gridBottom">
-      </tc:in>
-
-    </tc:gridLayout>
-  </tc:box>
-
-</ui:composition>
+<label for='id::field' class='col-form-label'>label</label>
+<tobago-in id='id' class='mb-3'>
+  <input type='text' name='id' id='id::field' class='tobago-in form-control'>
+</tobago-in>
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4600-gridLayout/20-label-vertical/Grid_Layout_Label_Vertical.xhtml b/tobago-core/src/test/resources/renderer/in/label-gridLeft.html
similarity index 56%
copy from tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4600-gridLayout/20-label-vertical/Grid_Layout_Label_Vertical.xhtml
copy to tobago-core/src/test/resources/renderer/in/label-gridLeft.html
index 6d4dd0a..ec69b5a 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4600-gridLayout/20-label-vertical/Grid_Layout_Label_Vertical.xhtml
+++ b/tobago-core/src/test/resources/renderer/in/label-gridLeft.html
@@ -1,5 +1,3 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
 <!--
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -17,20 +15,7 @@
  * limitations under the License.
 -->
 
-<ui:composition template="/main.xhtml"
-                xmlns="http://www.w3.org/1999/xhtml"
-                xmlns:tc="http://myfaces.apache.org/tobago/component"
-                xmlns:ui="http://java.sun.com/jsf/facelets">
-
-  <tc:box id="box" label="Grid Layout with lableLayout top and bottom (vertical)">
-    <tc:gridLayout id="grid" columns="1fr 2fr">
-
-      <tc:in id="first1" label="First Name 1" labelLayout="gridTop">
-      </tc:in>
-      <tc:in id="last1" label="Last Name 1" labelLayout="gridBottom">
-      </tc:in>
-
-    </tc:gridLayout>
-  </tc:box>
-
-</ui:composition>
+<label for='id::field' class='col-form-label'>label</label>
+<tobago-in id='id' class='mb-3'>
+  <input type='text' name='id' id='id::field' class='tobago-in form-control'>
+</tobago-in>
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4600-gridLayout/20-label-vertical/Grid_Layout_Label_Vertical.xhtml b/tobago-core/src/test/resources/renderer/in/label-gridRight.html
similarity index 56%
copy from tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4600-gridLayout/20-label-vertical/Grid_Layout_Label_Vertical.xhtml
copy to tobago-core/src/test/resources/renderer/in/label-gridRight.html
index 6d4dd0a..ec69b5a 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4600-gridLayout/20-label-vertical/Grid_Layout_Label_Vertical.xhtml
+++ b/tobago-core/src/test/resources/renderer/in/label-gridRight.html
@@ -1,5 +1,3 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
 <!--
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -17,20 +15,7 @@
  * limitations under the License.
 -->
 
-<ui:composition template="/main.xhtml"
-                xmlns="http://www.w3.org/1999/xhtml"
-                xmlns:tc="http://myfaces.apache.org/tobago/component"
-                xmlns:ui="http://java.sun.com/jsf/facelets">
-
-  <tc:box id="box" label="Grid Layout with lableLayout top and bottom (vertical)">
-    <tc:gridLayout id="grid" columns="1fr 2fr">
-
-      <tc:in id="first1" label="First Name 1" labelLayout="gridTop">
-      </tc:in>
-      <tc:in id="last1" label="Last Name 1" labelLayout="gridBottom">
-      </tc:in>
-
-    </tc:gridLayout>
-  </tc:box>
-
-</ui:composition>
+<label for='id::field' class='col-form-label'>label</label>
+<tobago-in id='id' class='mb-3'>
+  <input type='text' name='id' id='id::field' class='tobago-in form-control'>
+</tobago-in>
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4600-gridLayout/20-label-vertical/Grid_Layout_Label_Vertical.xhtml b/tobago-core/src/test/resources/renderer/in/label-gridTop.html
similarity index 56%
copy from tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4600-gridLayout/20-label-vertical/Grid_Layout_Label_Vertical.xhtml
copy to tobago-core/src/test/resources/renderer/in/label-gridTop.html
index 6d4dd0a..ec69b5a 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4600-gridLayout/20-label-vertical/Grid_Layout_Label_Vertical.xhtml
+++ b/tobago-core/src/test/resources/renderer/in/label-gridTop.html
@@ -1,5 +1,3 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
 <!--
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -17,20 +15,7 @@
  * limitations under the License.
 -->
 
-<ui:composition template="/main.xhtml"
-                xmlns="http://www.w3.org/1999/xhtml"
-                xmlns:tc="http://myfaces.apache.org/tobago/component"
-                xmlns:ui="http://java.sun.com/jsf/facelets">
-
-  <tc:box id="box" label="Grid Layout with lableLayout top and bottom (vertical)">
-    <tc:gridLayout id="grid" columns="1fr 2fr">
-
-      <tc:in id="first1" label="First Name 1" labelLayout="gridTop">
-      </tc:in>
-      <tc:in id="last1" label="Last Name 1" labelLayout="gridBottom">
-      </tc:in>
-
-    </tc:gridLayout>
-  </tc:box>
-
-</ui:composition>
+<label for='id::field' class='col-form-label'>label</label>
+<tobago-in id='id' class='mb-3'>
+  <input type='text' name='id' id='id::field' class='tobago-in form-control'>
+</tobago-in>
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4600-gridLayout/20-label-vertical/Grid_Layout_Label_Vertical.xhtml b/tobago-core/src/test/resources/renderer/in/label-none.html
similarity index 56%
copy from tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4600-gridLayout/20-label-vertical/Grid_Layout_Label_Vertical.xhtml
copy to tobago-core/src/test/resources/renderer/in/label-none.html
index 6d4dd0a..50d16ea 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4600-gridLayout/20-label-vertical/Grid_Layout_Label_Vertical.xhtml
+++ b/tobago-core/src/test/resources/renderer/in/label-none.html
@@ -1,5 +1,3 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
 <!--
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -17,20 +15,6 @@
  * limitations under the License.
 -->
 
-<ui:composition template="/main.xhtml"
-                xmlns="http://www.w3.org/1999/xhtml"
-                xmlns:tc="http://myfaces.apache.org/tobago/component"
-                xmlns:ui="http://java.sun.com/jsf/facelets">
-
-  <tc:box id="box" label="Grid Layout with lableLayout top and bottom (vertical)">
-    <tc:gridLayout id="grid" columns="1fr 2fr">
-
-      <tc:in id="first1" label="First Name 1" labelLayout="gridTop">
-      </tc:in>
-      <tc:in id="last1" label="Last Name 1" labelLayout="gridBottom">
-      </tc:in>
-
-    </tc:gridLayout>
-  </tc:box>
-
-</ui:composition>
+<tobago-in id='id' class='mb-3'>
+  <input type='text' name='id' id='id::field' class='tobago-in form-control'>
+</tobago-in>
diff --git a/tobago-core/src/test/resources/renderer/in/label-segmentLeft.html b/tobago-core/src/test/resources/renderer/in/label-segmentLeft.html
new file mode 100644
index 0000000..ce3a427
--- /dev/null
+++ b/tobago-core/src/test/resources/renderer/in/label-segmentLeft.html
@@ -0,0 +1,27 @@
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the 'License'); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an 'AS IS' BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+-->
+
+<div id='segid' class='tobago-segmentLayout row'>
+  <div class='col-md-3'>
+    <label for='id::field' class='col-form-label'>label</label>
+  </div>
+  <div class='col-md-9'>
+    <tobago-in id='id' class='mb-3'>
+      <input type='text' name='id' id='id::field' class='tobago-in form-control'>
+    </tobago-in>
+  </div>
+</div>
diff --git a/tobago-core/src/test/resources/renderer/in/label-segmentRight.html b/tobago-core/src/test/resources/renderer/in/label-segmentRight.html
new file mode 100644
index 0000000..ed3096a
--- /dev/null
+++ b/tobago-core/src/test/resources/renderer/in/label-segmentRight.html
@@ -0,0 +1,27 @@
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the 'License'); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an 'AS IS' BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+-->
+
+<div id='segid' class='tobago-segmentLayout row'>
+  <div class='col-md-9'>
+    <tobago-in id='id' class='mb-3'>
+      <input type='text' name='id' id='id::field' class='tobago-in form-control'>
+    </tobago-in>
+  </div>
+  <div class='col-md-3'>
+    <label for='id::field' class='col-form-label'>label</label>
+  </div>
+</div>
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4600-gridLayout/20-label-vertical/Grid_Layout_Label_Vertical.xhtml b/tobago-core/src/test/resources/renderer/in/label-skip.html
similarity index 56%
copy from tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4600-gridLayout/20-label-vertical/Grid_Layout_Label_Vertical.xhtml
copy to tobago-core/src/test/resources/renderer/in/label-skip.html
index 6d4dd0a..9180f29 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4600-gridLayout/20-label-vertical/Grid_Layout_Label_Vertical.xhtml
+++ b/tobago-core/src/test/resources/renderer/in/label-skip.html
@@ -1,5 +1,3 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
 <!--
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -17,20 +15,7 @@
  * limitations under the License.
 -->
 
-<ui:composition template="/main.xhtml"
-                xmlns="http://www.w3.org/1999/xhtml"
-                xmlns:tc="http://myfaces.apache.org/tobago/component"
-                xmlns:ui="http://java.sun.com/jsf/facelets">
-
-  <tc:box id="box" label="Grid Layout with lableLayout top and bottom (vertical)">
-    <tc:gridLayout id="grid" columns="1fr 2fr">
-
-      <tc:in id="first1" label="First Name 1" labelLayout="gridTop">
-      </tc:in>
-      <tc:in id="last1" label="Last Name 1" labelLayout="gridBottom">
-      </tc:in>
-
-    </tc:gridLayout>
-  </tc:box>
-
-</ui:composition>
+<tobago-in id='id' class='mb-3'>
+  <label for='id::field' class='col-form-label'>label</label>
+  <input type='text' name='id' id='id::field' class='tobago-in form-control'>
+</tobago-in>
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4600-gridLayout/20-label-vertical/Grid_Layout_Label_Vertical.xhtml b/tobago-core/src/test/resources/renderer/in/label-top.html
similarity index 56%
copy from tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4600-gridLayout/20-label-vertical/Grid_Layout_Label_Vertical.xhtml
copy to tobago-core/src/test/resources/renderer/in/label-top.html
index 6d4dd0a..9180f29 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4600-gridLayout/20-label-vertical/Grid_Layout_Label_Vertical.xhtml
+++ b/tobago-core/src/test/resources/renderer/in/label-top.html
@@ -1,5 +1,3 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
 <!--
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -17,20 +15,7 @@
  * limitations under the License.
 -->
 
-<ui:composition template="/main.xhtml"
-                xmlns="http://www.w3.org/1999/xhtml"
-                xmlns:tc="http://myfaces.apache.org/tobago/component"
-                xmlns:ui="http://java.sun.com/jsf/facelets">
-
-  <tc:box id="box" label="Grid Layout with lableLayout top and bottom (vertical)">
-    <tc:gridLayout id="grid" columns="1fr 2fr">
-
-      <tc:in id="first1" label="First Name 1" labelLayout="gridTop">
-      </tc:in>
-      <tc:in id="last1" label="Last Name 1" labelLayout="gridBottom">
-      </tc:in>
-
-    </tc:gridLayout>
-  </tc:box>
-
-</ui:composition>
+<tobago-in id='id' class='mb-3'>
+  <label for='id::field' class='col-form-label'>label</label>
+  <input type='text' name='id' id='id::field' class='tobago-in form-control'>
+</tobago-in>
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4600-gridLayout/20-label-vertical/Grid_Layout_Label_Vertical.xhtml b/tobago-core/src/test/resources/renderer/in/simple.html
similarity index 56%
copy from tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4600-gridLayout/20-label-vertical/Grid_Layout_Label_Vertical.xhtml
copy to tobago-core/src/test/resources/renderer/in/simple.html
index 6d4dd0a..7358302 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4600-gridLayout/20-label-vertical/Grid_Layout_Label_Vertical.xhtml
+++ b/tobago-core/src/test/resources/renderer/in/simple.html
@@ -1,5 +1,3 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
 <!--
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -17,20 +15,6 @@
  * limitations under the License.
 -->
 
-<ui:composition template="/main.xhtml"
-                xmlns="http://www.w3.org/1999/xhtml"
-                xmlns:tc="http://myfaces.apache.org/tobago/component"
-                xmlns:ui="http://java.sun.com/jsf/facelets">
-
-  <tc:box id="box" label="Grid Layout with lableLayout top and bottom (vertical)">
-    <tc:gridLayout id="grid" columns="1fr 2fr">
-
-      <tc:in id="first1" label="First Name 1" labelLayout="gridTop">
-      </tc:in>
-      <tc:in id="last1" label="Last Name 1" labelLayout="gridBottom">
-      </tc:in>
-
-    </tc:gridLayout>
-  </tc:box>
-
-</ui:composition>
+<tobago-in id='id' class='mb-3'>
+  <input type='text' name='id' id='id::field' class='tobago-in form-control'>
+</tobago-in>
\ No newline at end of file
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/faces-config.xml b/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/faces-config.xml
index 9ee680c..9fc9e06 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/faces-config.xml
+++ b/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/faces-config.xml
@@ -76,6 +76,12 @@
     <converter-class>org.apache.myfaces.tobago.example.demo.OnOffConverter</converter-class>
   </converter>
 
+  <!--  @FacesConverter(forClass = SolarObject.class)// XXX fixme: is not running with Quarkus!-->
+  <converter>
+    <converter-id>org.apache.myfaces.tobago.example.demo.SolarConverter</converter-id>
+    <converter-class>org.apache.myfaces.tobago.example.demo.SolarConverter</converter-class>
+  </converter>
+
 <!--
   <factory>
     <exception-handler-factory>
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/030-select/30-selectOneRadio/Radio.xhtml b/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/030-select/30-selectOneRadio/Radio.xhtml
index 1e80945..61050d8 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/030-select/30-selectOneRadio/Radio.xhtml
+++ b/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/030-select/30-selectOneRadio/Radio.xhtml
@@ -128,31 +128,23 @@
 
   <tc:section id="selectReference" label="Free layout with &lt;tc:selectReference>">
 
-    <p>
-      <span class="#{demo:bootstrapClass('BADGE')} #{demo:bootstrapClass('BADGE_DANGER')}">Attanion!</span>
-      The <code class="language-markup">&lt;tc:selectReference></code> currently works only, when the referenced
-      component <code class="language-markup">&lt;tc:selectOneRadio></code> has
-      set <code class="language-markup">labelLayout="skip"</code>.
-    </p>
-
     <tc:segmentLayout medium="4seg 4seg 4seg">
-    <tc:box>
-      First and second giant planets:
-      <tc:selectOneRadio id="giant0" value="#{selectOneRadioController.selectedGiantPlanet}" renderRange="0,1"
-                         labelLayout="skip">
-        <f:selectItems value="#{astroData.giantPlanets}"/>
-      </tc:selectOneRadio>
-    </tc:box>
-
-    <tc:box>
-    Discovered #{astroData.giantPlanets[2].value.discoverYear}:
-    <tc:selectReference id="giant1" for="giant0" renderRange="2"/>
-  </tc:box>
-
-    <tc:box>
-    Discovered #{astroData.giantPlanets[3].value.discoverYear}:
-    <tc:selectReference id="giant2" for="giant0" renderRange="3"/>
-    </tc:box>
+      <tc:box>
+        First and second giant planets:
+        <tc:selectOneRadio id="giant0" value="#{selectOneRadioController.selectedGiantPlanet}" renderRange="0,1" labelLayout="segmentRight">
+          <f:selectItems value="#{astroData.giantPlanets}"/>
+        </tc:selectOneRadio>
+      </tc:box>
+
+      <tc:box>
+        Discovered #{astroData.giantPlanets[2].value.discoverYear}:
+        <tc:selectReference id="giant1" for="giant0" renderRange="2"/>
+      </tc:box>
+
+      <tc:box>
+        Discovered #{astroData.giantPlanets[3].value.discoverYear}:
+        <tc:selectReference id="giant2" for="giant0" renderRange="3"/>
+      </tc:box>
     </tc:segmentLayout>
 
     <tc:button label="Submit">
@@ -166,7 +158,7 @@
   <tc:section label="Free layout with pure JSF (JSF 2.3 only)">
 
     <p>
-      <span class="#{demo:bootstrapClass('BADGE')} #{demo:bootstrapClass('BADGE_DANGER')}">Attanion!</span>
+      <span class="#{demo:bootstrapClass('BADGE')} #{demo:bootstrapClass('BADGE_DANGER')}">Attention!</span>
       This example is only temporary for testing purpose.
     </p>
 
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/16-layout/40-labeled/Labeled_Layout.xhtml b/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/16-layout/40-label/Label_Layout.xhtml
similarity index 100%
rename from tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/16-layout/40-labeled/Labeled_Layout.xhtml
rename to tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/16-layout/40-label/Label_Layout.xhtml
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4600-gridLayout/20-label-vertical/Grid_Layout_Label_Vertical.xhtml b/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4600-gridLayout/20-label-vertical/Grid_Layout_Label_Vertical.xhtml
index 6d4dd0a..06783c4 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4600-gridLayout/20-label-vertical/Grid_Layout_Label_Vertical.xhtml
+++ b/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4600-gridLayout/20-label-vertical/Grid_Layout_Label_Vertical.xhtml
@@ -22,7 +22,7 @@
                 xmlns:tc="http://myfaces.apache.org/tobago/component"
                 xmlns:ui="http://java.sun.com/jsf/facelets">
 
-  <tc:box id="box" label="Grid Layout with lableLayout top and bottom (vertical)">
+  <tc:box id="box" label="Grid Layout with labelLayout top and bottom (vertical)">
     <tc:gridLayout id="grid" columns="1fr 2fr">
 
       <tc:in id="first1" label="First Name 1" labelLayout="gridTop">
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4800-labelLayout/LabelLayout.xhtml b/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4800-labelLayout/LabelLayout.xhtml
index da45fb9..b503b6e 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4800-labelLayout/LabelLayout.xhtml
+++ b/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/4800-labelLayout/LabelLayout.xhtml
@@ -26,47 +26,36 @@
 
   <tc:box label="&lt;tc:date>">
     <tc:date id="date"/>
-    <tc:date id="dateSkip" label="Date" labelLayout="skip"/>
     <tc:date id="dateNone" label="Date" labelLayout="none"/>
   </tc:box>
   <tc:box label="&lt;tc:file>">
     <tc:file id="file"/>
-    <tc:file id="fileSkip" label="File" labelLayout="skip"/>
     <tc:file id="fileNone" label="File" labelLayout="none"/>
   </tc:box>
   <tc:box label="&lt;tc:in>">
     <tc:in id="in"/>
-    <tc:in id="inSkip" label="In" labelLayout="skip"/>
     <tc:in id="inNone" label="In" labelLayout="none"/>
     <tc:separator/>
     <tc:in id="inGroup">
       <f:facet name="before">Input Group</f:facet>
     </tc:in>
-    <tc:in id="inGroupSkip" label="Input Group" labelLayout="skip">
-      <f:facet name="before">Input Group</f:facet>
-    </tc:in>
     <tc:in id="inGroupNone" label="Input Group" labelLayout="none">
       <f:facet name="before">Input Group</f:facet>
     </tc:in>
   </tc:box>
   <tc:box label="&lt;tc:out>">
     <tc:out id="out" value="123"/>
-    <tc:out id="outSkip" label="Out" labelLayout="skip" value="123"/>
-    <tc:out id="outCompact" label="Out" labelLayout="skip" compact="true" value="123"/>
+    <tc:out id="outCompact" label="Out" compact="true" value="123"/>
     <tc:out id="outNone" label="Out " labelLayout="none" value="123"/>
   </tc:box>
   <tc:box label="&lt;tc:selectBooleanCheckbox>">
     <tc:selectBooleanCheckbox id="selectBooleanCheckbox"/>
-    <tc:selectBooleanCheckbox id="selectBooleanCheckboxSkip" label="SelectBooleanCheckbox" labelLayout="skip"/>
     <tc:selectBooleanCheckbox id="selectBooleanCheckboxNone" label="SelectBooleanCheckbox" labelLayout="none"/>
   </tc:box>
   <tc:box label="&lt;tc:selectManyCheckbox>">
     <tc:selectManyCheckbox id="selectManyCheckboxNorm">
       <tc:selectItem itemValue="Item"/>
     </tc:selectManyCheckbox>
-    <tc:selectManyCheckbox id="selectManyCheckboxSkip" label="SelectManyCheckbox" labelLayout="skip">
-      <tc:selectItem itemValue="Item"/>
-    </tc:selectManyCheckbox>
     <tc:selectManyCheckbox id="selectManyCheckboxNone" label="SelectManyCheckbox" labelLayout="none">
       <tc:selectItem itemValue="Item"/>
     </tc:selectManyCheckbox>
@@ -75,9 +64,6 @@
     <tc:selectManyListbox id="selectManyListbox">
       <tc:selectItem itemValue="Item"/>
     </tc:selectManyListbox>
-    <tc:selectManyListbox id="selectManyListboxSkip" label="SelectManyListbox" labelLayout="skip">
-      <tc:selectItem itemValue="Item"/>
-    </tc:selectManyListbox>
     <tc:selectManyListbox id="selectManyListboxNone" label="SelectManyListbox" labelLayout="none">
       <tc:selectItem itemValue="Item"/>
     </tc:selectManyListbox>
@@ -86,9 +72,6 @@
     <tc:selectManyShuttle id="SelectManyShuttle">
       <tc:selectItem itemValue="Item"/>
     </tc:selectManyShuttle>
-    <tc:selectManyShuttle id="SelectManyShuttleSkip" label="SelectManyShuttle" labelLayout="skip">
-      <tc:selectItem itemValue="Item"/>
-    </tc:selectManyShuttle>
     <tc:selectManyShuttle id="SelectManyShuttleNone" label="SelectManyShuttle" labelLayout="none">
       <tc:selectItem itemValue="Item"/>
     </tc:selectManyShuttle>
@@ -97,9 +80,6 @@
     <tc:selectOneChoice id="selectOneChoice">
       <tc:selectItem itemValue="Item"/>
     </tc:selectOneChoice>
-    <tc:selectOneChoice id="selectOneChoiceSkip" label="SelectOneChoice" labelLayout="skip">
-      <tc:selectItem itemValue="Item"/>
-    </tc:selectOneChoice>
     <tc:selectOneChoice id="selectOneChoiceNone" label="SelectOneChoice" labelLayout="none">
       <tc:selectItem itemValue="Item"/>
     </tc:selectOneChoice>
@@ -108,9 +88,6 @@
     <tc:selectOneListbox id="selectOneListbox">
       <tc:selectItem itemValue="Item"/>
     </tc:selectOneListbox>
-    <tc:selectOneListbox id="selectOneListboxSkip" label="SelectOneListbox" labelLayout="skip">
-      <tc:selectItem itemValue="Item"/>
-    </tc:selectOneListbox>
     <tc:selectOneListbox id="selectOneListboxNone" label="SelectOneListbox" labelLayout="none">
       <tc:selectItem itemValue="Item"/>
     </tc:selectOneListbox>
@@ -119,16 +96,12 @@
     <tc:selectOneRadio id="selectOneRadio">
       <tc:selectItem itemValue="Item"/>
     </tc:selectOneRadio>
-    <tc:selectOneRadio id="selectOneRadioSkip" label="SelectOneRadio" labelLayout="skip">
-      <tc:selectItem itemValue="Item"/>
-    </tc:selectOneRadio>
     <tc:selectOneRadio id="selectOneRadioNone" label="SelectOneRadio" labelLayout="none">
       <tc:selectItem itemValue="Item"/>
     </tc:selectOneRadio>
   </tc:box>
   <tc:box label="&lt;tc:textarea>">
     <tc:textarea id="textarea"/>
-    <tc:textarea id="textareaSkip" label="Textarea" labelLayout="skip"/>
     <tc:textarea id="textareaNone" label="Textarea" labelLayout="none"/>
   </tc:box>
 </ui:composition>
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/logging-info.xhtml b/tobago-example/tobago-example-demo/src/main/webapp/logging-info.xhtml
index 2f744ab..9aaab24 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/logging-info.xhtml
+++ b/tobago-example/tobago-example-demo/src/main/webapp/logging-info.xhtml
@@ -35,36 +35,32 @@
     <tc:gridLayout columns="auto 120px auto 1fr">
 
       <tc:label value="JUL" tip="Java Util Logging"/>
-      <tc:selectBooleanCheckbox value="#{loggingController.jul.available}" readonly="true"
-                                label="available" labelLayout="skip"/>
+      <tc:selectBooleanCheckbox value="#{loggingController.jul.available}" readonly="true" itemLabel="available"/>
       <tc:button label="Log" tip="Log some stuff in every level" action="#{loggingController.jul.logDemo}"
                  disabled="#{not loggingController.jul.available}"/>
       <tc:out value="#{loggingController.jul.activeLevels}"/>
 
       <tc:label value="SLF4J" tip="Simple Logging Facade"/>
-      <tc:selectBooleanCheckbox value="#{loggingController.slf4j.available}" readonly="true"
-                                label="available" labelLayout="skip"/>
+      <tc:selectBooleanCheckbox value="#{loggingController.slf4j.available}" readonly="true" itemLabel="available"/>
       <tc:button label="Log" tip="Log some stuff in every level" action="#{loggingController.slf4j.logDemo}"
                  disabled="#{not loggingController.slf4j.available}"/>
       <tc:out value="#{loggingController.slf4j.activeLevels}"/>
 
       <tc:label value="LOG4J"/>
-      <tc:selectBooleanCheckbox value="#{loggingController.log4j.available}" readonly="true"
-                                label="available" labelLayout="skip"/>
+      <tc:selectBooleanCheckbox value="#{loggingController.log4j.available}" readonly="true" itemLabel="available"/>
       <tc:button label="Log" tip="Log some stuff in every level" action="#{loggingController.log4j.logDemo}"
                  disabled="#{not loggingController.log4j.available}"/>
       <tc:out value="#{loggingController.log4j.activeLevels}"/>
 
       <tc:label value="LOG4J2"/>
-      <tc:selectBooleanCheckbox value="#{loggingController.log4j2.available}" readonly="true"
-                                label="available" labelLayout="skip"/>
+      <tc:selectBooleanCheckbox value="#{loggingController.log4j2.available}" readonly="true" itemLabel="available" />
       <tc:button label="Log" tip="Log some stuff in every level" action="#{loggingController.log4j2.logDemo}"
                  disabled="#{not loggingController.log4j2.available}"/>
       <tc:out value="#{loggingController.log4j2.activeLevels}"/>
 
       <tc:label value="JCL" tip="Commons Logging"/>
       <tc:selectBooleanCheckbox value="#{loggingController.commonsLogging.available}" readonly="true"
-                                label="available" labelLayout="skip"/>
+                                itemLabel="available"/>
       <tc:button label="Log" tip="Log some stuff in every level" action="#{loggingController.commonsLogging.logDemo}"
                  disabled="#{not loggingController.commonsLogging.available}"/>
       <tc:out value="#{loggingController.commonsLogging.activeLevels}"/>


Mime
View raw message