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

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

public class PanelMarkupSourcingStrategy
extends AssociatedMarkupSourcingStrategy

The Panel components markup sourcing strategy.

The strategy supports two modes on how to handle the body markup. A typical Panel will ignore the body markup and replace it with the associated markup. The body markup is allowed to have raw markup only and no Wicket components. But e.g. a Border component will associate the body markup with a Body component which renders the markup including all any number of child Components.

Author:
Juergen Donnerstag

Constructor Summary
PanelMarkupSourcingStrategy(boolean allowWicketComponentsInBodyMarkup)
          Constructor.
PanelMarkupSourcingStrategy(java.lang.String wicketTagName, boolean allowWicketComponentsInBodyMarkup)
          Constructor.
 
Method Summary
 void onComponentTagBody(Component component, MarkupStream markupStream, ComponentTag openTag)
          Skip the panel's body markup which is expected to contain raw markup only (no wicket components) and which will be ignored / removed.
 
Methods inherited from class org.apache.wicket.markup.html.panel.AssociatedMarkupSourcingStrategy
findMarkupInAssociatedFileHeader, getMarkup, onComponentTag, renderAssociatedMarkup, renderHead, renderHeadFromAssociatedMarkupFile
 
Methods inherited from class org.apache.wicket.markup.html.panel.AbstractMarkupSourcingStrategy
searchMarkupInTransparentResolvers
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PanelMarkupSourcingStrategy

public PanelMarkupSourcingStrategy(java.lang.String wicketTagName,
                                   boolean allowWicketComponentsInBodyMarkup)
Constructor.

Parameters:
wicketTagName - The tag name for <wicket:'name' ..>. Please note that any such tag must have been registed via WicketTagIdentifier.registerWellKnownTagName('name');
allowWicketComponentsInBodyMarkup - False for Panel and true for Border components. If Panel than the body markup should only contain raw markup, which is ignored (removed), but no Wicket Component. With Border components, the body markup will be associated with the Body Component.

PanelMarkupSourcingStrategy

public PanelMarkupSourcingStrategy(boolean allowWicketComponentsInBodyMarkup)
Constructor.

Parameters:
allowWicketComponentsInBodyMarkup - False for Panel and true for Border components. If Panel than the body markup should only contain raw markup, which is ignored (removed), but no Wicket Component. With Border components, the body markup will be associated with the Body Component.
Method Detail

onComponentTagBody

public void onComponentTagBody(Component component,
                               MarkupStream markupStream,
                               ComponentTag openTag)
Skip the panel's body markup which is expected to contain raw markup only (no wicket components) and which will be ignored / removed. It'll be replaced with the content of the associated markup file.

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


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