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

Backport ELEMENTS-633 and ELEMENTS-552 to fix required sub property validation in data-table editing

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.2.0
    • Fix Version/s: 2.2.23
    • Component/s: UI
    • Release Notes Summary:
      Subfields of a complex field are validated when editing a nuxeo-data-table.
    • Backlog priority:
      700
    • Browser:
    • Sprint:
      nxGang Sprint 10.10.2
    • Story Points:
      3

      Description

      Steps to reproduce:

      • Create a custom schema called *answers:
        Fiel Subfield Type Multi-valued Required
        answers   Complex true  
          text String   true
          correct Boolean    
      • Associate the schema to a document type
      • Configure the views for the document type.
      • View Designer scaffol the required, multi-valued, complex fields as follows:
          <nuxeo-data-table role="widget" items="{{document.properties.answers:answers}}" orderable="true" editable="true" scroll-throttle="60" max-items="10000" size="0">
            <nuxeo-data-table-column name="Text">
              <template>
                [[item.text]]
              </template>
            </nuxeo-data-table-column>
      
            <nuxeo-data-table-column name="Correct">
              <template>
                [[item.correct]]
              </template>
            </nuxeo-data-table-column>
      
            <nuxeo-data-table-form>
              <template>
                <nuxeo-input value="{{item.text}}" label="Text" type="text" required="true" ></nuxeo-input>
                <paper-checkbox checked="{{item.correct}}"></paper-checkbox>
              </template>
            </nuxeo-data-table-form>
          </nuxeo-data-table>
      

      When you edit an existing document the "Save" button nothing happens. The validation method is expecting that the required nuxeo-input field has a value, even if you have modified other fields and you don't need to edit this field.

      <nuxeo-input value="{{item.text}}" label="Text" type="text" required="true" ></nuxeo-input>
      

      If you edit some of the entries in the table the nuxeo-input has a value and the editing operation it works.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 day, 3 hours, 5 minutes
                  1d 3h 5m