info.magnolia.templating.elements
Class ComponentElement

java.lang.Object
  extended by info.magnolia.templating.elements.AbstractTemplatingElement
      extended by info.magnolia.templating.elements.AbstractContentTemplatingElement
          extended by info.magnolia.templating.elements.ComponentElement
All Implemented Interfaces:
TemplatingElement

public class ComponentElement
extends AbstractContentTemplatingElement

Renders a piece of content.


Constructor Summary
ComponentElement(ServerConfiguration server, RenderingContext renderingContext, RenderingEngine renderingEngine, TemplateDefinitionAssignment templateDefinitionAssignment)
           
 
Method Summary
 void begin(Appendable out)
           
 void end(Appendable out)
          Override this method if you need to "do something" once the component is rendered, i.e cleanup the context.
 Map<String,Object> getContextAttributes()
           
 Boolean getEditable()
           
 boolean isRenderEditbar()
           
protected  boolean renderComments()
          Override to set conditions for rendering of cms:comments.
 void setContextAttributes(Map<String,Object> contextAttributes)
           
 void setDialog(String dialog)
           
 void setEditable(Boolean editable)
           
 void setRenderEditbar(boolean renderEditbar)
           
 
Methods inherited from class info.magnolia.templating.elements.AbstractContentTemplatingElement
getContent, getNodeIdentifier, getNodePath, getPassedContent, getPath, getWorkspace, restoreAttributesInWebContext, setAttributesInWebContext, setContent, setNodeIdentifier, setPath, setWorkspace
 
Methods inherited from class info.magnolia.templating.elements.AbstractTemplatingElement
currentContent, getDefinitionMessage, getInterfaceMessage, getRenderingContext, getServer, isAdmin
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComponentElement

@Inject
public ComponentElement(ServerConfiguration server,
                               RenderingContext renderingContext,
                               RenderingEngine renderingEngine,
                               TemplateDefinitionAssignment templateDefinitionAssignment)
Method Detail

begin

public void begin(Appendable out)
           throws IOException,
                  RenderException
Specified by:
begin in interface TemplatingElement
Overrides:
begin in class AbstractTemplatingElement
Throws:
IOException
RenderException

end

public void end(Appendable out)
         throws IOException,
                RenderException
Description copied from class: AbstractTemplatingElement
Override this method if you need to "do something" once the component is rendered, i.e cleanup the context.

Specified by:
end in interface TemplatingElement
Overrides:
end in class AbstractTemplatingElement
Throws:
IOException
RenderException

getContextAttributes

public Map<String,Object> getContextAttributes()

setContextAttributes

public void setContextAttributes(Map<String,Object> contextAttributes)

setDialog

public void setDialog(String dialog)

setEditable

public void setEditable(Boolean editable)

getEditable

public Boolean getEditable()

isRenderEditbar

public boolean isRenderEditbar()

setRenderEditbar

public void setRenderEditbar(boolean renderEditbar)

renderComments

protected boolean renderComments()
Description copied from class: AbstractContentTemplatingElement
Override to set conditions for rendering of cms:comments.

Overrides:
renderComments in class AbstractContentTemplatingElement


Copyright © 2003–2014 Magnolia International Ltd.. All rights reserved.