Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-16520

WikiMacro parameter class type definition not inherited by macro variable

    Details

    • Tests:
      Unit
    • Difficulty:
      Unknown
    • Documentation:
      N/A
    • Documentation in Release Notes:
      N/A
    • Similar issues:

      Description

      Hello there

      Defining the parameter field of an Macro as

      java.lang.Number

      results in the parameter variable

      $xcontext.macro.params.

      within the macro to be of type "string"

      which causes various issues when doing conditions like > or <, as strings cannot be compared this way ...

      One would need to convert this within the macro. Would be efficient if the type is inherited by the variable exposed to the macro.

      Tested with Velocity using

      Parameter class type: ${variable.class.name} which returned string.

       

       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                surli Simon Urli
                Reporter:
                bbu@netsuccess.ch Beat Burgener
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Date of First Response: