Module wicket.bootstrap.core
Class FormGroup
java.lang.Object
org.apache.wicket.Component
org.apache.wicket.MarkupContainer
org.apache.wicket.markup.html.WebMarkupContainer
org.apache.wicket.markup.html.border.Border
de.agilecoders.wicket.core.markup.html.bootstrap.form.FormGroup
- All Implemented Interfaces:
Serializable,Iterable<Component>,IEventSink,IEventSource,IFeedbackContributor,IConverterLocator,IMetadataContext<Serializable,,Component> IQueueRegion,IHeaderContributor,IComponentResolver,IRequestableComponent,IHierarchical<Component>,IClusterable
Simple form control group that is able to show a label, help text and feedback
message additional to wrapped form element.
- Author:
- miha
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classTransforms aFeedbackMessageto a css class name.static enumDeprecated.Not supported by Bootstrap 4.Nested classes/interfaces inherited from class org.apache.wicket.markup.html.border.Border
Border.BorderBodyContainer -
Field Summary
Fields inherited from class org.apache.wicket.Component
ENABLE, FLAG_INITIALIZED, FLAG_RESERVED1, FLAG_RESERVED2, FLAG_RESERVED3, FLAG_RESERVED4, FLAG_RESERVED5, FLAG_RESERVED8, PARENT_PATH, PATH_SEPARATOR, RENDER, RFLAG_CONTAINER_DEQUEING, RFLAG_CONTAINER_HAS_REMOVALS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddOutputMarkupId(List<FormComponent<?>> formComponents) sets the output markup id flag to true for all given formComponents.protected Componentcreates a new container for a feedback messageprotected Function<FeedbackMessage,String> protected ComponentnewHelpLabel(String id, IModel<String> model) creates a new help label that contains a help message for the form field.protected Componentcreates a new labelprotected voidprotected voidprotected voidsize(FormGroup.Size size) Deprecated.Not supported by Bootstrap 4.useFormComponentLabel(boolean value) Methods inherited from class org.apache.wicket.markup.html.border.Border
add, addDequeuedComponent, addOrReplace, addToBorder, canDequeueTag, findComponentToDequeue, getBodyContainer, getMarkup, getRegionMarkup, newMarkupSourcingStrategy, queue, queueToBorder, remove, remove, removeAll, removeFromBorder, replace, replaceInBorder, resolveMethods inherited from class org.apache.wicket.markup.html.WebMarkupContainer
getWebApplication, getWebPage, getWebRequest, getWebResponse, getWebSessionMethods inherited from class org.apache.wicket.MarkupContainer
autoAdd, contains, dequeue, dequeue, dequeuePreamble, findChildComponent, get, getAssociatedMarkup, getAssociatedMarkupStream, getMarkupType, internalAdd, internalInitialize, iterator, iterator, newDequeueContext, onComponentTagBody, onDetach, onRender, renderAll, renderAssociatedMarkup, renderNext, setDefaultModel, size, stream, streamChildren, toString, toString, visitChildren, visitChildrenMethods inherited from class org.apache.wicket.Component
add, addStateChange, beforeRender, canCallListener, canCallListenerAfterExpiry, checkComponentTag, checkComponentTagAttribute, checkHierarchyChange, clearOriginalDestination, configure, continueToOriginalDestination, createConverter, debug, detach, detachModel, detachModels, determineVisibility, error, exceptionMessage, fatal, findMarkupStream, findPage, findParent, findParentWithAssociatedMarkup, getAjaxRegionMarkupId, getApplication, getBehaviorById, getBehaviorId, getBehaviors, getBehaviors, getClassRelativePath, getConverter, getDefaultModel, getDefaultModelObject, getDefaultModelObjectAsString, getDefaultModelObjectAsString, getEscapeModelStrings, getFeedbackMessages, getFlag, getId, getInnermostModel, getInnermostModel, getLocale, getLocalizer, getMarkup, getMarkupAttributes, getMarkupId, getMarkupId, getMarkupIdFromMarkup, getMarkupIdImpl, getMarkupSourcingStrategy, getMarkupTag, getMetaData, getModelComparator, getOutputMarkupId, getOutputMarkupPlaceholderTag, getPage, getPageRelativePath, getParent, getPath, getRenderBodyOnly, getRequest, getRequestCycle, getRequestFlag, getResponse, getSession, getSizeInBytes, getStatelessHint, getString, getString, getString, getStyle, getVariation, hasBeenRendered, hasErrorMessage, hasFeedbackMessage, info, initModel, internalOnModelChanged, internalRenderComponent, internalRenderHead, isActionAuthorized, isAuto, isBehaviorAccepted, isEnableAllowed, isEnabled, isEnabledInHierarchy, isIgnoreAttributeModifier, isInitialized, isRenderAllowed, isRendering, isStateless, isVersioned, isVisibilityAllowed, isVisible, isVisibleInHierarchy, markRendering, modelChanged, modelChanging, onAfterRender, onBeforeRender, onEvent, onModelChanged, onModelChanging, onReAdd, onRemove, redirectToInterceptPage, remove, remove, render, renderComponentTag, rendered, renderHead, renderPart, renderPlaceholderTag, replaceComponentTagBody, replaceWith, sameInnermostModel, sameInnermostModel, send, setAuto, setDefaultModelObject, setEnabled, setEscapeModelStrings, setFlag, setIgnoreAttributeModifier, setMarkup, setMarkupId, setMarkupIdImpl, setMetaData, setOutputMarkupId, setOutputMarkupPlaceholderTag, setParent, setRenderBodyOnly, setResponsePage, setResponsePage, setResponsePage, setVersioned, setVisibilityAllowed, setVisible, success, urlFor, urlFor, urlFor, urlForListener, urlForListener, visitParents, visitParents, warn, wrapMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.wicket.IQueueRegion
dequeue, newDequeueContextMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
FormGroup
Construct.- Parameters:
id- the wicket component id
-
FormGroup
Construct.- Parameters:
id- the wicket component idlabel- the label
-
FormGroup
Construct.- Parameters:
id- the wicket component id
-
-
Method Details
-
useFormComponentLabel
- Parameters:
value- whether to use form components label as control group label or not- Returns:
- this instance for chaining
-
size
Deprecated.Not supported by Bootstrap 4. UseInputBehavior.size(InputBehavior.Size)on theFormComponentinstead.sets the size of form-group- Parameters:
size- the size to use- Returns:
- this instance for chaining
-
newFeedbackMessageToCssClassNameTransformer
- Returns:
- new function that transforms a
FeedbackMessageto a css class name
-
newLabel
creates a new label- Parameters:
id- the component idmodel- the content model for this component- Returns:
- new label
-
newFeedbackMessageContainer
creates a new container for a feedback message- Parameters:
id- the component id- Returns:
- new feedback message container
-
newHelpLabel
creates a new help label that contains a help message for the form field. This field will be set to invisible if there is no content.- Parameters:
id- the component idmodel- the content model for this component- Returns:
- new help label
-
onComponentTag
- Overrides:
onComponentTagin classComponent
-
onInitialize
protected void onInitialize()- Overrides:
onInitializein classMarkupContainer
-
addOutputMarkupId
sets the output markup id flag to true for all given formComponents. This is necessary to reference them in a "for" attribute on client side.- Parameters:
formComponents- the form components to add the output markup id
-
onConfigure
protected void onConfigure()- Overrides:
onConfigurein classBorder
-