Uploaded image for project: 'Publication Workflow Application'
  1. Publication Workflow Application
  2. XAWORKFLOW-108

Custom display of target field doesn't handle hidden mode properly

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 2.3.1
    • 2.3
    • Unknown

    Description

      The custom display of the "target" field currently has two cases:

      1. edit mode
      2. other modes (display a HTML link)

      This forgets the hidden mode in which the HTML link is incorrect. It should display a hidden input for forms.

      I suggest the following code in the custom display:

       

      {{velocity}}
      #set ($propertyClass = $object.getxWikiClass().get($name))
      #if ($type == 'edit')
        {{html clean="false"}}$doc.displayEdit($propertyClass, $prefix, $object){{/html}}
      #elseif ($type == 'hidden')
        {{html clean="false"}}$doc.displayHidden($propertyClass, $prefix, $object){{/html}}
      #else
        #if ("$!value" != '')
          #set ($reference = $services.model.resolveDocument($value))
          #set ($target = $xwiki.getDocument($reference))
          #set ($url = $xwiki.getURL($reference))
          {{html clean="false"}}<a href="$escapetool.xml($url)">$escapetool.xml($target.displayTitle)</a>{{/html}}
        #end
      #end
      {{/velocity}} 

       

       

      Attachments

        Issue Links

          Activity

            People

              mpace Mathieu Pace
              mpace Mathieu Pace
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: