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

Lists improvement by creating DynamicLists

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Major
    • None
    • 0.9.840
    • Old Core
    • None
    • list dynamic property
    • Low

    Description

      Dynamic lists and lists improvement.

      StaticList and DBList doesn't provide enough features, that's why we propose to create a third List property type based on scripts.

      Usage examples:

      • apply some filter to a list of results fetched from the database (like rights, languages ...),
      • build lists from document content,
      • build lists from XWiki API,
      • build lists from other sources than the database (from a web service
        call etc.)

      Short Property specification:
      The property re-use properties attributes like :

      • Name
      • Pretty Name
      • Unmodifiable
      • Number
        And List attributes :
      • Diplay Type
      • Multiple Select
      • Relationnal Storage
      • Size
        We added two properties :
      • Script Type : StaticList (Velocity|Groovy)
      • Script : TextArea

      When you display this property, a renderer is called (depending on the script type) and return the standart input formatted as a ArrayList with the getListFromString() method.

      • Class DynamicListMetaClass extends ListMetaClass
        this class add two properties :
        • A script type list, where you choose the renderer between Velocity and Groovy.
          In this case is it better to manually choose the renderer or to use both.
        • A script textarea input.
      • Class DynamicListClass extends ListClass
        this class provide attributes accessors and extends the method getList(XWikiContext context).

      Lists internationalisation

      • What about adding an attribute to Lists properties (like multiselect)

      Other lists types implementation

      • The checkboxes and radio boxes are quite similar : checkboxes are designed for multiselect lists and radio boxes are for non-multiselect ones. The best way is to reduce lists to select and boxes, boxes depends on the multiselect value.

      Attachments

        Activity

          People

            Unassigned Unassigned
            cclermont Christophe Clermont
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: