Uploaded image for project: 'Nuxeo Studio'
  1. Nuxeo Studio
  2. NXS-6902

Fix XSD definition of a multivalued Blob property

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 2022.7.3
    • Fix Version/s: None
    • Component/s: Studio Modeler

      Description

      Steps to reproduce:

      1. define a document type with a schema named "file_schema" which has a multivalued Blob property
      2. generate the code for this property in the View layout of this document
            <div role="widget">
              <label>Attachments</label>
              <nuxeo-document-attachments document="{{document}}" xpath="file_schema:attachments" name="attachments"></nuxeo-document-attachments>
            </div>
        
      3. deploy the Studio project
      4. create a document of the new type
      5. on the summary, try to add a file to the zone for "file_schema:attachments"
      6. observe that the file is not attached

      Server side, "file_schema:attachments" is recognized as a BlobProperty (which cannot set multiple values) whereas "files:files" is recognized as a MapProperty

      I've compared the definition generated by Studio with the default definition of "files:files"

        <xs:complexType name="blobList">
          <xs:sequence> 
            <xs:element name="item" type="nxs:content" minOccurs="0" maxOccurs="unbounded"/>
          </xs:sequence> 
        </xs:complexType>  
        
        <xs:element name="attachments" type="nxs:blobList"/>
      

      whereas files:files is defined by

        <xs:element name="files" type="nxs:files" />
      
        <xs:complexType name="files">
          <xs:sequence>
            <xs:element name="item" type="nxs:file" minOccurs="0"
              maxOccurs="unbounded" />
          </xs:sequence>
        </xs:complexType>
      
        <xs:complexType name="file">
          <xs:sequence>
            <xs:element name="file" type="nxs:content" />
          </xs:sequence>
        </xs:complexType>
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              tmartins Thierry Martins
              Participants:
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: