www/lims/plates/merge_plates.jsp

Code
Comments
Other
Rev Date Author Line
1660 24 Nov 05 nicklas 1 <%-- $Id$
1660 24 Nov 05 nicklas 2   ------------------------------------------------------------------
3675 16 Aug 07 jari 3   Copyright (C) 2005 Nicklas Nordborg
5425 23 Sep 10 nicklas 4   Copyright (C) 2006 Jari Häkkinen, Nicklas Nordborg, Martin Svensson
1660 24 Nov 05 nicklas 5
2304 22 May 06 jari 6   This file is part of BASE - BioArray Software Environment.
2304 22 May 06 jari 7   Available at http://base.thep.lu.se/
1660 24 Nov 05 nicklas 8
1660 24 Nov 05 nicklas 9   BASE is free software; you can redistribute it and/or
1660 24 Nov 05 nicklas 10   modify it under the terms of the GNU General Public License
4476 05 Sep 08 jari 11   as published by the Free Software Foundation; either version 3
1660 24 Nov 05 nicklas 12   of the License, or (at your option) any later version.
1660 24 Nov 05 nicklas 13
1660 24 Nov 05 nicklas 14   BASE is distributed in the hope that it will be useful,
1660 24 Nov 05 nicklas 15   but WITHOUT ANY WARRANTY; without even the implied warranty of
1660 24 Nov 05 nicklas 16   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1660 24 Nov 05 nicklas 17   GNU General Public License for more details.
1660 24 Nov 05 nicklas 18
1660 24 Nov 05 nicklas 19   You should have received a copy of the GNU General Public License
4511 11 Sep 08 jari 20   along with BASE. If not, see <http://www.gnu.org/licenses/>.
1660 24 Nov 05 nicklas 21   ------------------------------------------------------------------
1660 24 Nov 05 nicklas 22
1660 24 Nov 05 nicklas 23
1660 24 Nov 05 nicklas 24   @author Nicklas
1660 24 Nov 05 nicklas 25   @version 2.0
1660 24 Nov 05 nicklas 26 --%>
5426 24 Sep 10 nicklas 27 <%@ page pageEncoding="UTF-8" session="false"
1660 24 Nov 05 nicklas 28   import="net.sf.basedb.core.SessionControl"
1660 24 Nov 05 nicklas 29   import="net.sf.basedb.core.DbControl"
1660 24 Nov 05 nicklas 30   import="net.sf.basedb.core.Item"
2598 28 Aug 06 nicklas 31   import="net.sf.basedb.core.ItemContext"
1660 24 Nov 05 nicklas 32   import="net.sf.basedb.core.Permission"
1660 24 Nov 05 nicklas 33   import="net.sf.basedb.core.Plate"
2598 28 Aug 06 nicklas 34   import="net.sf.basedb.core.PlateType"
2598 28 Aug 06 nicklas 35   import="net.sf.basedb.core.PlateMapping"
1660 24 Nov 05 nicklas 36   import="net.sf.basedb.core.BaseException"
1660 24 Nov 05 nicklas 37   import="net.sf.basedb.clients.web.Base"
1660 24 Nov 05 nicklas 38   import="net.sf.basedb.clients.web.util.HTML"
2753 20 Oct 06 nicklas 39   import="net.sf.basedb.util.Values"
2598 28 Aug 06 nicklas 40   import="java.util.List"
1660 24 Nov 05 nicklas 41 %>
1660 24 Nov 05 nicklas 42 <%@ taglib prefix="base" uri="/WEB-INF/base.tld" %>
1660 24 Nov 05 nicklas 43 <%@ taglib prefix="t" uri="/WEB-INF/tab.tld" %>
1660 24 Nov 05 nicklas 44 <%
1660 24 Nov 05 nicklas 45 final Item itemType = Item.PLATE;
1660 24 Nov 05 nicklas 46 final SessionControl sc = Base.getExistingSessionControl(pageContext, Permission.CREATE, itemType);
2598 28 Aug 06 nicklas 47 final ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, null);
1660 24 Nov 05 nicklas 48 final String ID = sc.getId();
1660 24 Nov 05 nicklas 49 final float scale = Base.getScale(sc);
7954 12 May 21 nicklas 50 final DbControl dc = sc.newDbControl("Merge plates wizard step 2");
1660 24 Nov 05 nicklas 51 try
1660 24 Nov 05 nicklas 52 {
1660 24 Nov 05 nicklas 53   String title = "Merge plates -- step 1 of 2 -- Select mapping";
2598 28 Aug 06 nicklas 54   
2598 28 Aug 06 nicklas 55   // Load recently used items
7605 26 Feb 19 nicklas 56   List<PlateMapping> recentPlateMappings = cc.getRecent(dc, Item.PLATEMAPPING);
7605 26 Feb 19 nicklas 57   List<PlateType> recentPlateTypes = cc.getRecent(dc, Item.PLATETYPE);
1660 24 Nov 05 nicklas 58   %>
1660 24 Nov 05 nicklas 59
6312 28 Aug 13 nicklas 60   <base:page type="popup" title="<%=title%>" id="step-1">
6312 28 Aug 13 nicklas 61   <base:head scripts="~merge_plates.js" />
1660 24 Nov 05 nicklas 62   <base:body>
5920 10 Jan 12 nicklas 63     <h1><%=title%> <base:help helpid="plates.merge.1" /></h1>
6162 10 Oct 12 nicklas 64     <form action="merge_plates_2.jsp?ID=<%=ID%>" method="post" name="merge">
1660 24 Nov 05 nicklas 65
5920 10 Jan 12 nicklas 66     <div class="content bottomborder">
5920 10 Jan 12 nicklas 67       <table class="fullform input100 smaller">
1660 24 Nov 05 nicklas 68       <tr>
5920 10 Jan 12 nicklas 69         <th>Plate mapping</th>
1660 24 Nov 05 nicklas 70         <td>
2598 28 Aug 06 nicklas 71           <base:select 
2598 28 Aug 06 nicklas 72             id="platemapping_id"
2598 28 Aug 06 nicklas 73             clazz="selectionlist required"
2598 28 Aug 06 nicklas 74             required="true"
2598 28 Aug 06 nicklas 75             current="<%=null%>"
2598 28 Aug 06 nicklas 76             recent="<%=recentPlateMappings%>"
2598 28 Aug 06 nicklas 77             newitem="true"
2598 28 Aug 06 nicklas 78           />
1660 24 Nov 05 nicklas 79         </td>
1660 24 Nov 05 nicklas 80       </tr>
1660 24 Nov 05 nicklas 81       <tr>
6146 21 Sep 12 nicklas 82         <th>Name</th>
6217 14 Dec 12 nicklas 83         <td><input class="text required" type="text" name="name" value="New plate" 
5920 10 Jan 12 nicklas 84           maxlength="<%=Plate.MAX_NAME_LENGTH%>"></td>
1660 24 Nov 05 nicklas 85       </tr>
1660 24 Nov 05 nicklas 86       <tr>
5920 10 Jan 12 nicklas 87         <th>Plate type</th>
1660 24 Nov 05 nicklas 88         <td>
2598 28 Aug 06 nicklas 89           <base:select 
2598 28 Aug 06 nicklas 90             id="platetype_id"
2598 28 Aug 06 nicklas 91             clazz="selectionlist required"
2598 28 Aug 06 nicklas 92             required="true"
2598 28 Aug 06 nicklas 93             current="<%=null%>"
2598 28 Aug 06 nicklas 94             recent="<%=recentPlateTypes%>"
2598 28 Aug 06 nicklas 95             newitem="true"
2598 28 Aug 06 nicklas 96           />
1660 24 Nov 05 nicklas 97         </td>
1660 24 Nov 05 nicklas 98       </tr>
5920 10 Jan 12 nicklas 99       <tr class="dynamic">
5920 10 Jan 12 nicklas 100         <th></th>
5920 10 Jan 12 nicklas 101         <td></td>
5920 10 Jan 12 nicklas 102       </tr>
1660 24 Nov 05 nicklas 103       </table>
1660 24 Nov 05 nicklas 104     </div>
5920 10 Jan 12 nicklas 105     </form>
5920 10 Jan 12 nicklas 106     <div class="legend">
5946 03 Feb 12 nicklas 107       <base:icon image="required.png" />= required information
5920 10 Jan 12 nicklas 108     </div>
5920 10 Jan 12 nicklas 109     
5920 10 Jan 12 nicklas 110     <base:buttongroup subclass="dialogbuttons">
6312 28 Aug 13 nicklas 111       <base:button id="btnNext" title="Next" />
6312 28 Aug 13 nicklas 112       <base:button id="close" title="Cancel" />
5920 10 Jan 12 nicklas 113     </base:buttongroup>
1660 24 Nov 05 nicklas 114
1660 24 Nov 05 nicklas 115   </base:body>
1660 24 Nov 05 nicklas 116   </base:page>
1660 24 Nov 05 nicklas 117   <%
1660 24 Nov 05 nicklas 118 }
1660 24 Nov 05 nicklas 119 finally
1660 24 Nov 05 nicklas 120 {
1660 24 Nov 05 nicklas 121   if (dc != null) dc.close();
1660 24 Nov 05 nicklas 122 }
1660 24 Nov 05 nicklas 123 %>