public class MarkupSettings extends Object
compressWhitespace (defaults to false) - Causes pages to render with redundant whitespace removed. Whitespace stripping is not HTML or JavaScript savvy and can conceivably break pages, but should provide significant performance improvements.
stripComments (defaults to false) - Set to true to strip HTML comments during markup loading
Constructor and Description |
---|
MarkupSettings()
Construct
|
Modifier and Type | Method and Description |
---|---|
boolean |
getAutomaticLinking()
If true, automatic link resolution is enabled.
|
boolean |
getCompressWhitespace() |
String |
getDefaultMarkupEncoding() |
MarkupFactory |
getMarkupFactory()
Get the markup factory
|
IMarkupIdGenerator |
getMarkupIdGenerator() |
boolean |
getStripComments() |
boolean |
getStripWicketTags()
Gets whether to remove wicket tags from the output.
|
boolean |
getThrowExceptionOnMissingXmlDeclaration() |
MarkupSettings |
setAutomaticLinking(boolean automaticLinking)
Application default for automatic link resolution.
|
MarkupSettings |
setCompressWhitespace(boolean compressWhitespace)
Turns on whitespace compression.
|
MarkupSettings |
setDefaultMarkupEncoding(String encoding)
Set default encoding for markup files.
|
MarkupSettings |
setMarkupFactory(MarkupFactory factory)
Set a new markup factory
|
MarkupSettings |
setMarkupIdGenerator(IMarkupIdGenerator markupIdGenerator)
Sets a new IMarkupIdGenerator
|
MarkupSettings |
setStripComments(boolean stripComments)
Enables stripping of markup comments denoted in markup by HTML comment tagging.
|
MarkupSettings |
setStripWicketTags(boolean stripWicketTags)
Sets whether to remove wicket tags from the output.
|
MarkupSettings |
setThrowExceptionOnMissingXmlDeclaration(boolean throwException)
If true, an exception is thrown if the markup file does not contain a xml declaration
|
public boolean getAutomaticLinking()
AutoLinkResolver
,
WicketLinkTagHandler
public boolean getCompressWhitespace()
public String getDefaultMarkupEncoding()
public MarkupFactory getMarkupFactory()
public boolean getStripComments()
public boolean getStripWicketTags()
public boolean getThrowExceptionOnMissingXmlDeclaration()
public MarkupSettings setAutomaticLinking(boolean automaticLinking)
automaticLinking
- The automaticLinking to set.this
object for chainingAutoLinkResolver
,
WicketLinkTagHandler
public MarkupSettings setCompressWhitespace(boolean compressWhitespace)
Compression is currently not HTML aware and so it may be possible for whitespace compression to break pages. For this reason, whitespace compression is off by default and you should test your application thoroughly after turning whitespace compression on.
Spaces are removed from markup at markup load time and there should be no effect on page rendering speed. In fact, your pages should render faster with whitespace compression enabled.
compressWhitespace
- The compressWhitespace to set.this
object for chainingpublic MarkupSettings setDefaultMarkupEncoding(String encoding)
encoding
- this
object for chainingpublic MarkupSettings setMarkupFactory(MarkupFactory factory)
factory
- this
object for chainingpublic MarkupSettings setStripComments(boolean stripComments)
stripComments
- True to strip markup comments from rendered pagesthis
object for chainingpublic MarkupSettings setStripWicketTags(boolean stripWicketTags)
stripWicketTags
- whether to remove wicket tags from the outputthis
object for chainingpublic MarkupSettings setThrowExceptionOnMissingXmlDeclaration(boolean throwException)
throwException
- this
object for chainingpublic IMarkupIdGenerator getMarkupIdGenerator()
public MarkupSettings setMarkupIdGenerator(IMarkupIdGenerator markupIdGenerator)
markupIdGenerator
- The generator of markup ids for the componentsthis
object for chainingCopyright © 2006–2022 Apache Software Foundation. All rights reserved.