Changeset 4711


Ignore:
Timestamp:
Dec 18, 2008, 9:22:27 AM (13 years ago)
Author:
Nicklas Nordborg
Message:

Merged patch release 2.9.1 to the trunk.

Location:
trunk
Files:
29 edited
2 copied

Legend:

Unmodified
Added
Removed
  • trunk/credits.txt

    r4669 r4711  
    2626USA.
    2727
    28 The current BASE team is (at BASE 2.9 release)
     28The current BASE team is (at BASE 2.9.1 release)
    2929
    3030Jari Häkkinen
     
    4646Jari Häkkinen
    4747Peter Johansson
     48David Lindgren
    4849Peter Mörck
    4950Per Nilsson
  • trunk/doc/src/docbook/userdoc/webclient.xml

    r4673 r4711  
    16981698            <listitem>
    16991699              <simpara>
    1700                 Same as <keycap>=</keycap> but this will ignore <quote>|</quote> as a value separator.
     1700                Same as <keycap>=</keycap> but interprets <quote>|</quote>, <quote>%</quote>
     1701                and other special characters literally. Use this when you need an exact
     1702                string match.
    17011703              </simpara>
    17021704            </listitem>
  • trunk/src/clients/web/net/sf/basedb/clients/web/Base.java

    r4555 r4711  
    859859        result = "<=";
    860860      }
    861       else if (op == Operator.EQ && value.contains(filter.getValueSeparator()))
     861      else if (op == Operator.EQ && (value.contains(filter.getValueSeparator()) || value.contains("%")))
    862862      {
    863863        result = "==";
  • trunk/src/clients/web/net/sf/basedb/clients/web/plugins/ExportedProperty.java

    r4548 r4711  
    7373      at = AnnotationType.getById(dc, annotationTypeId);
    7474      name = "annotationtype_"+annotationTypeId;
    75       if (sameUnits)
     75      if (sameUnits && at.supportUnits())
    7676      {
    7777        unit = at.getDefaultUnit();
    78         columnSuffix = " (" + unit.getDisplaySymbol() + ")";
     78        if (unit != null) columnSuffix = " (" + unit.getDisplaySymbol() + ")";
    7979      }
    8080    }
  • trunk/src/clients/web/net/sf/basedb/clients/web/taglib/table/Cell.java

    r4673 r4711  
    2626import javax.servlet.jsp.JspTagException;
    2727import javax.servlet.jsp.tagext.BodyTagSupport;
     28import javax.servlet.jsp.tagext.TryCatchFinally;
    2829
    2930import net.sf.basedb.clients.web.util.HTML;
     
    3940   &lt;tbl:cell
    4041      clazz=...
     42      errorclazz=...
    4143      style=...
    4244      column=...
     
    6870  </tr>
    6971  <tr>
     72    <td>errorclazz</td>
     73    <td>cell error</td>
     74    <td>no</td>
     75    <td>
     76      Value for the class attribute to use if an exception is thrown
     77      while evaluating the contents of the cell. Since BASE 2.9.1
     78    </td>
     79  </tr>
     80  <tr>
    7081    <td>style</td>
    7182    <td>-</td>
     
    111122public class Cell
    112123  extends BodyTagSupport
     124  implements TryCatchFinally
    113125{
    114126
     
    132144  */
    133145  private String clazz = "cell";
    134  
     146
     147  /**
     148    Optional <code>class</code> attribute for errors.
     149  */
     150  private String errorClazz = "cell error";
     151
    135152  /**
    136153    Optional <code>style</code> attribute
     
    170187  {
    171188    return clazz;
     189  }
     190 
     191  /**
     192    @since 2.9.1
     193  */
     194  public void setErrorclazz(String errorClazz)
     195  {
     196    this.errorClazz = errorClazz;
     197  }
     198  /**
     199    @since 2.9.1
     200  */
     201  public String getErrorclazz()
     202  {
     203    return errorClazz;
    172204  }
    173205
     
    290322  }
    291323
     324  /*
     325    From the TryCatchFinally interface
     326    ----------------------------------
     327   */
     328  @Override
     329  public void doCatch(Throwable t)
     330    throws Throwable
     331  {
     332    t.printStackTrace();
     333    StringBuilder sb = new StringBuilder();
     334    sb.append("\t<td");
     335    if (getErrorclazz() != null) sb.append(" class=\"").append(getErrorclazz()).append("\"");
     336    if (getStyle() != null) sb.append(" style=\"").append(getStyle()).append("\"");
     337    sb.append(">");
     338    sb.append("<span title=\"See log file for more information about this error\">");
     339    String msg = t.getMessage();
     340    if (msg == null) msg = t.getClass().getName();
     341    sb.append(msg).append("</span>");
     342    sb.append("</td>\n");
     343    table.setColumnContent(columnId, sb.toString());
     344  }
     345 
     346  @Override
     347  public void doFinally()
     348  {}
     349  // ------------------------------------
     350
     351 
    292352}
    293353
  • trunk/src/core/net/sf/basedb/core/DbControl.java

    r4527 r4711  
    328328    sc.updateLastAccess();
    329329
    330     Project activeProject = sc.getActiveProjectId() == 0 ?
    331       null : Project.getById(this, sc.getActiveProjectId());
     330    Project activeProject = null;
     331    if (sc.getActiveProjectId() != 0)
     332    {
     333      try
     334      {
     335        activeProject = Project.getById(this, sc.getActiveProjectId());
     336      }
     337      catch (ItemNotFoundException ex)
     338      {
     339        // The project was deleted
     340        sc.setActiveProject(null);
     341      }
     342    }
    332343   
    333344    Map<BasicItem, Transactional.Action> tempQueue = null;
  • trunk/src/core/net/sf/basedb/core/PluginDefinition.java

    r4696 r4711  
    12301230    checkPermission(Permission.SET_PERMISSION);
    12311231    if (roleKey == null) throw new InvalidUseOfNullException("roleKey");
     1232    Item itemType = roleKey.getItemType();
     1233    if (itemType.getDefinedPermissions() == null)
     1234    {
     1235      throw new PermissionDeniedException(
     1236          "Not allowed to set permissions for item type '" +
     1237          itemType.name() + "' since it has no key.");
     1238    }
    12321239   
    12331240    if ((granted == null || granted.size() == 0) &&
    1234       (denied == null || denied.containsAll(roleKey.getItemType().getDefinedPermissions())))
     1241      (denied == null || denied.containsAll(itemType.getDefinedPermissions())))
    12351242    {
    12361243      getData().getPermissions().remove(roleKey.getData());
     
    12421249        for (Permission p : granted)
    12431250        {
    1244           if (!getSessionControl().hasPermission(p, roleKey.getItemType()))
     1251          if (!getSessionControl().hasPermission(p, itemType))
    12451252          {
    1246             throw new PermissionDeniedException("Not allowed to set " + p + " permissions for item "
    1247               + roleKey.getItemType() + " to this plugin: " + this);
     1253            throw new PermissionDeniedException("Not allowed to set " + p +
     1254              " permissions for '" + itemType.name() + "' to this plugin: " + this);
    12481255          }
    12491256        }
     
    13711378        for (Permissions p : permissions)
    13721379        {
    1373           RoleKey roleKey = RoleKey.getByItemType(dc, p.getItemType());
    1374           // Translate the "maybe granted" permissions to denied permissions
    1375           Set<Permission> denied = Permission.fromDeniedInt(~Permission.grant(p.getMaybeGranted()));
    1376           setPermissions(roleKey, p.getAlwaysGranted(), denied);
     1380          Item itemType = p.getItemType();
     1381          boolean allowed = itemType.getDefinedPermissions() != null;
     1382          if (allowed)
     1383          {
     1384            try
     1385            {
     1386              RoleKey roleKey = RoleKey.getByItemType(dc, itemType);
     1387              // Translate the "maybe granted" permissions to denied permissions
     1388              Set<Permission> denied = Permission.fromDeniedInt(~Permission.grant(p.getMaybeGranted()));
     1389              setPermissions(roleKey, p.getAlwaysGranted(), denied);
     1390            }
     1391            catch (ItemNotFoundException ex)
     1392            {
     1393              allowed = false;
     1394            }
     1395          }
     1396          if (!allowed)
     1397          {
     1398            throw new PermissionDeniedException(
     1399                "Not allowed to set permissions for item type '" +
     1400                itemType.name() + "' since it has no key.");
     1401          }
     1402         
    13771403        }
    13781404      }
  • trunk/src/core/net/sf/basedb/core/Project.java

    r4696 r4711  
    2424package net.sf.basedb.core;
    2525
     26import net.sf.basedb.core.Transactional.Action;
    2627import net.sf.basedb.core.data.AnyToAnyData;
    2728import net.sf.basedb.core.data.BasicData;
     
    221222    -------------------------------------------
    222223  */
     224  @Override
     225  void onBeforeCommit(Action action)
     226    throws NotLoggedInException, BaseException
     227  {
     228    super.onBeforeCommit(action);
     229    if (action == Action.DELETE)
     230    {
     231      SessionControl sc = getSessionControl();
     232      if (sc.getActiveProjectId() == getId())
     233      {
     234        sc.setActiveProject(null);
     235      }
     236    }
     237  }
    223238  /**
    224239    If the logged in user is a member of this project, read or use
  • trunk/src/core/net/sf/basedb/core/PropertyFilter.java

    r4609 r4711  
    258258    Object oValue = null;
    259259    if (unit == null) unit = this.unit;
    260     if (unit != null)
     260    if (unit != null && value != null)
    261261    {
    262262      String[] valueAndUnit = UnitUtil.splitValueWithUnit(value);
     
    306306    @param asDouble TRUE to return the value as a double, FALSE
    307307      to let the {@link #getValueType()} decide
    308     @return
     308    @return A list with the values
    309309    @since 2.9
    310310  */
     
    364364    @param unitSymbol The unit of the string value
    365365    @param convertTo The unit to convert the value to
    366     @return
     366    @return The converted value
    367367  */
    368368  private Double convertValueToUnit(org.hibernate.Session session, String value, String unitSymbol, Unit convertTo)
     
    495495        {
    496496          restriction = new HasAnnotationRestriction(alias, annotationTypeId,
    497             operator == Operator.EQ, searchInherited);
     497            operator != Operator.EQ, searchInherited);
    498498        }
    499499        else
     
    633633      {   
    634634        Expression propertyExpression = Hql.property(alias, property);
    635         if (getValueType() == Type.DATE)
     635        if (getValueType() == Type.DATE && getValue() != null)
    636636        {
    637637          if (!operator.isListOperator())
  • trunk/src/core/net/sf/basedb/util/overview/ExperimentOverview.java

    r4515 r4711  
    12191219        failures.add(new Failure(Validator.DENIED_SAMPLE, sampleNode));
    12201220      }
    1221       if (extract != null)
     1221      if (sample != null)
    12221222      {
    12231223        sampleNode = new Node("sample", "Sample: " + sample.getName(), parentNode, sample);
  • trunk/src/core/net/sf/basedb/util/units/UnitUtil.java

    r4555 r4711  
    8484  public static String[] splitValueWithUnit(String value)
    8585  {
     86    if (value == null) return null;
    8687    String[] result = null;
    8788    Matcher m = VALUE_WITH_UNIT.matcher(value);
  • trunk/src/plugins/core/net/sf/basedb/plugins/BioAssaySetExporter.java

    r4669 r4711  
    5656import net.sf.basedb.core.VirtualColumn;
    5757import net.sf.basedb.core.VirtualTable;
     58import net.sf.basedb.core.Formula.AverageMethod;
    5859import net.sf.basedb.core.data.ReporterData;
    5960import net.sf.basedb.core.plugin.About;
     
    302303
    303304    DynamicSpotQuery query = bas.getSpotData();
     305    if (mergeReporters) query.joinReporters(JoinType.INNER);
    304306    for (String field : reporterFields)
    305307    {
     
    307309      if (qi == null)
    308310      {
    309         throw new BaseException("Unknown field in reporter fields: "+field);
    310       }
    311       query.select(Selects.expression(qi.getExpression(dc, bas, mergeReporters), qi.getQueryAlias()));
     311        throw new BaseException("Unknown field in reporter fields: "+field+" (you can add this field using a formula)");
     312      }
     313      query.select(Selects.expression(qi.getExpression(dc, bas, mergeReporters, AverageMethod.MAX), qi.getQueryAlias()));
    312314    }
    313315    for (String field : spotFields)
     
    316318      if (qi == null)
    317319      {
    318         throw new BaseException("Unknown field in spot fields: "+field);
     320        throw new BaseException("Unknown field in spot fields: "+field+" (you can add this field using a formula)");
    319321      }
    320322      query.select(Selects.expression(qi.getExpression(dc, bas, mergeReporters), qi.getQueryAlias()));
     
    429431      checkInterrupted();
    430432      DynamicSpotQuery query = ba.getSpotData();
     433      if (mergeReporters) query.joinReporters(JoinType.INNER);
    431434      for (String field : reporterFields)
    432435      {
     
    436439          throw new BaseException("Unknown column: "+field+" (you can add this field using a formula)");
    437440        }
    438         query.select(Selects.expression(qi.getExpression(dc, bas, mergeReporters), qi.getQueryAlias()));
     441        query.select(Selects.expression(qi.getExpression(dc, bas, mergeReporters, AverageMethod.MAX), qi.getQueryAlias()));
    439442      }
    440443      for (String field : spotFields)
     
    443446        if (qi == null)
    444447        {
    445           throw new BaseException("Unknwon field: "+field+" (you can add this field using a formula)");
     448          throw new BaseException("Unknown field: "+field+" (you can add this field using a formula)");
    446449        }
    447450        query.select(Selects.expression(qi.getExpression(dc, bas, mergeReporters), qi.getQueryAlias()));
     
    904907      }
    905908
    906       out.write( "\t" + (goodvalue ? exValue : "NaN"));
     909      out.write( "" + (goodvalue ? exValue : "NaN"));
    907910    }
    908911    out.close();
     
    14211424    public final Expression getExpression(DbControl dc, BioAssaySet bas, boolean average)
    14221425    {
     1426      return getExpression(dc, bas, average, avg);
     1427    }
     1428   
     1429    public final Expression getExpression(DbControl dc, BioAssaySet bas, boolean average, AverageMethod forceAvgMethod)
     1430    {
    14231431      Expression e = BioAssaySetUtil.createJepExpression(dc, bas, jep, true);
    1424       if (average && avg != null)
    1425       {
    1426         e = avg.getAverageExpression(e);
     1432      if (average && forceAvgMethod != null)
     1433      {
     1434        e = forceAvgMethod.getAverageExpression(e);
    14271435        if (e == null)
    14281436        {
  • trunk/www/WEB-INF/base.tld

    r4510 r4711  
    497497    </attribute>
    498498  </tag>
    499 
     499  <tag>
     500    <name>catch</name>
     501    <tagclass>net.sf.basedb.clients.web.taglib.ExceptionCatcher</tagclass>
     502    <attribute>
     503      <name>clazz</name>
     504      <required>false</required>
     505      <rtexprvalue>true</rtexprvalue>
     506    </attribute>
     507  </tag>
    500508</taglib>
  • trunk/www/WEB-INF/table.tld

    r4673 r4711  
    638638    </attribute>
    639639    <attribute>
     640      <name>errorclazz</name>
     641      <required>false</required>
     642      <rtexprvalue>true</rtexprvalue>
     643    </attribute>
     644    <attribute>
    640645      <name>style</name>
    641646      <required>false</required>
  • trunk/www/admin/datafiletypes/edit_filetype.jsp

    r4510 r4711  
    237237      </tr>
    238238      <tr>
     239        <td class="subprompt">- jar path</td>
     240        <td><input <%=clazz%> type="text" name="validatorJarPath"
     241          value="<%=HTML.encodeTags(fileType == null ? cc.getPropertyValue("validatorJarPath") : fileType.getValidatorJarPath())%>"
     242          size="50" maxlength="<%=DataFileType.MAX_JARPATH_LENGTH%>">
     243        </td>
     244      </tr>
     245      <tr>
    239246        <td class="prompt">Metadata reader</td>
    240247        <td><input <%=clazz%> type="text" name="metadataReaderClass"
    241248          value="<%=HTML.encodeTags(fileType == null ? Values.getString(cc.getPropertyValue("metadataReaderClass")) : fileType.getMetadataReaderClass())%>"
    242249          size="40" maxlength="<%=DataFileType.MAX_CLASSNAME_LENGTH%>"></td>
     250      </tr>
     251      <tr>
     252        <td class="subprompt">- jar path</td>
     253        <td><input <%=clazz%> type="text" name="metadataReaderJarPath"
     254          value="<%=HTML.encodeTags(fileType == null ? cc.getPropertyValue("metadataReaderJarPath") : fileType.getMetadataReaderJarPath())%>"
     255          size="50" maxlength="<%=DataFileType.MAX_JARPATH_LENGTH%>">
     256        </td>
    243257      </tr>
    244258      <tr valign=top>
  • trunk/www/admin/datafiletypes/index.jsp

    r4510 r4711  
    144144    fileType.setExtension(Values.getStringOrNull(request.getParameter("extension")));
    145145    fileType.setValidatorClass(Values.getStringOrNull(request.getParameter("validatorClass")));
     146    fileType.setValidatorJarPath(Values.getStringOrNull(request.getParameter("validatorJarPath")));
    146147    fileType.setMetadataReaderClass(Values.getStringOrNull(request.getParameter("metadataReaderClass")));
     148    fileType.setMetadataReaderJarPath(Values.getStringOrNull(request.getParameter("metadataReaderJarPath")));
    147149    int genericTypeId = Values.getInt(request.getParameter("generictype_id"), -1);
    148150    if (genericTypeId >= 0) // < 0 = denied or unchanged
  • trunk/www/admin/datafiletypes/list_filetypes.jsp

    r4609 r4711  
    3232  import="net.sf.basedb.core.Platform"
    3333  import="net.sf.basedb.core.PlatformVariant"
     34  import="net.sf.basedb.core.PlatformFileType"
    3435  import="net.sf.basedb.core.ItemQuery"
    3536  import="net.sf.basedb.core.Include"
     
    116117  int numListed = 0;
    117118  %>
    118   <%@page import="net.sf.basedb.core.PlatformFileType"%>
    119 <base:page title="<%=title==null ? "Data file types" : title%>" type="<%=mode.getPageType()%>">
     119  <base:page title="<%=title==null ? "Data file types" : title%>" type="<%=mode.getPageType()%>">
    120120  <base:head scripts="menu.js,table.js" styles="menu.css,table.css">
    121121    <script language="JavaScript">
     
    287287      />
    288288      <tbl:columndef
     289        id="validatorJarPath"
     290        property="validatorJarPath"
     291        datatype="string"
     292        title="Validator path"
     293        sortable="true"
     294        filterable="true"
     295        exportable="true"
     296      />
     297      <tbl:columndef
    289298        id="metadataReaderClass"
    290299        property="metadataReaderClass"
     
    293302        sortable="true"
    294303        filterable="true"
     304        exportable="true"
     305      />
     306      <tbl:columndef
     307        id="metadataReaderJarPath"
     308        property="metadataReaderJarPath"
     309        datatype="string"
     310        title="Metadata reader path"
     311        sortable="true"
     312        filterable="true"
    295313        exportable="true"
    296314      />
     
    466484                  /></tbl:cell>
    467485                <tbl:cell column="validatorClass"><%=Values.getString(item.getValidatorClass())%></tbl:cell>
     486                <tbl:cell column="validatorJarPath"><%=Values.getString(item.getValidatorJarPath(), "<i>-&nbsp;internal&nbsp;-</i>")%></tbl:cell>
    468487                <tbl:cell column="metadataReaderClass"><%=Values.getString(item.getMetadataReaderClass())%></tbl:cell>
     488                <tbl:cell column="metadataReaderJarPath"><%=Values.getString(item.getMetadataReaderJarPath(), "<i>-&nbsp;internal&nbsp;-</i>")%></tbl:cell>
    469489                <tbl:cell column="platforms">
    470490                  <%
  • trunk/www/admin/datafiletypes/view_filetype.jsp

    r4510 r4711  
    226226      </tr>
    227227      <tr>
     228        <td class="subprompt">- jar path</td>
     229        <td><%=fileType.getValidatorJarPath() == null ? "<i>- internal -</i>" : fileType.getValidatorJarPath()%></td>
     230      </tr>
     231      <tr>
    228232        <td class="prompt">Meta data reader</td>
    229233        <td><%=HTML.encodeTags(fileType.getMetadataReaderClass())%></td>
     234      </tr>
     235      <tr>
     236        <td class="subprompt">- jar path</td>
     237        <td><%=fileType.getMetadataReaderJarPath() == null ? "<i>- internal -</i>" : fileType.getMetadataReaderJarPath()%></td>
    230238      </tr>
    231239      <tr valign="baseline">
  • trunk/www/admin/plugindefinitions/index.jsp

    r4624 r4711  
    6262  import="java.util.Enumeration"
    6363  import="java.util.Set"
     64  import="java.util.Map"
     65  import="java.util.LinkedHashMap"
    6466  import="java.util.HashMap"
    6567  import="java.util.HashSet"
     
    173175    FileFilter jarFilter = new RegexpFileFilter(".*\\.jar", null);
    174176    List<java.io.File> jarFiles = FileUtil.findFiles(pluginDir, jarFilter);
    175     StringBuilder notInstalledPlugins = new StringBuilder();
     177    Map<PluginInfo, Throwable> installationResult = new LinkedHashMap<PluginInfo, Throwable>();
    176178   
    177179    //Get information about all plugins in jar-files that were found.
     
    196198          {
    197199            pd = PluginDefinition.getNew(dc, info.getClassName(), info.getJarPath(), true);
     200            installationResult.put(info, null);
    198201          }
    199           catch(BaseException bex)
     202          catch (Throwable t)
    200203          {
    201             notInstalledPlugins.append("Could not install: " +
    202                 info.getClassName() + " in jar:" + info.getJarPath() + "\n");
     204            installationResult.put(info, new BaseException("Could not install: " +
     205                info.getClassName() + " in jar:" + info.getJarPath(), t));
    203206          }
    204207          if (pd != null)
     
    218221            PluginDefinition pd = PluginDefinition.getByClassName(dc, info.getClassName());
    219222            pd.loadPluginInformation(info.getJarPath(), info.getClassName(), true);
     223            installationResult.put(info, null);
    220224          }
    221           catch(BaseException bex)
     225          catch (Throwable t)
    222226          {
    223             notInstalledPlugins.append("Could not update the jarpath for plugin: " + info.getClassName());
     227            installationResult.put(info, new BaseException("Could not install: " +
     228                info.getClassName() + " in jar:" + info.getJarPath(), t));
    224229          }
    225230        }
     
    232237    for (PluginInfo info : pluginInfos)
    233238    {
     239      if (installationResult.get(info) != null) continue;
     240     
    234241      List<PluginConfigInfo> configInfos = info.getConfigurations();
    235242      if (configInfos != null && configInfos.size() > 0)
     
    247254          configImporter.importPluginConfigurationsFromJar(info.getJarPath(), info.getConfigurationsPath(), configurations, false, true );
    248255        }
    249         catch (Throwable th)
    250         {
    251           notInstalledPlugins.append("Could not import configurations: " + th.getMessage() + "\n");
     256        catch (Throwable t)
     257        {
     258          installationResult.put(info,
     259              new BaseException("Could not import configuration for: " +
     260              info.getClassName() + " in jar:" + info.getJarPath(), t));
    252261        }
    253262      }
    254263    }
    255     message = notInstalledPlugins.length() > 0 ?
    256         notInstalledPlugins.toString() : "All selected plugins and configurations were installed";
     264   
     265    for (Map.Entry<PluginInfo, Throwable> entry : installationResult.entrySet())
     266    {
     267      Throwable t = entry.getValue();
     268      if (t != null) t.printStackTrace();
     269    }
     270   
     271    sc.setSessionSetting("pluginwizard.installationresult", installationResult);
     272    redirect = "auto_install_result.jsp?ID=" + ID;
    257273  }
    258274  else if ("UpdateItem".equals(cmd))
  • trunk/www/common/annotations/annotate.jsp

    r4547 r4711  
    2525  @version 2.0
    2626--%>
    27 <%@ page
     27<%@ page session="false"
    2828  import="net.sf.basedb.core.SessionControl"
    2929  import="net.sf.basedb.core.DbControl"
  • trunk/www/common/datafiles/select_files.jsp

    r4510 r4711  
    2323 
    2424--%>
    25 <%@ page
     25<%@ page session="false"
    2626  import="net.sf.basedb.core.SessionControl"
    2727  import="net.sf.basedb.core.DbControl"
  • trunk/www/include/styles/main.css

    r4627 r4711  
    226226  color: #999999;     
    227227}
    228    
     228
    229229.error {
    230230  margin: 8px;
     
    236236}
    237237
    238 .error .stacktrace {
     238.inlineerror {
     239  color: #FFFFFF;
     240  background: #CC0000;
     241  padding: 0px 2px 0px 2px;
     242  border: 1px solid #CCCCCC;
     243  text-align: center;
     244}
     245
     246.stacktrace {
    239247  white-space: pre;
    240248  font-family: monospace;
  • trunk/www/include/styles/table.css

    r4510 r4711  
    176176}
    177177
     178.itemlist .data .cell.error {
     179  border-top: 0px;
     180  border-left: 0px;
     181  color: #FFFFFF;
     182  background: #CC0000;
     183  text-align: center;
     184}
     185
    178186.itemlist .data .joustcell {
    179187  border-top: 1px solid #FFFFFF;
  • trunk/www/lims/platemappings/list_mappings.jsp

    r4698 r4711  
    2424  @version 2.0
    2525--%>
    26 <%@ page
     26<%@ page session="false"
    2727  import="net.sf.basedb.core.SessionControl"
    2828  import="net.sf.basedb.core.DbControl"
  • trunk/www/views/experiments/edit_experiment.jsp

    r4511 r4711  
    117117    efQuery = experiment.getExperimentalFactors();
    118118    cc.setObject("item", experiment);
    119     currentRawDataType = experiment.getRawDataType();
     119    try
     120    {
     121      currentRawDataType = experiment.getRawDataType();
     122    }
     123    catch (Throwable t)
     124    {}
    120125    title = "Edit experiment -- " + HTML.encodeTags(experiment.getName());
    121126    try
     
    190195      var ids = Link.getListIds(frm.rawBioAssays, 'R');
    191196      var excludes = ids.join(',');
    192       var rawDataType = <%=experiment == null ? "frm.rawdatatype[frm.rawdatatype.selectedIndex].value" : "'"+currentRawDataType.getId()+"'"%>;
     197      var rawDataType = <%=currentRawDataType == null ? "frm.rawdatatype[frm.rawdatatype.selectedIndex].value" : "'"+currentRawDataType.getId()+"'"%>;
    193198      var url = '../rawbioassays/index.jsp?ID=<%=ID%>&cmd=UpdateContext&mode=selectmultiple&callback=addRawBioAssayCallback';
    194199      url += "&exclude="+excludes;
     
    272277        for (RawBioAssay rba : rawBioAssays)
    273278        {
    274           RawDataType rbaDataType = rba.getRawDataType();
     279          RawDataType rbaDataType = null;
     280          try
     281          {
     282            rbaDataType = rba.getRawDataType();
     283          }
     284          catch (Throwable t)
     285          {}
    275286          if (currentRawDataType == null)
    276287          {
     
    363374          {
    364375            %>
    365             <%=HTML.encodeTags(currentRawDataType.getName())%>
     376            <base:catch><%=HTML.encodeTags(experiment.getRawDataType().getName())%></base:catch>
    366377            <%
    367378          }
  • trunk/www/views/experiments/view_experiment.jsp

    r4698 r4711  
    330330      <tr>
    331331        <td class="prompt">Raw data type</td>
    332         <td><%=HTML.encodeTags(experiment.getRawDataType().getName())%></td>
     332        <td><base:catch><%=HTML.encodeTags(experiment.getRawDataType().getName())%></base:catch></td>
    333333      </tr>
    334334      <tr>
  • trunk/www/views/rawbioassays/edit_rawbioassay.jsp

    r4568 r4711  
    224224    cc.setObject("item", rawBioAssay);
    225225    name = rawBioAssay.getName();
    226     currentRawDataType = rawBioAssay.getRawDataType();
     226    try
     227    {
     228      currentRawDataType = rawBioAssay.getRawDataType();
     229    }
     230    catch (Throwable t)
     231    {}
    227232    title = "Edit raw bioassay -- " + HTML.encodeTags(rawBioAssay.getName());
    228233   
  • trunk/www/views/rawbioassays/list_rawbioassays.jsp

    r4698 r4711  
    625625              catch (Throwable t)
    626626              {}
    627               RawDataType rdt = item.getRawDataType();
    628627              int itemId = item.getId();
    629628              String openSharePopup = "shareItem("+itemId+")";
     
    698697                    enablePropertyLink="<%=mode.hasPropertyLink()%>"
    699698                  /></tbl:cell>               
    700                 <tbl:cell column="rawDataType"><%=HTML.encodeTags(rdt.getName())%></tbl:cell>
     699                <tbl:cell column="rawDataType"><%=HTML.encodeTags(item.getRawDataType().getName())%></tbl:cell>
    701700                <tbl:cell column="arrayNum"><%=item.getArrayNum()%></tbl:cell>
    702701                <tbl:cell column="hasData"><%=item.hasData()%></tbl:cell>
  • trunk/www/views/rawbioassays/view_rawbioassay.jsp

    r4698 r4711  
    9999  String title = null;
    100100  RawBioAssay rawBioAssay = RawBioAssay.getById(dc, itemId);
    101   RawDataType rawDataType = rawBioAssay.getRawDataType();
     101  RawDataType rawDataType = null;
     102  try
     103  {
     104    rawDataType = rawBioAssay.getRawDataType();
     105  }
     106  catch (Throwable t)
     107  {}
    102108 
    103109  Job job = null;
     
    257263        image="runplugin.gif"
    258264        title="Create spot images&hellip;"
    259         visible="<%=writePermission && (rawBioAssay.getSpots() > 0) && rawDataType.isStoredInDb()%>"
     265        visible="<%=writePermission && (rawBioAssay.getSpots() > 0) && rawDataType != null && rawDataType.isStoredInDb()%>"
    260266      />
    261267      <tbl:button
     
    312318      <tr>
    313319        <td class="prompt">Raw data type</td>
    314         <td><%=HTML.encodeTags(rawDataType.getName())%></td>
     320        <td><base:catch><%=HTML.encodeTags(rawBioAssay.getRawDataType().getName())%></base:catch></td>
    315321      </tr>
    316322      <tr>
     
    659665      </t:tab>
    660666     
    661       <t:tab id="rawdata" title="Raw data" visible="<%=rawBioAssay.getSpots() > 0 && rawDataType.isStoredInDb() %>" />
     667      <t:tab id="rawdata" title="Raw data" visible="<%=rawBioAssay.getSpots() > 0 && rawDataType != null && rawDataType.isStoredInDb() %>" />
    662668      </t:tabcontrol>
    663669
Note: See TracChangeset for help on using the changeset viewer.