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

Support creating objects using in-place editable properties

    XMLWordPrintable

Details

    • Unit
    • Unknown
    • Pull Request accepted

    Description

      At the moment, when you create an in-place editable property for the property of an object but the object doesn’t exist yet, simply nothing is displayed where the edit field should be. There should be a possibility to implicitly create the object on save and use a temporary object for display and edit. The plan is:

      • Support data-object-policy="updateOrCreate" to enable object creation when the property is saved (transforms into objectPolicy=updateOrCreate parameter on save) in editableProperty.js.
      • editableProperty.js uses the display.vm template to display the value both in edit and view mode so this needs to support not-yet-existing objects by displaying the default value (currently, nothing is displayed). Internally, display.vm calls #displayObjectProperty from display_macros.vm. There should be an additional parameter for #displayObjectProperty to create the object when it doesn't exist that is set to true when the objectPolicy request parameter is set to updateOrCreate in display.vm.

      See also the discussion in the Forum.

      Attachments

        Activity

          People

            MichaelHamann Michael Hamann
            MichaelHamann Michael Hamann
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: