Uploaded image for project: 'Nuxeo Elements'
  1. Nuxeo Elements
  2. ELEMENTS-241

nuxeo-operation should allow null input

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: QualifiedToSchedule
    • Component/s: Catalog

      Description

      When using an operation that does not expect any input (void, which means the input parameter must ne null), we have to trick the call.
      Example with Directories.Entries.

      Passing no input property does not work:
      {{<nuxeo-operation auto op="Directory.Entries" params='

      {"directoryName": "MyDirectory"}

      ' on-response="myHandler"></nuxeo-operation>}}

      Error is:

      Caused by: org.nuxeo.ecm.core.api.DocumentNotFoundException: 
      	at org.nuxeo.ecm.core.storage.sql.coremodel.SQLSession.getDocumentByUUID(SQLSession.java:185)
      . . .
      

      The same goes if you use input="" or input="null".

      The element should detect that input is either missing or is "" and explicitly set it to null before executing the operation.

      Workaround: have variable that is null, use it in the element:

      Polymer({
      . . .
      NULL: {
              type: Object,
              value: null
            }
      . . .
      

      then:

      <nuxeo-operation auto op="Directory.Entries" input="[[NULL]]" params='{"directoryName": "PictureConversion_Preformatted"}' on-response="_getPreformattedHandler"></nuxeo-operation>
      

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: