public class SiteMeshWriteRule extends BasicBlockRule
<sitemesh:write property='foo'/>
with the
ContentProperty
being merged into the current document. The body contents of the tag will be
discarded. To get child properties, use a dot notation, e.g. foo.child.grandchild
.SiteMeshContext.getContentToMerge()
tagProcessorContext
Constructor and Description |
---|
SiteMeshWriteRule(SiteMeshContext siteMeshContext) |
Modifier and Type | Method and Description |
---|---|
protected ContentProperty |
getProperty(Content content,
String propertyPath) |
protected void |
processEnd(Tag tag,
Object data)
Called when a block is ended (i.e.
|
protected Object |
processStart(Tag tag)
Called when a block is started (i.e.
|
process
setTagProcessorContext
public SiteMeshWriteRule(SiteMeshContext siteMeshContext)
protected Object processStart(Tag tag) throws IOException
BasicBlockRule
<opening>
tag is encountered).processStart
in class BasicBlockRule
tag
- Opening tag.BasicBlockRule.processEnd(Tag, Object)
. May be null.IOException
protected ContentProperty getProperty(Content content, String propertyPath)
protected void processEnd(Tag tag, Object data) throws IOException
BasicBlockRule
</closing>
tag is encountered).processEnd
in class BasicBlockRule
tag
- Closing tag. This will not have any attributes available (as they are associated
with an opening tag. To get access to the attributes, the BasicBlockRule.processStart(Tag)
method
should access them and return them as data.data
- Data returned from BasicBlockRule.processStart(Tag)
. May be null.IOException
Copyright © 2015. All Rights Reserved.