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:
java.io.Serializable,IComponentAwareEventSink,IComponentAwareHeaderContributor,org.apache.wicket.util.io.IClusterable
public class HTML5Attributes extends Behavior
Behavior which renders HTML5 attributes.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classHTML5Attributes.InstantiationListenerA listener to instantiations ofFormComponents to add HTML5 attributes.
-
Constructor Summary
Constructors Constructor Description HTML5Attributes()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidonButton(Button button, ComponentTag tag)Writes HTML5 attributes forButtons:formnovalidateifButton.getDefaultFormProcessing()returnsfalsevoidonComponentTag(Component component, ComponentTag tag)Called any time a component that has this behavior registered is rendering the component tag.protected voidonInput(AbstractTextComponent<?> input, ComponentTag tag)Writes HTML5 attributes forAbstractTextComponentinputs:requiredif componentFormComponent.isRequired()placeholderforLabeledWebMarkupContainer.getLabel()patternforAbstractTextComponents 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
-
-
-
-
Method Detail
-
onComponentTag
public void onComponentTag(Component component, ComponentTag tag)
Description copied from class:BehaviorCalled any time a component that has this behavior registered is rendering the component tag.- Overrides:
onComponentTagin classBehavior- Parameters:
component- the component that renders this tag currentlytag- the tag that is rendered
-
onInput
protected void onInput(AbstractTextComponent<?> input, ComponentTag tag)
Writes HTML5 attributes forAbstractTextComponentinputs:requiredif componentFormComponent.isRequired()placeholderforLabeledWebMarkupContainer.getLabel()patternforAbstractTextComponents with aPatternValidator
- Parameters:
input- input componenttag- component tag
-
onButton
protected void onButton(Button button, ComponentTag tag)
Writes HTML5 attributes forButtons:formnovalidateifButton.getDefaultFormProcessing()returnsfalse
- Parameters:
button- button componenttag- component tag
-
-