Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-25780

Revise the implementation of EditableModelImpl.getRowData

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 9.10
    • Fix Version/s: 9.10-HF19, 10.3
    • Component/s: Seam / JSF UI
    • Upgrade notes:
      Hide

      Since 10.3 and 9.10-HF19, a new configuration property is exposed to allow an alternative management of a missing row. Use the following contribution to enable it:

         <require>org.nuxeo.ecm.platform.ui.web.configuration.default</require>
         <extension target="org.nuxeo.runtime.ConfigurationService" point="configuration">
           <property name="nuxeo.jsf.skipMissingRow">true</property>
         </extension>
      
      Show
      Since 10.3 and 9.10-HF19, a new configuration property is exposed to allow an alternative management of a missing row. Use the following contribution to enable it: <require> org.nuxeo.ecm.platform.ui.web.configuration.default </require> <extension target= "org.nuxeo.runtime.ConfigurationService" point= "configuration" > <property name= "nuxeo.jsf.skipMissingRow" > true </property> </extension>
    • Sprint:
      nxsupport 10.3.2
    • Story Points:
      1

      Description

      Apply the following patch to EditableModelImpl.getRowData and make it depend upon a configuration property.

      diff --git a/nuxeo-jsf/nuxeo-platform-ui-web/src/main/java/org/nuxeo/ecm/platform/ui/web/model/impl/EditableModelImpl.java b/nuxeo-jsf/nuxeo-platform-ui-web/src/main/java/org/nuxeo/ecm/platform/ui/web/model/impl/EditableModelImpl.java
      index 91a7a6ede25..87c70ee3605 100644
      --- a/nuxeo-jsf/nuxeo-platform-ui-web/src/main/java/org/nuxeo/ecm/platform/ui/web/model/impl/EditableModelImpl.java
      +++ b/nuxeo-jsf/nuxeo-platform-ui-web/src/main/java/org/nuxeo/ecm/platform/ui/web/model/impl/EditableModelImpl.java
      @@ -274,7 +274,12 @@ public class EditableModelImpl extends DataModel implements EditableModel, Seria
               if (data == null) {
                   return null;
               } else if (!isRowAvailable()) {
      -            throw new IllegalArgumentException("No row available on " + this);
      +            String message = "No row available on " + this;
      +            if (index == -1) {
      +                log.warn(message);
      +                return null;
      +            }
      +            throw new IllegalArgumentException(message);
               } else {
                   if (index == -2) {
                       // XXX return template instead (?)
      

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 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 - 55 minutes
                55m