Class FormGroup
- java.lang.Object
-
- org.apache.tapestry5.corelib.mixins.FormGroup
-
public class FormGroup extends java.lang.Object
Applied to aField
, this provides the outer layers of markup to correctly render text fields, selects, and textareas using Bootstrap: an outer<div class="field-group">
containing a<label class="control-label">
and the field itself. Actually, the class attribute of the div is defined by theSymbolConstants.FORM_GROUP_WRAPPER_CSS_CLASS
and the class attribute of label is defined by theSymbolConstants.FORM_GROUP_LABEL_CSS_CLASS
.field-group
andcontrol-label
are the default values. As with theLabel
component, thefor
attribute is set (after the field itself renders). You can also use theSymbolConstants.FORM_GROUP_FORM_FIELD_WRAPPER_ELEMENT_NAME
symbol to optionally wrap the input field in an element andSymbolConstants.FORM_GROUP_FORM_FIELD_WRAPPER_ELEMENT_CSS_CLASS
to give it a CSS class. This is useful for Bootstrap form-horizontal forms. SettingSymbolConstants.FORM_GROUP_FORM_FIELD_WRAPPER_ELEMENT_NAME
todiv
,SymbolConstants.FORM_GROUP_FORM_FIELD_WRAPPER_ELEMENT_CSS_CLASS
tocol-sm-10
andSymbolConstants.FORM_GROUP_LABEL_CSS_CLASS
tocol-sm-2
will generate labels 2 columns wide and form fields 10 columns wide. This component is not appropriate for radio buttons or checkboxes as they use a different class on the outermost element ("radio" or "checkbox") and next the element inside the<label>
.
-
-
Constructor Summary
Constructors Constructor Description FormGroup()
-
-
-
Constructor Detail
-
FormGroup
public FormGroup()
-
-