All Implemented Interfaces:
Serializable, Iterable<Component>, IEventSink, IEventSource, IFeedbackContributor, IConverterLocator, IMetadataContext<Serializable,Component>, IQueueRegion, IHeaderContributor, IRequestableComponent, IHierarchical<Component>, IClusterable

public class ColGroup extends Panel
A panel that renders <colgroup> with <col> elements inside it. The columns can be used to style the whole table column.

Important: this component requires MarkupSettings.getStripWicketTags() to return true, otherwise the browsers break the rendering of the HTML elements. For example Google Chrome renders two <colgroup> elements.

See Also:
  • Constructor Details

  • Method Details

    • addCol

      public ColGroup addCol(ColGroup.Col column)
      Adds a column to the group.

      Usage:

           
               colgroup.addCol(colgroup.new Col(AttributeModifier.append("span", "2"),
                   AttributeModifier.append("style", "background-color: #CC6633")))
           
       

      Parameters:
      column - The column with the styling behaviors
      Returns:
      this, for method chaining
    • onConfigure

      protected void onConfigure()
      Hides the ColGroup if there are no <col>s to render
      Overrides:
      onConfigure in class Component