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

Custom displayers in syntax 2.0 cannot access their variables

    XMLWordPrintable

Details

    • Unknown

    Description

      The displayCustom function in http://svn.xwiki.org/svnroot/xwiki/platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki//objects/classes/PropertyClass.java
      sets the velocity variables $name $prefix $object

      In syntax 1.0/XWiki 1.8.4 you could access these in your custom displayer code.

      In syntax 2.0 it seems you cannot access them directly.
      In xwiki 2.1.1 you can use $context.vcontext.name
      In xwiki.2.2 even that call does not work

      However if previous velocity has set these variables then it works. It seems the particular velocity context used in displayCustom is ignored.

      Attachments

        Activity

          People

            sdumitriu Sergiu Dumitriu
            ludovic Ludovic Dubost
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: