info.magnolia.module.templating.freemarker
Class RenderableDefinitionModel

java.lang.Object
  extended by freemarker.ext.beans.BeanModel
      extended by info.magnolia.module.templating.freemarker.RenderableDefinitionModel
All Implemented Interfaces:
freemarker.ext.util.WrapperTemplateModel, freemarker.template.AdapterTemplateModel, freemarker.template.TemplateHashModel, freemarker.template.TemplateHashModelEx, freemarker.template.TemplateModel

public class RenderableDefinitionModel
extends freemarker.ext.beans.BeanModel

Make parameters directly available (as if they were properties of the definition itself). i.e, if the RenderableDefinitionModel doesn't have a 'foo' bean-property, one can still do ${def.foo} or ${def['foo']}, which would be the equivalent of ${def.parameters.foo}

Version:
$Id$
Author:
pbracher

Nested Class Summary
static class RenderableDefinitionModel.Factory
          A factory for the enclosing type.
 
Field Summary
 
Fields inherited from class freemarker.ext.beans.BeanModel
object, wrapper
 
Fields inherited from interface freemarker.template.TemplateModel
NOTHING
 
Method Summary
 freemarker.template.TemplateModel get(java.lang.String key)
          Fall back on the parameters' hash model if no bean property has been found.
 
Methods inherited from class freemarker.ext.beans.BeanModel
getAdaptedObject, getWrappedObject, hasPlainGetMethod, invokeGenericGet, isEmpty, keys, keySet, size, toString, unwrap, values, wrap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

get

public freemarker.template.TemplateModel get(java.lang.String key)
                                      throws freemarker.template.TemplateModelException
Fall back on the parameters' hash model if no bean property has been found.

Specified by:
get in interface freemarker.template.TemplateHashModel
Overrides:
get in class freemarker.ext.beans.BeanModel
Throws:
freemarker.template.TemplateModelException


Copyright © 2003-2011 Magnolia International Ltd.. All Rights Reserved.