Creating a simple macro with no parameters except the one which defines the width of macro in view mode of confluence page.
So my macro is working perfectly except the part where it keeps on loading on insert/edit macro screen -
So here is my piece of code -
<xhtml-macro name="search-report" class="com.temp.ReportMacro" key="search-report-xhtml"> <description key="com.temp.macro.desc"/> <category name="reporting"/> <parameters> <parameter name="width" type="pixel" default="500px"/> </parameters> </xhtml-macro>
and
public class ReportMacro implements Macro { @Override public String execute(Map<String, String> arg0, String arg1, ConversionContext arg2) throws MacroExecutionException { Map<String, Object> contextMap = MacroUtils.defaultVelocityContext(); contextMap.put("reportType", "macro"); return VelocityUtils.getRenderedTemplate("vm/temp-report.vm", contextMap); } public BodyType getBodyType() { return BodyType.NONE; } public OutputType getOutputType() { return OutputType.BLOCK; } }
I don't see any problem with the code, so what am i missing.
Problem in my code was type="pixel". Wasted 4 hrs on searching other stuff.
Thanks for getting back to us - it will help the next person.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.