6157 |
02 Mar 21 |
nicklas |
1 |
<%@ page pageEncoding="UTF-8" session="false" |
6157 |
02 Mar 21 |
nicklas |
2 |
import="net.sf.basedb.core.SessionControl" |
6157 |
02 Mar 21 |
nicklas |
3 |
import="net.sf.basedb.clients.web.Base" |
6157 |
02 Mar 21 |
nicklas |
4 |
import="net.sf.basedb.util.Values" |
6157 |
02 Mar 21 |
nicklas |
5 |
import="net.sf.basedb.clients.web.WebException" |
6157 |
02 Mar 21 |
nicklas |
6 |
import="net.sf.basedb.clients.web.util.HTML" |
6157 |
02 Mar 21 |
nicklas |
7 |
%> |
6157 |
02 Mar 21 |
nicklas |
8 |
<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %> |
6157 |
02 Mar 21 |
nicklas |
9 |
<% |
6157 |
02 Mar 21 |
nicklas |
10 |
SessionControl sc = Base.getExistingSessionControl(pageContext, true); |
6157 |
02 Mar 21 |
nicklas |
11 |
String ID = sc.getId(); |
6157 |
02 Mar 21 |
nicklas |
12 |
String cmd = request.getParameter("cmd"); |
6157 |
02 Mar 21 |
nicklas |
13 |
String message = ""; |
6157 |
02 Mar 21 |
nicklas |
14 |
String root = request.getContextPath()+"/"; |
6157 |
02 Mar 21 |
nicklas |
15 |
|
6157 |
02 Mar 21 |
nicklas |
16 |
String forward = null; |
6157 |
02 Mar 21 |
nicklas |
17 |
try |
6157 |
02 Mar 21 |
nicklas |
18 |
{ |
6157 |
02 Mar 21 |
nicklas |
19 |
if ("SaveOptions".equals(cmd)) |
6157 |
02 Mar 21 |
nicklas |
20 |
{ |
6157 |
02 Mar 21 |
nicklas |
21 |
String indexId = Values.getString(request.getParameter("indexId"), "filtered"); |
6157 |
02 Mar 21 |
nicklas |
22 |
sc.setUserClientSetting("net.sf.basedb.varsearch.visible-columns."+indexId, Values.getStringOrNull(request.getParameter("visibleColumns"))); |
6157 |
02 Mar 21 |
nicklas |
23 |
message = "The options have been saved"; |
6157 |
02 Mar 21 |
nicklas |
24 |
} |
6157 |
02 Mar 21 |
nicklas |
25 |
else |
6157 |
02 Mar 21 |
nicklas |
26 |
{ |
6157 |
02 Mar 21 |
nicklas |
27 |
throw new WebException("popup", "Invalid command", "The command {1} is not recognised as a valid command.", cmd); |
6157 |
02 Mar 21 |
nicklas |
28 |
} |
6157 |
02 Mar 21 |
nicklas |
29 |
} |
6157 |
02 Mar 21 |
nicklas |
30 |
finally |
6157 |
02 Mar 21 |
nicklas |
31 |
{ |
6157 |
02 Mar 21 |
nicklas |
32 |
} |
6157 |
02 Mar 21 |
nicklas |
33 |
|
6157 |
02 Mar 21 |
nicklas |
34 |
if (forward != null) |
6157 |
02 Mar 21 |
nicklas |
35 |
{ |
6157 |
02 Mar 21 |
nicklas |
36 |
pageContext.forward(forward); |
6157 |
02 Mar 21 |
nicklas |
37 |
} |
6157 |
02 Mar 21 |
nicklas |
38 |
else |
6157 |
02 Mar 21 |
nicklas |
39 |
{ |
6157 |
02 Mar 21 |
nicklas |
40 |
response.sendRedirect(root + "common/close_popup.jsp?ID="+ID+"&refresh_opener=1&message="+HTML.urlEncode(message)); |
6157 |
02 Mar 21 |
nicklas |
41 |
} |
6157 |
02 Mar 21 |
nicklas |
42 |
%> |
6157 |
02 Mar 21 |
nicklas |
43 |
|