public class ContentBlockExtractingRule extends BasicBlockRule<String>
<content tag='foo'>...</content> and write the contents
to a page property (page.foo).
This is a cheap and cheerful mechanism for embedding multiple components in a page that can be used in different places in decorators.
tagProcessorContext| Constructor and Description |
|---|
ContentBlockExtractingRule(ContentProperty propertyToExport) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
processEnd(Tag tag,
String tagId)
Called when a block is ended (i.e.
|
protected String |
processStart(Tag tag)
Called when a block is started (i.e.
|
processsetTagProcessorContextpublic ContentBlockExtractingRule(ContentProperty propertyToExport)
protected String processStart(Tag tag) throws IOException
BasicBlockRule<opening> tag is encountered).processStart in class BasicBlockRule<String>tag - Opening tag.BasicBlockRule.processEnd(Tag, Object). May be null.IOExceptionprotected void processEnd(Tag tag, String tagId) throws IOException
BasicBlockRule</closing> tag is encountered).processEnd in class BasicBlockRule<String>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.tagId - Data returned from BasicBlockRule.processStart(Tag). May be null.IOExceptionCopyright © 2015. All Rights Reserved.