info.magnolia.cms.taglibs
Class EditButton

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by info.magnolia.cms.taglibs.EditButton
All Implemented Interfaces:
Serializable, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag

public class EditButton
extends javax.servlet.jsp.tagext.TagSupport

Displays an edit button.

Version:
$Revision $ ($Author $)
Author:
Marcel Salathe, Fabrizio Giustina
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
EditButton()
           
 
Method Summary
 int doEndTag()
           
 int doStartTag()
           
 String getDialog()
           
 String getTemplate()
           
 void release()
           
 void setAdminOnly(boolean adminOnly)
          Show only in admin instance, defaults to true.
 void setContentNodeCollectionName(String name)
           
 void setContentNodeName(String name)
          If attribute is not used, a content node with the name of the page will be added.
 void setDialog(String dialog)
          The dialog type.
 void setEditLabel(String label)
          Deprecated. use the label attribute instead.
 void setLabel(String label)
          The button's label.
 void setParagraph(String type)
          Deprecated. since 4.1, use the setDialog() instead.
 void setSmall(boolean small)
          Sets the size of the button, true for small button, false for a large one (defaults to true).
 void setTemplate(String path)
          Set display handler (JSP / Servlet), needs to know the relative path from WEB-INF.
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EditButton

public EditButton()
Method Detail

doStartTag

public int doStartTag()
Specified by:
doStartTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doStartTag in class javax.servlet.jsp.tagext.TagSupport

doEndTag

public int doEndTag()
Specified by:
doEndTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doEndTag in class javax.servlet.jsp.tagext.TagSupport

setContentNodeName

public void setContentNodeName(String name)
If attribute is not used, a content node with the name of the page will be added. If contentNodeName attribute is set but with no value between the quotes, the properties are stored directly under the Web page. If a contentNodeName is set then a content node with the according name will be added.

Parameters:
name - Container name which will be used to access/write content.

setContentNodeCollectionName

public void setContentNodeCollectionName(String name)
Parameters:
name - , container name which will be used to access/write content.

setParagraph

public void setParagraph(String type)
Deprecated. since 4.1, use the setDialog() instead.

The paragraph type.

Parameters:
type - , content type

setDialog

public void setDialog(String dialog)
The dialog type.

Parameters:
type - , content type

getDialog

public String getDialog()

setTemplate

public void setTemplate(String path)
Set display handler (JSP / Servlet), needs to know the relative path from WEB-INF. TODO: deprecate this ???

Parameters:
path - relative to WEB-INF.

setAdminOnly

public void setAdminOnly(boolean adminOnly)
Show only in admin instance, defaults to true.


getTemplate

public String getTemplate()
Returns:
template path

setEditLabel

public void setEditLabel(String label)
Deprecated. use the label attribute instead.


setLabel

public void setLabel(String label)
The button's label. (defaults to "Edit")


setSmall

public void setSmall(boolean small)
Sets the size of the button, true for small button, false for a large one (defaults to true).


release

public void release()
Specified by:
release in interface javax.servlet.jsp.tagext.Tag
Overrides:
release in class javax.servlet.jsp.tagext.TagSupport


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