Module wicket.bootstrap.extensions
Class InputMaskConfig
java.lang.Object
de.agilecoders.wicket.jquery.CombinableConfig
de.agilecoders.wicket.jquery.AbstractConfig
de.agilecoders.wicket.extensions.markup.html.bootstrap.inputmask.InputMaskConfig
- All Implemented Interfaces:
de.agilecoders.wicket.jquery.Config,Serializable,IClusterable
public class InputMaskConfig
extends de.agilecoders.wicket.jquery.AbstractConfig
- Author:
- Jan Ferko
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumEnumeration of possible caret position. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionautoUnmask(boolean autoUnmask) Automatically unmask the value when retrieved.clearIncomplete(boolean clearIncomplete) Clear the incomplete input on blur.clearMarkOnLostFocus(boolean clearMaskOnFocus) Remove the empty mask on blur or when not empty removes the optional trailing part.greedy(boolean greedy) Toggle to allocate as much possible or the opposite.insertMode(boolean insertMode) Toggle to insert or overwrite input.Set mask for the input.nullable(boolean nullable) Return nothing when the user hasn't entered anything.numericInput(boolean numericInput) Numeric input direction.placeholder(String placeholder) Sets mask placeholder.Positioning of the caret on click.positionCaretOnTab(boolean positionCaretOnTab) When enabled the caret position is set after the latest valid position on TAB.Sets regular expression to use as a mask.removeMaskOnSubmit(boolean removeMaskOnSubmit) Remove the mask before submitting the form.repeat(int repeat) Repeat the mask definition x-times.rightAlign(boolean rightAlign) Align the input to the right.showMaskOnFocus(boolean showMaskOnFocus) Shows the mask when the input gets focus.showMaskOnHover(boolean showMaskOnHover) Shows the mask when hovering the mouse.tabThrough(boolean tabThrough) Allows for tabbing through the different parts of the masked field.undoOnEscape(boolean undoOnEscape) Make escape behave like undo.Methods inherited from class de.agilecoders.wicket.jquery.AbstractConfig
all, contains, get, getString, isEmpty, newKey, put, remove, toJsonString, wrapMethods inherited from class de.agilecoders.wicket.jquery.CombinableConfig
combine, withFallback
-
Constructor Details
-
InputMaskConfig
public InputMaskConfig()
-
-
Method Details
-
mask
Set mask for the input.- Parameters:
mask- the mask for the input.- Returns:
- this config instance
-
placeholder
Sets mask placeholder.- Parameters:
placeholder- The mask placeholder.- Returns:
- this config instance
-
regex
Sets regular expression to use as a mask. When using shorthands be aware that you need to double escape them.- Parameters:
regex- The regular expression to use as a mask.- Returns:
- this config instance
-
repeat
Repeat the mask definition x-times.- Parameters:
repeat- the number of times mask is repeated.- Returns:
- this config instance
-
greedy
Toggle to allocate as much possible or the opposite.- Parameters:
greedy- Toggle to allocate as much possible or the opposite.- Returns:
- this config instance
-
autoUnmask
Automatically unmask the value when retrieved.- Parameters:
autoUnmask- Toggle automatic unmasking when value is retrieved.- Returns:
- this config instance
-
removeMaskOnSubmit
Remove the mask before submitting the form.- Parameters:
removeMaskOnSubmit- Toggle mask removing before form submitting- Returns:
- this config instace
-
clearMarkOnLostFocus
Remove the empty mask on blur or when not empty removes the optional trailing part.- Parameters:
clearMaskOnFocus- Toggle to empty mask on blur or optional trailing part if mask is empty- Returns:
- this config instance
-
insertMode
Toggle to insert or overwrite input. This option can be altered by pressing the Insert key.- Parameters:
insertMode- Toggle to insert or overwrite input- Returns:
- this config instance
-
clearIncomplete
Clear the incomplete input on blur.- Parameters:
clearIncomplete- Toggle to clear the incomplete input on blur.- Returns:
- this config instance
-
showMaskOnFocus
Shows the mask when the input gets focus.- Parameters:
showMaskOnFocus- Toggle to show the mask when inpus gets focus.- Returns:
- this config instance
-
showMaskOnHover
Shows the mask when hovering the mouse.- Parameters:
showMaskOnHover- Toggle to show the mask when hovering the mouse.- Returns:
- this config instance
-
numericInput
Numeric input direction. Keeps the caret at the end.- Parameters:
numericInput- Toggle to keep the caret at the end- Returns:
- this config instance
-
rightAlign
Align the input to the right. This is only applied in combination op the numericInput option or the dir-attribute.- Parameters:
rightAlign- Toggle right input alignment- Returns:
- this config instance
-
undoOnEscape
Make escape behave like undo. (ctrl-Z) Pressing escape reverts the value to the value before focus.- Parameters:
undoOnEscape- Toggle to make escape behave like undo- Returns:
- this config instance
-
positionCaretOnTab
When enabled the caret position is set after the latest valid position on TAB.- Parameters:
positionCaretOnTab- Enable to set caret position after the latest valid position on TAB- Returns:
- this config instance
-
tabThrough
Allows for tabbing through the different parts of the masked field.- Parameters:
tabThrough- Toggle to allow for tabbing through the different parts of the masked field.- Returns:
- this config instance
-
nullable
Return nothing when the user hasn't entered anything.- Parameters:
nullable- Toggle to return nothing if user hasn't entered anything- Returns:
- this config instance
-
positionCaretOnClick
Positioning of the caret on click.- Parameters:
position- position of caret on click- Returns:
- this config instance
-