3610 |
27 Jul 07 |
nicklas |
1 |
<%-- $Id$ |
3610 |
27 Jul 07 |
nicklas |
2 |
------------------------------------------------------------------ |
3675 |
16 Aug 07 |
jari |
Copyright (C) 2007 Nicklas Nordborg |
3610 |
27 Jul 07 |
nicklas |
4 |
|
3610 |
27 Jul 07 |
nicklas |
5 |
This file is part of BASE - BioArray Software Environment. |
3610 |
27 Jul 07 |
nicklas |
6 |
Available at http://base.thep.lu.se/ |
3610 |
27 Jul 07 |
nicklas |
7 |
|
3610 |
27 Jul 07 |
nicklas |
8 |
BASE is free software; you can redistribute it and/or |
3610 |
27 Jul 07 |
nicklas |
9 |
modify it under the terms of the GNU General Public License |
4476 |
05 Sep 08 |
jari |
10 |
as published by the Free Software Foundation; either version 3 |
3610 |
27 Jul 07 |
nicklas |
11 |
of the License, or (at your option) any later version. |
3610 |
27 Jul 07 |
nicklas |
12 |
|
3610 |
27 Jul 07 |
nicklas |
13 |
BASE is distributed in the hope that it will be useful, |
3610 |
27 Jul 07 |
nicklas |
14 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
3610 |
27 Jul 07 |
nicklas |
15 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3610 |
27 Jul 07 |
nicklas |
16 |
GNU General Public License for more details. |
3610 |
27 Jul 07 |
nicklas |
17 |
|
3610 |
27 Jul 07 |
nicklas |
18 |
You should have received a copy of the GNU General Public License |
4510 |
11 Sep 08 |
jari |
19 |
along with BASE. If not, see <http://www.gnu.org/licenses/>. |
3610 |
27 Jul 07 |
nicklas |
20 |
------------------------------------------------------------------ |
3610 |
27 Jul 07 |
nicklas |
21 |
|
3610 |
27 Jul 07 |
nicklas |
22 |
@author Nicklas |
3610 |
27 Jul 07 |
nicklas |
23 |
@version 2.0 |
3610 |
27 Jul 07 |
nicklas |
24 |
--%> |
5426 |
24 Sep 10 |
nicklas |
25 |
<%@ page pageEncoding="UTF-8" session="false" |
3610 |
27 Jul 07 |
nicklas |
26 |
import="net.sf.basedb.core.SessionControl" |
3610 |
27 Jul 07 |
nicklas |
27 |
import="net.sf.basedb.core.ItemContext" |
3610 |
27 Jul 07 |
nicklas |
28 |
import="net.sf.basedb.core.Item" |
3610 |
27 Jul 07 |
nicklas |
29 |
import="net.sf.basedb.clients.web.Base" |
3610 |
27 Jul 07 |
nicklas |
30 |
import="net.sf.basedb.util.Values" |
3610 |
27 Jul 07 |
nicklas |
31 |
%> |
3610 |
27 Jul 07 |
nicklas |
32 |
<% |
3868 |
19 Oct 07 |
nicklas |
33 |
response.setHeader("Cache-Control","no-cache"); //HTTP 1.1 |
3868 |
19 Oct 07 |
nicklas |
34 |
response.setHeader("Pragma","no-cache"); //HTTP 1.0 |
3868 |
19 Oct 07 |
nicklas |
35 |
response.setDateHeader ("Expires", 0); //prevents caching at the proxy server |
3610 |
27 Jul 07 |
nicklas |
36 |
final SessionControl sc = Base.getExistingSessionControl(pageContext, true); |
3610 |
27 Jul 07 |
nicklas |
37 |
final Item itemType = Item.valueOf(request.getParameter("itemType")); |
3610 |
27 Jul 07 |
nicklas |
38 |
final String subcontext = request.getParameter("subcontext"); |
3610 |
27 Jul 07 |
nicklas |
39 |
final ItemContext cc = sc.getCurrentContext(itemType, subcontext); |
3610 |
27 Jul 07 |
nicklas |
40 |
if (cc != null) |
3610 |
27 Jul 07 |
nicklas |
41 |
{ |
3610 |
27 Jul 07 |
nicklas |
42 |
final String sectionId = Values.getStringOrNull(request.getParameter("sectionId")); |
3610 |
27 Jul 07 |
nicklas |
43 |
if (sectionId != null) |
3610 |
27 Jul 07 |
nicklas |
44 |
{ |
3610 |
27 Jul 07 |
nicklas |
45 |
boolean visible = Values.getBoolean(request.getParameter("visible")); |
3610 |
27 Jul 07 |
nicklas |
46 |
cc.setSetting("section." + sectionId, visible ? "1" : "0"); |
3610 |
27 Jul 07 |
nicklas |
47 |
} |
3610 |
27 Jul 07 |
nicklas |
48 |
} |
3675 |
16 Aug 07 |
jari |
49 |
%> |