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

livetable returns only first object

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Minor
    • None
    • 14.10
    • LiveTable
    • None
    • Unknown

    Description

      When using the class filter in the livetable options, a document with multiple objects of the filtered class will be returned multiple times, but every time with the first object.

      Steps to reproduce

      The following steps use the AnnotationClass as an example, but you can use any other class.

      1. Create a page with the following code:
        {{velocity}}
        ## Replace the AnnotationCode.AnnotationClass class and annotation property with your class.
        #set($columns = ['annotation', 'doc.name'])
        #set($columnsProperties = {
          'annotation'  : {'type' : 'text' },
          'doc.name': { 'type' : 'text', 'link' : 'view' }
        })
        #set($options = {
          'className' : 'AnnotationCode.AnnotationClass'
        })
        #livetable("projectTable" $columns $columnsProperties $options)
        {{/velocity}} 
      1. Add two AnnotationCode.AnnotationClass objects on the same page, with different values for the Annotation field (ex. "Object 1 annotation" and "Object 2 annotation")
      2. Save and view

      Expected results:

      The livetable lists each object on the page. (So both "Object 1 annotation" and "Object 2 annotation" are visible)

      Actual results:

      The livetable lists the first object multiple times.

      Attachments

        Activity

          People

            Unassigned Unassigned
            abrassat Brassat Alexandru
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: