org.apache.wicket.markup.html.panel
Class DefaultMarkupSourcingStrategy

java.lang.Object
  extended by org.apache.wicket.markup.html.panel.DefaultMarkupSourcingStrategy
All Implemented Interfaces:
IMarkupSourcingStrategy

public final class DefaultMarkupSourcingStrategy
extends Object
implements IMarkupSourcingStrategy

This is a no-op sourcing strategy.

Author:
Juergen Donnerstag

Method Summary
static DefaultMarkupSourcingStrategy get()
           
 IMarkupFragment getMarkup(MarkupContainer container, Component child)
          Will replace the respective component's method.
 void onComponentTag(Component component, ComponentTag tag)
          Will be called in addition to Component.onComponentTag(ComponentTag) and allows the strategy to modify the component's tag or any of the tag attributes.
 void onComponentTagBody(Component component, MarkupStream markupStream, ComponentTag openTag)
          Will replace the respective component's method.
 void renderHead(Component component, HtmlHeaderContainer container)
          Will be called in addition to Component.renderHead(HtmlHeaderContainer) and allows the strategy to contribute to the <head> section of the response.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

get

public static final DefaultMarkupSourcingStrategy get()
Returns:
A singleton of the strategy

onComponentTag

public void onComponentTag(Component component,
                           ComponentTag tag)
Will be called in addition to Component.onComponentTag(ComponentTag) and allows the strategy to modify the component's tag or any of the tag attributes.

Specified by:
onComponentTag in interface IMarkupSourcingStrategy
Parameters:
component - The component calling the strategy
See Also:
Component.onComponentTag(ComponentTag)

onComponentTagBody

public void onComponentTagBody(Component component,
                               MarkupStream markupStream,
                               ComponentTag openTag)
Will replace the respective component's method.

It's perfectly valid to call component.onComponentTagBody(markupStream, openTag) from insight this method.

Specified by:
onComponentTagBody in interface IMarkupSourcingStrategy
Parameters:
component - The component calling the strategy
See Also:
Component.onComponentTagBody(MarkupStream, ComponentTag)

getMarkup

public IMarkupFragment getMarkup(MarkupContainer container,
                                 Component child)
Will replace the respective component's method. However by returning null, the component's method will be called.

Specified by:
getMarkup in interface IMarkupSourcingStrategy
Parameters:
container - The parent containing the child.
child - The componen to find the markup for.
Returns:
markup fragment
See Also:
MarkupContainer.getMarkup(Component)

renderHead

public void renderHead(Component component,
                       HtmlHeaderContainer container)
Will be called in addition to Component.renderHead(HtmlHeaderContainer) and allows the strategy to contribute to the <head> section of the response.

Specified by:
renderHead in interface IMarkupSourcingStrategy
Parameters:
component - The component calling the strategy
See Also:
Component.renderHead(HtmlHeaderContainer)


Copyright © 2004-2011 Apache Software Foundation. All Rights Reserved.