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

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

public class FragmentMarkupSourcingStrategy
extends AbstractMarkupSourcingStrategy

Author:
Juergen Donnerstag

Constructor Summary
FragmentMarkupSourcingStrategy(String markupId, MarkupContainer markupProvider)
          Constructor.
 
Method Summary
 IMarkupFragment chooseMarkup(Component component)
          Get the markup stream which shall be used to search for the fragment
 IMarkupFragment getMarkup(MarkupContainer container, Component child)
          Will replace the respective component's method. However by returning null, the component's method will be called.
protected  MarkupContainer getMarkupProvider(Component component)
          Returns markup provider associated with this fragment
 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.

 
Methods inherited from class org.apache.wicket.markup.html.panel.AbstractMarkupSourcingStrategy
onComponentTag, renderHead
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FragmentMarkupSourcingStrategy

public FragmentMarkupSourcingStrategy(String markupId,
                                      MarkupContainer markupProvider)
Constructor.

Parameters:
markupId - The associated id of the associated markup fragment
markupProvider - The component whose markup contains the fragment's markup
Method Detail

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
Overrides:
onComponentTagBody in class AbstractMarkupSourcingStrategy
Parameters:
component - The component calling the strategy
See Also:
Component.onComponentTagBody(MarkupStream, ComponentTag)

getMarkupProvider

protected final MarkupContainer getMarkupProvider(Component component)
Returns markup provider associated with this fragment

Parameters:
component -
Returns:
markup provider

chooseMarkup

public IMarkupFragment chooseMarkup(Component component)
Get the markup stream which shall be used to search for the fragment

Parameters:
component -
Returns:
The markup stream to be used to find the fragment markup

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
Specified by:
getMarkup in class AbstractMarkupSourcingStrategy
Parameters:
container - The parent containing the child.
child - The componen to find the markup for.
Returns:
markup fragment
See Also:
MarkupContainer.getMarkup(Component)


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