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

Fix data table column name edition

    XMLWordPrintable

    Details

      Description

      In Modeler

      • Create a multivalued complex field

      In Designer

      • Scaffold the layout and obtain a nuxeo-data-table
        => Layout looks like this
      <nuxeo-data-table role="widget" items="{{document.properties.nxtrproject:involved_people}}" orderable="true" editable="true" size="0" scroll-throttle="60" max-items="10000">
            <nuxeo-data-table-column name="Number">
              <template>
                <div role="widget">[[item.number]]</div>
              </template>
            </nuxeo-data-table-column>
      
            <nuxeo-data-table-column name="Number Of Days">
              <template>
                <div role="widget">[[item.number_of_days]]</div>
              </template>
            </nuxeo-data-table-column>
      
            <nuxeo-data-table-column name="Price Per Day">
              <template>
                <div role="widget">[[item.price_per_day]]</div>
              </template>
            </nuxeo-data-table-column>
      
            <nuxeo-data-table-column name="Role">
              <template>
                <div role="widget">[[item.role]]</div>
              </template>
            </nuxeo-data-table-column>
      
            <nuxeo-data-table-form>
              <template>
                <paper-input value="{{item.number}}" label="Number" type="number"></paper-input>
                <paper-input value="{{item.number_of_days}}" label="Number Of Days" type="number"></paper-input>
                <paper-input value="{{item.price_per_day}}" label="Price Per Day" type="number"></paper-input>
                <paper-input value="{{item.role}}" label="Role" type="text"></paper-input>
              </template>
            </nuxeo-data-table-form>
          </nuxeo-data-table>
      

      (note: layout was scaffolded in 8.10 and doing the same today will certainly result in nuxeo-input instead of paper-input)

      • Edit the data table using data table editor
      • Change the column titles: in this example I'm adding test to the column title, go back and save

      => layout is updated

      <nuxeo-data-table role="widget" items="{{document.properties.nxtrproject:involved_people}}" orderable="true" editable="true" size="0" scroll-throttle="60" max-items="10000">
            <nuxeo-data-table-column name="Number test">
              <template>
      
              </template>
            </nuxeo-data-table-column>
            <nuxeo-data-table-column name="Number Of Days test">
              <template>
      
              </template>
            </nuxeo-data-table-column>
            <nuxeo-data-table-column name="Price Per Day test ">
              <template>
      
              </template>
            </nuxeo-data-table-column>
            <nuxeo-data-table-column name="Role test">
              <template>
      
              </template>
            </nuxeo-data-table-column>
          </nuxeo-data-table>
      

      Error
      => Deploying the layout in web ui makes the field impossible to fill because of missing parts

      Expected
      Layout should be kept valid after column label change

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day, 1 hour
                1d 1h