Ignore:
Timestamp:
Jul 11, 2018, 2:42:30 PM (4 years ago)
Author:
Nicklas Nordborg
Message:

References #2125: Add support for hidden extended properties

It is now possible to set "hidden" attribute for an extended property. Hidden properties are usually not visible in the interface. They can still be modified via extensions or plug-ins.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/www/my_base/user/submit_user.jsp

    r7410 r7496  
    5050  import="java.util.Collections"
    5151  import="java.util.List"
     52  import="java.util.Map"
    5253%>
    5354<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %>
     
    103104
    104105    // Extended properties
    105     List<ExtendedProperty> extendedProperties = ExtendedProperties.getProperties("UserData");
     106    List<ExtendedProperty> extendedProperties = ExtendedProperties.getProperties("UserData", true);
    106107    if (extendedProperties != null)
    107108    {
     109      Map<String, String[]> parameters = request.getParameterMap();
    108110      for (ExtendedProperty ep : extendedProperties)
    109111      {
    110112        if (ep.isRestrictedEdit()) continue;
    111         String name = ep.getName();
    112         Formatter formatter = FormatterFactory.getExtendedPropertyFormatter(sc, ep);
    113         Object value = formatter.parseString(Values.getStringOrNull(request.getParameter("ep."+name)));
    114         user.setExtended(name, value);
     113        if (parameters.containsKey("ep."+name))
     114        {
     115          String name = ep.getName();
     116          Formatter formatter = FormatterFactory.getExtendedPropertyFormatter(sc, ep);
     117          Object value = formatter.parseString(Values.getStringOrNull(request.getParameter("ep."+name)));
     118          user.setExtended(name, value);
     119        }
    115120      }
    116121    }
Note: See TracChangeset for help on using the changeset viewer.