public class HTML5Attributes extends Behavior
Modifier and Type | Class and Description |
---|---|
static class |
HTML5Attributes.InstantiationListener
A listener to instantiations of
FormComponent s to add HTML5 attributes. |
Constructor and Description |
---|
HTML5Attributes() |
Modifier and Type | Method and Description |
---|---|
protected void |
onButton(Button button,
ComponentTag tag)
Writes HTML5 attributes for
Button s:
formnovalidate if Button.getDefaultFormProcessing() returns false
|
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 for
AbstractTextComponent inputs:
required if component FormComponent.isRequired()
placeholder for LabeledWebMarkupContainer.getLabel()
pattern for AbstractTextComponent s with a PatternValidator
|
afterRender, beforeRender, bind, canCallListenerInterface, detach, getStatelessHint, isEnabled, isTemporary, onConfigure, onEvent, onException, onRemove, renderHead, unbind
public void onComponentTag(Component component, ComponentTag tag)
Behavior
onComponentTag
in class Behavior
component
- the component that renders this tag currentlytag
- the tag that is renderedprotected void onInput(AbstractTextComponent<?> input, ComponentTag tag)
AbstractTextComponent
inputs:
required
if component FormComponent.isRequired()
placeholder
for LabeledWebMarkupContainer.getLabel()
pattern
for AbstractTextComponent
s with a PatternValidator
input
- input componenttag
- component tagprotected void onButton(Button button, ComponentTag tag)
Button
s:
formnovalidate
if Button.getDefaultFormProcessing()
returns false
button
- button componenttag
- component tagCopyright © 2006–2020 Apache Software Foundation. All rights reserved.