<%@ page language="java" contentType="text/plain;charset=UTF-8"%> <%@ page import="com.edeal.frontline.navigation.FlRequest" %> <%@ page import="com.edeal.frontline.FlContext" %> <%@ page import="com.edeal.frontline.Utils" %> <%@ page import="java.util.HashMap" %> <%@ page import="com.edeal.frontline.DocumentBean" %> <%@ page import="org.json.JSONObject" %> <%@ page import="com.edeal.frontline.FieldNotInitializedException" %> <% FlRequest flRequest = new FlRequest(request); FlContext context = flRequest.getContext(); String toString = flRequest.getRequestParameterOrAttribute("toStringValue"); String id = flRequest.getRequestParameterOrAttribute("beanId"); String langage = ""; String att = ""; JSONObject jsonResponse = new JSONObject(); jsonResponse.put("beanId", Utils.isEmpty(id) ? "" : id ); jsonResponse.put("toStringValue", Utils.isEmpty(toString) ? "" : toString ); // seulement lorsqu'on rappatrie un ID d'un doc de fusion d'une interaction if(id != null) { DocumentBean doc = new DocumentBean(id, context); try { langage = doc.getDocLngID(); } catch (FieldNotInitializedException fnie) { } try { att = doc.getDocAttID(); } catch (FieldNotInitializedException fnie) { } } jsonResponse.put("lngId", langage); jsonResponse.put("attId", att); %> <%= jsonResponse.toString() %>