public class BeanFactoryModelFactory extends Object implements NodeTemplateModelFactory, org.springframework.beans.factory.BeanFactoryAware
NodeTemplateModelFactory that always returns the BeanFactory of the Spring application context
where this factory is configured. Very useful in conjunction with the
SpELStringTemplateCompiler, since you can use SpEL in
the node template just as you would use SpEl in a Spring XML configuration file.| Constructor and Description |
|---|
BeanFactoryModelFactory() |
| Modifier and Type | Method and Description |
|---|---|
Object |
getModel(Item item,
org.dom4j.Node node,
String template)
Returns always the
BeanFactory of the current Spring application context as the model. |
void |
setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
Sets the
BeanFactory of the current Spring application context. |
public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
BeanFactory of the current Spring application context.setBeanFactory in interface org.springframework.beans.factory.BeanFactoryAwarepublic Object getModel(Item item, org.dom4j.Node node, String template)
BeanFactory of the current Spring application context as the model.getModel in interface NodeTemplateModelFactoryitem - the Item whose descriptor contains the specified nodenode - the DOM node whose content is the specified templatetemplate - the actual templateCopyright © 2018 CrafterCMS. All rights reserved.