Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-67607

DDL spreadsheet displays "null" instead of blank when value is null text

    Details

      Description

      Dynamic Data List Display portlet shows "null" in spreadsheet mode when a Text value is null.

      steps to reproduce

      1. Create a Dynamic Data Definition with a Number and a Text field
      2. Create Dynamic Data List based on the definition
      3. Add Dynamic Data List Display portlet to a page
      4. Select the created list
      5. Set DDL Display portlet to Spreadsheet mode in Configuration
      6. Add a value to the number field
      7. Refresh the page

      Expected behaviour

      Your number should appear

      Experienced behaviour

      Your number appears and "null" in the text field

      master

      The issue is solved on master, but the backport is impossible
      LPS-53021 solves this issue:

      -		Fields fields = StorageEngineUtil.getFields(
      +		DDMFormValues ddmFormValues = StorageEngineUtil.getDDMFormValues(
       			recordVersion.getDDMStorageId());
       
      +		Fields fields = DDMFormValuesToFieldsConverterUtil.convert(
      +			ddmStructure, ddmFormValues);
      +
      

      https://github.com/peterborkuti/liferay-portal/commit/99399def6f30

      And the real solver is
      DDMContentModelImpl.getData() method, which checks the null value:

      	public String getData() {
      		if (_data == null) {
      			return StringPool.BLANK;
      		}
      		else {
      			return _data;
      		}
      	}
      

      However, on 6.2.x there is even NO getData method, and the whole process is totally different.
      Moreover, LPS-53021 broke the API, so there is no chance to backport it.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  3 years, 41 weeks, 3 days ago

                  Packages

                  Version Package
                  6.2.X EE
                  7.0.0 DXP FP5
                  7.0.0 DXP SP1
                  7.0.3 CE GA4
                  Master