Package org.apache.wicket.markup.html
Class HTML5Attributes
java.lang.Object
org.apache.wicket.behavior.Behavior
org.apache.wicket.markup.html.HTML5Attributes
- All Implemented Interfaces:
Serializable
,IComponentAwareEventSink
,IComponentAwareHeaderContributor
,IClusterable
Behavior which renders HTML5 attributes.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
A listener to instantiations ofFormComponent
s to add HTML5 attributes. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
onButton
(Button button, ComponentTag tag) Writes HTML5 attributes forButton
s:formnovalidate
ifButton.getDefaultFormProcessing()
returnsfalse
void
onComponentTag
(Component component, ComponentTag tag) Called any time a component that has this behavior registered is rendering the component tag.protected void
onInput
(AbstractTextComponent<?> input, ComponentTag tag) Writes HTML5 attributes forAbstractTextComponent
inputs:required
if componentFormComponent.isRequired()
placeholder
forLabeledWebMarkupContainer.getLabel()
pattern
forAbstractTextComponent
s with aPatternValidator
Methods inherited from class org.apache.wicket.behavior.Behavior
afterRender, beforeRender, bind, canCallListener, detach, getStatelessHint, isEnabled, isTemporary, onAttribute, onConfigure, onEvent, onException, onRemove, onTag, renderHead, unbind
-
Constructor Details
-
HTML5Attributes
public HTML5Attributes()
-
-
Method Details
-
onComponentTag
Description copied from class:Behavior
Called any time a component that has this behavior registered is rendering the component tag.- Overrides:
onComponentTag
in classBehavior
- Parameters:
component
- the component that renders this tag currentlytag
- the tag that is rendered
-
onInput
Writes HTML5 attributes forAbstractTextComponent
inputs:required
if componentFormComponent.isRequired()
placeholder
forLabeledWebMarkupContainer.getLabel()
pattern
forAbstractTextComponent
s with aPatternValidator
- Parameters:
input
- input componenttag
- component tag
-
onButton
Writes HTML5 attributes forButton
s:formnovalidate
ifButton.getDefaultFormProcessing()
returnsfalse
- Parameters:
button
- button componenttag
- component tag
-