Ignore:
Timestamp:
Oct 7, 2010, 9:04:43 AM (12 years ago)
Author:
Nicklas Nordborg
Message:

References #1512: Add support for datetime annotation types

Fixes some problem with timestamp and date extended properties in the BASE->Other information dialog.

File:
1 edited

Legend:

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

    r5442 r5443  
    3737  import="net.sf.basedb.core.User"
    3838  import="net.sf.basedb.core.ItemContext"
     39  import="net.sf.basedb.core.ExtendedProperty"
     40  import="net.sf.basedb.core.ExtendedProperties"
    3941  import="net.sf.basedb.util.EmailUtil"
    4042  import="net.sf.basedb.clients.web.Base"
    4143  import="net.sf.basedb.clients.web.WebException"
    4244  import="net.sf.basedb.clients.web.util.HTML"
     45  import="net.sf.basedb.util.Values"
     46  import="net.sf.basedb.util.formatter.Formatter"
    4347  import="net.sf.basedb.clients.web.formatter.FormatterSettings"
    44   import="net.sf.basedb.util.Values"
     48  import="net.sf.basedb.clients.web.formatter.FormatterFactory"
    4549  import="java.util.Arrays"
     50  import="java.util.List"
    4651%>
    4752<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %>
     
    8792    // Other settings tab
    8893    user.setDescription(Values.getStringOrNull(request.getParameter("description")));
     94
     95    // Extended properties
     96    List<ExtendedProperty> extendedProperties = ExtendedProperties.getProperties("UserData");
     97    if (extendedProperties != null)
     98    {
     99      for (ExtendedProperty ep : extendedProperties)
     100      {
     101        String name = ep.getName();
     102        Formatter formatter = FormatterFactory.getExtendedPropertyFormatter(sc, ep);
     103        Object value = formatter.parseString(Values.getStringOrNull(request.getParameter(name)));
     104        user.setExtended(name, value);
     105      }
     106    }
    89107
    90108    dc.commit();
Note: See TracChangeset for help on using the changeset viewer.