Class InputGroupFormElement
java.lang.Object
com.foreach.across.modules.web.ui.elements.ContainerViewElement
com.foreach.across.modules.web.ui.elements.AbstractNodeViewElement
com.foreach.across.modules.bootstrapui.elements.InputGroupFormElement
- All Implemented Interfaces:
ConfigurablePlaceholderText,FormControlElement,FormControlElement.Proxy,FormInputElement,com.foreach.across.modules.web.ui.elements.HtmlViewElement,com.foreach.across.modules.web.ui.MutableViewElement,com.foreach.across.modules.web.ui.ViewElement
- Direct Known Subclasses:
DateTimeFormElement
public class InputGroupFormElement
extends com.foreach.across.modules.web.ui.elements.AbstractNodeViewElement
implements FormControlElement.Proxy, ConfigurablePlaceholderText
Represents a bootstrap input group, wrapping a control and allowing left or right addon.
The main control should be added as a child to the input group, the addons can be set through properties
and the corresponding addon class (input-group-addon of input-group-btn will be set.
A default TextboxFormElement control is set for the input group as input groups are usually
expected to be used with textboxes. The InputGroupFormElement itself is also a FormControlElement
that proxies the control. If the control is not of type FormControlElement the specific
FormControlElement method calls will fail.
- Author:
- Arne Vandamme
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.foreach.across.modules.bootstrapui.elements.FormControlElement
FormControlElement.ProxyNested classes/interfaces inherited from interface com.foreach.across.modules.web.ui.elements.HtmlViewElement
com.foreach.across.modules.web.ui.elements.HtmlViewElement.FunctionsNested classes/interfaces inherited from interface com.foreach.across.modules.web.ui.MutableViewElement
com.foreach.across.modules.web.ui.MutableViewElement.FunctionsNested classes/interfaces inherited from interface com.foreach.across.modules.web.ui.ViewElement
com.foreach.across.modules.web.ui.ViewElement.Wither<T extends com.foreach.across.modules.web.ui.ViewElement>, com.foreach.across.modules.web.ui.ViewElement.WitherGetter<T extends com.foreach.across.modules.web.ui.ViewElement,U extends Object>, com.foreach.across.modules.web.ui.ViewElement.WitherRemover<T extends com.foreach.across.modules.web.ui.ViewElement>, com.foreach.across.modules.web.ui.ViewElement.WitherSetter<T extends com.foreach.across.modules.web.ui.ViewElement> -
Field Summary
Fields inherited from class com.foreach.across.modules.web.ui.elements.ContainerViewElement
ELEMENT_TYPE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddAttributes(Map<String, Object> attributes) addChild(com.foreach.across.modules.web.ui.ViewElement element) addChildren(Collection<? extends com.foreach.across.modules.web.ui.ViewElement> elements) addCssClass(String... cssClass) addFirstChild(com.foreach.across.modules.web.ui.ViewElement element) static com.foreach.across.modules.web.ui.ViewElement.WitherSetter<InputGroupFormElement>append(com.foreach.across.modules.web.ui.ViewElement... elements) Append a number of view elements.<U extends com.foreach.across.modules.web.ui.ViewElement>
InputGroupFormElementapplyUnsafe(Consumer<U> consumer) static com.foreach.across.modules.web.ui.ViewElement.WitherSetter<InputGroupFormElement>control(com.foreach.across.modules.web.ui.ViewElement... elements) Set the input group control, replacing the default textbox.com.foreach.across.modules.web.ui.ViewElement<V extends com.foreach.across.modules.web.ui.ViewElement>
VList<com.foreach.across.modules.web.ui.ViewElement>com.foreach.across.modules.web.ui.ViewElement<V extends com.foreach.across.modules.web.ui.ViewElement>
VgetControl(Class<V> controlType) com.foreach.across.modules.web.ui.ViewElement<V extends com.foreach.across.modules.web.ui.ViewElement>
VgetPrepend(Class<V> addonType) booleanbooleanbooleanbooleanstatic com.foreach.across.modules.web.ui.ViewElement.WitherSetter<InputGroupFormElement>prepend(com.foreach.across.modules.web.ui.ViewElement... elements) Prepend a number of view elements.remove(com.foreach.across.modules.web.ui.ViewElement.WitherRemover... functions) removeAttribute(String attributeName) removeCssClass(String... cssClass) set(com.foreach.across.modules.web.ui.ViewElement.WitherSetter... setters) setAppend(com.foreach.across.modules.web.ui.ViewElement append) setAttribute(String attributeName, Object attributeValue) setAttributes(Map<String, Object> attributes) setControl(com.foreach.across.modules.web.ui.ViewElement control) setControlName(String controlName) setCustomTemplate(String customTemplate) setDisabled(boolean disabled) protected InputGroupFormElementsetElementType(String elementType) setPlaceholder(String placeholder) setPrepend(com.foreach.across.modules.web.ui.ViewElement prepend) setReadonly(boolean readonly) setRequired(boolean required) protected InputGroupFormElementsetTagName(String tagName) Methods inherited from class com.foreach.across.modules.web.ui.elements.AbstractNodeViewElement
get, getAttribute, getAttribute, getAttributes, getHtmlId, getTagName, hasAttribute, hasCssClass, returnIfTypeMethods inherited from class com.foreach.across.modules.web.ui.elements.ContainerViewElement
elementStream, find, find, findAll, findAll, findAll, findOrSelf, findOrSelf, flatStream, getCustomTemplate, getElementType, getName, removeAllFromTree, removeChild, removeFromTree, removeFromTreeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.foreach.across.modules.web.ui.elements.HtmlViewElement
getAttribute, getAttribute, getAttributes, getHtmlId, getTagName, hasAttribute, hasCssClassMethods inherited from interface com.foreach.across.modules.web.ui.ViewElement
get, getCustomTemplate, getElementType, getName, matches
-
Constructor Details
-
InputGroupFormElement
public InputGroupFormElement()
-
-
Method Details
-
getPrepend
-
getAppend
-
setPlaceholder
- Specified by:
setPlaceholderin interfaceConfigurablePlaceholderText
-
getPlaceholder
- Specified by:
getPlaceholderin interfaceConfigurablePlaceholderText
-
getControl
-
isDisabled
public boolean isDisabled()- Specified by:
isDisabledin interfaceFormInputElement
-
setDisabled
- Specified by:
setDisabledin interfaceFormInputElement
-
isReadonly
public boolean isReadonly()- Specified by:
isReadonlyin interfaceFormControlElement
-
setReadonly
- Specified by:
setReadonlyin interfaceFormControlElement
-
isRequired
public boolean isRequired()- Specified by:
isRequiredin interfaceFormControlElement
-
setRequired
- Specified by:
setRequiredin interfaceFormControlElement
-
getControlName
- Specified by:
getControlNamein interfaceFormInputElement
-
setControlName
- Specified by:
setControlNamein interfaceFormInputElement
-
getChildren
- Overrides:
getChildrenin classcom.foreach.across.modules.web.ui.elements.ContainerViewElement
-
hasChildren
public boolean hasChildren()- Overrides:
hasChildrenin classcom.foreach.across.modules.web.ui.elements.ContainerViewElement
-
addCssClass
- Specified by:
addCssClassin interfacecom.foreach.across.modules.web.ui.elements.HtmlViewElement- Overrides:
addCssClassin classcom.foreach.across.modules.web.ui.elements.AbstractNodeViewElement
-
removeCssClass
- Specified by:
removeCssClassin interfacecom.foreach.across.modules.web.ui.elements.HtmlViewElement- Overrides:
removeCssClassin classcom.foreach.across.modules.web.ui.elements.AbstractNodeViewElement
-
setAttributes
- Specified by:
setAttributesin interfacecom.foreach.across.modules.web.ui.elements.HtmlViewElement- Overrides:
setAttributesin classcom.foreach.across.modules.web.ui.elements.AbstractNodeViewElement
-
setAttribute
- Specified by:
setAttributein interfacecom.foreach.across.modules.web.ui.elements.HtmlViewElement- Overrides:
setAttributein classcom.foreach.across.modules.web.ui.elements.AbstractNodeViewElement
-
addAttributes
- Specified by:
addAttributesin interfacecom.foreach.across.modules.web.ui.elements.HtmlViewElement- Overrides:
addAttributesin classcom.foreach.across.modules.web.ui.elements.AbstractNodeViewElement
-
removeAttribute
- Specified by:
removeAttributein interfacecom.foreach.across.modules.web.ui.elements.HtmlViewElement- Overrides:
removeAttributein classcom.foreach.across.modules.web.ui.elements.AbstractNodeViewElement
-
setName
- Specified by:
setNamein interfacecom.foreach.across.modules.web.ui.MutableViewElement- Overrides:
setNamein classcom.foreach.across.modules.web.ui.elements.AbstractNodeViewElement
-
setCustomTemplate
- Specified by:
setCustomTemplatein interfacecom.foreach.across.modules.web.ui.MutableViewElement- Overrides:
setCustomTemplatein classcom.foreach.across.modules.web.ui.elements.AbstractNodeViewElement
-
setElementType
- Overrides:
setElementTypein classcom.foreach.across.modules.web.ui.elements.AbstractNodeViewElement
-
addChild
- Overrides:
addChildin classcom.foreach.across.modules.web.ui.elements.AbstractNodeViewElement
-
addChildren
public InputGroupFormElement addChildren(Collection<? extends com.foreach.across.modules.web.ui.ViewElement> elements) - Overrides:
addChildrenin classcom.foreach.across.modules.web.ui.elements.AbstractNodeViewElement
-
addFirstChild
- Overrides:
addFirstChildin classcom.foreach.across.modules.web.ui.elements.AbstractNodeViewElement
-
clearChildren
- Overrides:
clearChildrenin classcom.foreach.across.modules.web.ui.elements.AbstractNodeViewElement
-
apply
public InputGroupFormElement apply(Consumer<com.foreach.across.modules.web.ui.elements.ContainerViewElement> consumer) - Overrides:
applyin classcom.foreach.across.modules.web.ui.elements.AbstractNodeViewElement
-
applyUnsafe
public <U extends com.foreach.across.modules.web.ui.ViewElement> InputGroupFormElement applyUnsafe(Consumer<U> consumer) - Overrides:
applyUnsafein classcom.foreach.across.modules.web.ui.elements.AbstractNodeViewElement
-
setTagName
- Overrides:
setTagNamein classcom.foreach.across.modules.web.ui.elements.AbstractNodeViewElement
-
setHtmlId
- Specified by:
setHtmlIdin interfacecom.foreach.across.modules.web.ui.elements.HtmlViewElement- Overrides:
setHtmlIdin classcom.foreach.across.modules.web.ui.elements.AbstractNodeViewElement
-
set
public InputGroupFormElement set(com.foreach.across.modules.web.ui.ViewElement.WitherSetter... setters) - Specified by:
setin interfacecom.foreach.across.modules.web.ui.elements.HtmlViewElement- Specified by:
setin interfacecom.foreach.across.modules.web.ui.MutableViewElement- Specified by:
setin interfacecom.foreach.across.modules.web.ui.ViewElement- Overrides:
setin classcom.foreach.across.modules.web.ui.elements.AbstractNodeViewElement
-
remove
public InputGroupFormElement remove(com.foreach.across.modules.web.ui.ViewElement.WitherRemover... functions) - Specified by:
removein interfacecom.foreach.across.modules.web.ui.elements.HtmlViewElement- Specified by:
removein interfacecom.foreach.across.modules.web.ui.MutableViewElement- Specified by:
removein interfacecom.foreach.across.modules.web.ui.ViewElement- Overrides:
removein classcom.foreach.across.modules.web.ui.elements.AbstractNodeViewElement
-
prepend
public static com.foreach.across.modules.web.ui.ViewElement.WitherSetter<InputGroupFormElement> prepend(com.foreach.across.modules.web.ui.ViewElement... elements) Prepend a number of view elements. If a single text view element is added, it will be wrapped inside a span with class input-group-text. -
append
public static com.foreach.across.modules.web.ui.ViewElement.WitherSetter<InputGroupFormElement> append(com.foreach.across.modules.web.ui.ViewElement... elements) Append a number of view elements. If a single text view element is added, it will be wrapped inside a span with class input-group-text. -
control
public static com.foreach.across.modules.web.ui.ViewElement.WitherSetter<InputGroupFormElement> control(com.foreach.across.modules.web.ui.ViewElement... elements) Set the input group control, replacing the default textbox. -
getPrepend
public com.foreach.across.modules.web.ui.ViewElement getPrepend() -
getAppend
public com.foreach.across.modules.web.ui.ViewElement getAppend() -
getControl
public com.foreach.across.modules.web.ui.ViewElement getControl()- Specified by:
getControlin interfaceFormControlElement.Proxy- Returns:
- the actual control
-
setPrepend
- Returns:
this.
-
setAppend
- Returns:
this.
-
setControl
- Returns:
this.
-