Ignore:
Timestamp:
Jan 31, 2008, 8:37:04 AM (14 years ago)
Author:
Nicklas Nordborg
Message:

Fixes #910: Plug-ins ignore file set by the auto-detect file format function

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/www/common/plugin/configure.jsp

    r3987 r4111  
    137137            // ...or in the current values from the job / plugin configuration
    138138            List values = requestValues != null ? Arrays.asList(requestValues) : pcRequest.getCurrentParameterValues(param.getName());
     139            // File parameters should also check the auto-detected-file (if not enumeration)
     140            if ((values == null || values.size() == 0) && !pType.isEnumeration() &&
     141              pType instanceof FileParameterType)
     142            {
     143              if (currentContext != null && currentContext.getObject("auto-detected-file") != null)
     144              {
     145                values =  Collections.singletonList(currentContext.getObject("auto-detected-file"));
     146                currentContext.setObject("auto-detected-file", null);
     147              }
     148            }
    139149            // Then, we check the parameters default value
    140150            if ((values == null || values.size() == 0) && param.getDefaultValue() != null)
Note: See TracChangeset for help on using the changeset viewer.