Rev 1340 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1338 | jmachado | 1 | <%@ page import="org.json.JSONObject"%><%@ page import="pt.estgp.estgweb.web.utils.RequestUtils"%><%@ page import="pt.utl.ist.berserk.logic.serviceManager.IServiceManager"%><%@ page import="pt.utl.ist.berserk.logic.serviceManager.ServiceManager"%><%@ page contentType="application/json;charset=UTF-8" language="java" %> |
2 | <% |
||
1346 | jmachado | 3 | try{ |
4 | |||
5 | |||
1340 | jmachado | 6 | String questionarioId = request.getParameter("questionarioId"); |
7 | String unidadeAfetaId = request.getParameter("unidadeAfetaId"); |
||
8 | String op = request.getParameter("op"); |
||
9 | String val = request.getParameter("val"); |
||
1338 | jmachado | 10 | |
1340 | jmachado | 11 | IServiceManager sm = ServiceManager.getInstance(); |
12 | String[] names = {"questionarioId","cursosAfetos"}; |
||
13 | Object[] args = {Long.parseLong(questionarioId),Long.parseLong(unidadeAfetaId),op,val}; |
||
1338 | jmachado | 14 | |
1340 | jmachado | 15 | sm.execute(RequestUtils.getRequester(request, response),"QuestionarioUpdateCheckVarPedagogico",args,names); |
1338 | jmachado | 16 | |
17 | |||
1340 | jmachado | 18 | JSONObject json = new JSONObject(); |
1338 | jmachado | 19 | |
1340 | jmachado | 20 | json.put("ok","ok"); |
21 | out.print(json.toString()); |
||
1346 | jmachado | 22 | }catch(Throwable e) |
23 | { |
||
24 | JSONObject json = new JSONObject(); |
||
25 | |||
26 | if(e.getCause() != null) |
||
27 | json.put("error",e.toString() + " - causa: " + e.getCause().toString()); |
||
28 | else |
||
29 | json.put("error",e.toString()); |
||
30 | |||
31 | out.print(json.toString()); |
||
32 | } |
||
1338 | jmachado | 33 | %> |
34 |