com.xpn.xwiki.render.macro
Class FieldMacro

java.lang.Object
  extended by org.radeox.macro.BaseMacro
      extended by org.radeox.macro.BaseLocaleMacro
          extended by 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:

Version:
$Id: 04ddbac87be755b87017c497a06a0044387f84b0 $

Field Summary
 
Fields inherited from class org.radeox.macro.BaseMacro
description, initialContext, paramDescription
 
Constructor Summary
FieldMacro()
          Deprecated.  
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FieldMacro

public FieldMacro()
Deprecated. 
Method Detail

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 output
params - 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-2013 XWiki. All Rights Reserved.