Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-37325

Custom Macro ignores default boolean parameter

    XMLWordPrintable

Details

    Description

      Custom macros ignores the default value. The iscolortext parameter is NOT sent to the execute method.
      (Actually, the isshowborder is not sent either. I was expecting a "false" value.)

      <xhtml-macro name="my-macro" key="my-macro" class="InternalContentMacro">
   
      <parameters>
        
      <parameter name="iscolortext" type="boolean" default="true"/>
        
      <parameter name="isshowborder" type="boolean"/>
    
      </parameters>
      
</xhtml-macro>
      
      public class InternalContentMacro implements Macro {
          @Override
          public String execute(Map<String, String> params, String bodyContent, ConversionContext conversionContext) throws MacroExecutionException
          {
              String isColorText = params.get("iscolortext");
              String isShowBorder = params.get("isshowborder");
          }
      }
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              7dc72598-88fa-4413-b794-bdafe19218d4 Deleted Account (Inactive)
              Votes:
              3 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: