|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.wicket.markup.MarkupFactory
org.wicketstuff.htmlcompressor.HtmlCompressingMarkupFactory
public class HtmlCompressingMarkupFactory
This markup factory can be used to compress (minify) html markup.
To use it do the followings in your wicket Application:
@Override
protected void init()
{
super.init();
getMarkupSettings().setMarkupFactory(new HtmlCompressingMarkupFactory());
}
Or if we want to preconfigure the compressor used:
@Override
protected void init()
{
super.init();
HtmlCompressor compressor = new HtmlCompressor();
compressor.setPreserveLineBreaks(true);
getMarkupSettings().setMarkupFactory(new HtmlCompressingMarkupFactory(compressor));
}
Overrides newXmlPullParser() to use HtmlCompressingXmlPullParser.
| Constructor Summary | |
|---|---|
HtmlCompressingMarkupFactory()
Constructor. |
|
HtmlCompressingMarkupFactory(com.googlecode.htmlcompressor.compressor.HtmlCompressor compressor)
Constructor. |
|
| Method Summary | |
|---|---|
com.googlecode.htmlcompressor.compressor.HtmlCompressor |
getCompressor()
Getter for the html compressor. |
protected IXmlPullParser |
newXmlPullParser()
|
| Methods inherited from class org.apache.wicket.markup.MarkupFactory |
|---|
checkMarkupType, get, getContainerClass, getMarkup, getMarkup, getMarkupCache, getMarkupLoader, getMarkupResourceStream, getMarkupResourceStreamProvider, hasMarkupCache, loadMarkup, newMarkupParser, onAppendMarkupFilter |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HtmlCompressingMarkupFactory()
public HtmlCompressingMarkupFactory(com.googlecode.htmlcompressor.compressor.HtmlCompressor compressor)
compressor - used for markup compressing, can be null| Method Detail |
|---|
protected IXmlPullParser newXmlPullParser()
newXmlPullParser in class MarkupFactorypublic com.googlecode.htmlcompressor.compressor.HtmlCompressor getCompressor()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||