org.apache.wicket.markup.html
Class HTML5Attributes

java.lang.Object
  extended by org.apache.wicket.behavior.Behavior
      extended by org.apache.wicket.markup.html.HTML5Attributes
All Implemented Interfaces:
Serializable, IComponentAwareEventSink, IComponentAwareHeaderContributor, IClusterable

public class HTML5Attributes
extends Behavior

Behavior which renders HTML5 attributes.

See Also:
onInput(AbstractTextComponent, ComponentTag), onButton(Button, ComponentTag), Serialized Form

Nested Class Summary
static class HTML5Attributes.InstantiationListener
          A listener to instantiations of FormComponents to add HTML5 attributes.
 
Constructor Summary
HTML5Attributes()
           
 
Method Summary
protected  void onButton(Button button, ComponentTag tag)
          Writes HTML5 attributes for Buttons: 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 AbstractTextComponents with a PatternValidator
 
Methods inherited from class org.apache.wicket.behavior.Behavior
afterRender, beforeRender, bind, canCallListenerInterface, detach, getStatelessHint, isEnabled, isTemporary, onConfigure, onEvent, onException, onRemove, renderHead, unbind
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTML5Attributes

public HTML5Attributes()
Method Detail

onComponentTag

public void onComponentTag(Component component,
                           ComponentTag tag)
Description copied from class: Behavior
Called any time a component that has this behavior registered is rendering the component tag.

Overrides:
onComponentTag in class Behavior
Parameters:
component - the component that renders this tag currently
tag - the tag that is rendered

onInput

protected void onInput(AbstractTextComponent<?> input,
                       ComponentTag tag)
Writes HTML5 attributes for AbstractTextComponent inputs:

onButton

protected void onButton(Button button,
                        ComponentTag tag)
Writes HTML5 attributes for Buttons:


Copyright © 2006–2016 Apache Software Foundation. All rights reserved.