@Immutable public class BootstrapFormGroupRendererDefault extends Object implements IBootstrapFormGroupRenderer
IBootstrapFormGroupRenderer
which performs standard rendering. It offers the possibility to modify
certain styling by overriding the provided protected methods.| Modifier and Type | Field and Description |
|---|---|
static com.helger.html.css.ICSSClassProvider |
CSS_CLASS_FORM_GROUP_ERROR_TEXT |
static com.helger.html.css.ICSSClassProvider |
CSS_CLASS_FORM_GROUP_HELP_TEXT |
| Constructor and Description |
|---|
BootstrapFormGroupRendererDefault() |
| Modifier and Type | Method and Description |
|---|---|
protected com.helger.html.hc.IHCElement<?> |
createHelpTextNode(com.helger.html.hc.IHCNode aHelpText)
Create the help text node
|
protected com.helger.html.hc.IHCElement<?> |
createSingleErrorNode(com.helger.validation.error.IError aError)
Create the node for a single error.
|
protected EBootstrapFormGroupState |
getFormGroupStateFromErrorList(com.helger.validation.error.IErrorList aErrorList)
Retrieve an optional CSS class that is provided to the final node.
|
boolean |
isUseIcons() |
protected void |
modifyFinalNode(BootstrapForm aForm,
BootstrapFormGroup aFormGroup,
com.helger.html.hc.html.HCDiv aFinalNode)
Callback possibility to change the finally created node before it is
returned.
|
protected void |
modifyFirstControlIfLabelIsPresent(com.helger.html.hc.IHCElementWithChildren<?> aLabel,
com.helger.html.hc.IHCControl<?> aFirstControl)
Modify the first control that is inserted.
|
com.helger.html.hc.IHCElement<?> |
renderFormGroup(BootstrapForm aForm,
BootstrapFormGroup aFormGroup) |
void |
setUseIcons(boolean bUseIcons) |
public static final com.helger.html.css.ICSSClassProvider CSS_CLASS_FORM_GROUP_HELP_TEXT
public static final com.helger.html.css.ICSSClassProvider CSS_CLASS_FORM_GROUP_ERROR_TEXT
public boolean isUseIcons()
isUseIcons in interface IBootstrapFormGroupRendererpublic void setUseIcons(boolean bUseIcons)
setUseIcons in interface IBootstrapFormGroupRenderer@OverrideOnDemand protected void modifyFirstControlIfLabelIsPresent(@Nonnull com.helger.html.hc.IHCElementWithChildren<?> aLabel, @Nonnull com.helger.html.hc.IHCControl<?> aFirstControl)
aLabel - The label that was provided. Never null.aFirstControl - The first control that was provided. Never null.@Nonnull @OverrideOnDemand protected com.helger.html.hc.IHCElement<?> createHelpTextNode(@Nonnull com.helger.html.hc.IHCNode aHelpText)
aHelpText - The source help text. Never null.null.@Nullable @OverrideOnDemand protected EBootstrapFormGroupState getFormGroupStateFromErrorList(@Nullable com.helger.validation.error.IErrorList aErrorList)
null and non-empty error list
is present.aErrorList - The error list. May be null.null to indicate no CSS class.@Nonnull @OverrideOnDemand protected com.helger.html.hc.IHCElement<?> createSingleErrorNode(@Nonnull com.helger.validation.error.IError aError)
aError - The provided error. Never null.null.@OverrideOnDemand protected void modifyFinalNode(@Nonnull BootstrapForm aForm, @Nonnull BootstrapFormGroup aFormGroup, @Nonnull com.helger.html.hc.html.HCDiv aFinalNode)
aForm - The source form. Never null.aFormGroup - The source form group. Never null.aFinalNode - The created node so far. Never null.@Nonnull public com.helger.html.hc.IHCElement<?> renderFormGroup(@Nonnull BootstrapForm aForm, @Nonnull BootstrapFormGroup aFormGroup)
renderFormGroup in interface IBootstrapFormGroupRendereraForm - Form the form group belongs to. May not be null.aFormGroup - The form group to be rendered. May not be null.null.Copyright © 2014–2015 Philip Helger. All rights reserved.