info.magnolia.module.templatingcomponents.components
Class SingletonParagraphBar
java.lang.Object
info.magnolia.module.templatingcomponents.components.AbstractAuthoringUiComponent
info.magnolia.module.templatingcomponents.components.SingletonParagraphBar
- All Implemented Interfaces:
- AuthoringUiComponent
public class SingletonParagraphBar
- extends AbstractAuthoringUiComponent
An hybrid between a new bar and an edit bar for non-moveable paragraphs: it's either added by the editor, edited, or removed.
This is currently meant to be used in conjunction with the regular edit bar component: if the request content is present,
wrappers should render their content (which should render said paragraph with an edit bar), and if not, this
renders a "new bar".
- Version:
- $Revision: $ ($Author: $)
- Author:
- gjoseph
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SingletonParagraphBar
public SingletonParagraphBar(ServerConfiguration server,
AggregationState aggregationState)
isInSingleton
public static boolean isInSingleton()
- Utility method for other components to determine if they are being rendered inside a SingletonParagraphBar.
make
public static SingletonParagraphBar make(ServerConfiguration serverCfg,
AggregationState aggState,
String contentName,
List<String> allowedParagraphs,
String enableButtonLabel)
- Parameters:
serverCfg
- aggState
- contentName
- the name of the node which contains (or will contain) the singleton paragraph; this is a child node of AbstractAuthoringUiComponent.currentContent()
.allowedParagraphs
- the list of paragraph definitions (their names) that are allow to be added by this componentenableButtonLabel
- if null, default will be used
setContentName
public void setContentName(String contentName)
setAllowedParagraphs
public void setAllowedParagraphs(List<String> allowedParagraphs)
setEnableButtonLabel
public void setEnableButtonLabel(String enableButtonLabel)
doRender
protected void doRender(Appendable out)
throws IOException,
javax.jcr.RepositoryException
- Specified by:
doRender
in class AbstractAuthoringUiComponent
- Throws:
IOException
javax.jcr.RepositoryException
postRender
public void postRender()
- Description copied from class:
AbstractAuthoringUiComponent
- Override this method if you need to "do something" once the component is rendered, i.e cleanup the context.
- Specified by:
postRender
in interface AuthoringUiComponent
- Overrides:
postRender
in class AbstractAuthoringUiComponent
Copyright © 2003-2012 Magnolia International Ltd.. All Rights Reserved.