com.xpn.xwiki.render.macro
Class FieldMacro
java.lang.Object
org.radeox.macro.BaseMacro
org.radeox.macro.BaseLocaleMacro
com.xpn.xwiki.render.macro.FieldMacro
- All Implemented Interfaces:
- Comparable, org.radeox.macro.LocaleMacro, org.radeox.macro.Macro
- Direct Known Subclasses:
- DisplayMacro
Deprecated. It provides limited functionalities compared to the doc.display
scripting API.
@Deprecated
public class FieldMacro
- extends org.radeox.macro.BaseLocaleMacro
Radeox macro for the xwiki 1.0 syntax, which can display a property from an object attached to the current document.
Syntax: {field:text|url|image}
- text
- The name of the field to display. It can be prefixed with the short name of a class in the "XWiki" space,
otherwise the name of the current document is assumed to be the target class.
- mode
- The display mode, one of the modes supported by the
Document.display(String, String)
method: view, rendered, edit, search, hidden. If missing, the current
default mode is used.
- id
- The index of the object of the specified type, from the current document.
Example:
- {field:title} displays the
title
field of the first object of the type defined in the current
document.
- {field:XWikiUsers.email} displays the
email
field of the first object of the
XWiki.XWikiUsers
type.
- {field:XWikiComment.content|edit|3} displays the
content
field of the third
XWiki.XWikiComment
type in edit mode.
- Version:
- $Id: 04ddbac87be755b87017c497a06a0044387f84b0 $
Fields inherited from class org.radeox.macro.BaseMacro |
description, initialContext, paramDescription |
Method Summary |
void |
execute(Writer writer,
org.radeox.macro.parameter.MacroParameter params)
Deprecated. Main macro execution method, replaces the macro instance with the generated output. |
String |
getLocaleKey()
Deprecated. |
Methods inherited from class org.radeox.macro.BaseLocaleMacro |
getName, setInitialContext |
Methods inherited from class org.radeox.macro.BaseMacro |
compareTo, getDescription, getParamDescription, toString |
FieldMacro
public FieldMacro()
- Deprecated.
getLocaleKey
public String getLocaleKey()
- Deprecated.
execute
public void execute(Writer writer,
org.radeox.macro.parameter.MacroParameter params)
throws IllegalArgumentException,
IOException
- Deprecated.
- Main macro execution method, replaces the macro instance with the generated output.
- Specified by:
execute
in interface org.radeox.macro.Macro
- Specified by:
execute
in class org.radeox.macro.BaseMacro
- Parameters:
writer
- the place where to write the outputparams
- the parameters this macro is called with
- Throws:
IllegalArgumentException
- if the mandatory argument (text
) is missing
IOException
- if the output cannot be written- See Also:
BaseMacro.execute(Writer, MacroParameter)
Copyright © 2004–2014 XWiki. All rights reserved.