<%@page import="groovy.ui.SystemOutputInterceptor"%>
<%@page import="ibase.utility.BaseLogger"%>
<%@page import="ibase.webitm.ejb.DBAccessEJB"%>
<%@page import="ibase.utility.UserInfoBean"%>
<%@page import="ibase.ejb.CommonDBAccessEJB"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/xml" prefix="x" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>


<% 
	String tran_id= "",result_details = "", userId ="";

	tran_id = request.getParameter("tran_id");
	userId = request.getParameter("user_id");
	CommonDBAccessEJB commondb = new CommonDBAccessEJB();
	UserInfoBean userInfo =  commondb.createUserInfo(userId);
	DBAccessEJB dbAccessEJB = new DBAccessEJB();

	BaseLogger.log("3",userInfo,null,"tran_id : " +tran_id);
	BaseLogger.log("3",userInfo,null,"userId : " +userId);
	BaseLogger.log("3",userInfo,null,"userinfo : " +userInfo);
	BaseLogger.log("3",userInfo,null,"userInfo.getTransDB() : " +userInfo.getTransDB());

	try {
	
		result_details = dbAccessEJB.getDBColumnValue("follow_up_actions_logs", "result_details","tran_id= '"+tran_id+"' " ,userInfo.getTransDB());
		BaseLogger.log("3",userInfo,null,"result_details:"+result_details);
		request.setAttribute("resultDetails", result_details);
		result_details = "\""+result_details+"\"";
		BaseLogger.log("3",userInfo,null,"result_details with dble quotes in start and end"+result_details);

	}

	catch(Exception e)
	{
		e.printStackTrace();
		BaseLogger.log("3",userInfo,null," Exception"+e);
	
	}

	
%>



<!DOCTYPE html>
<html lang="en">

<head>

  <meta charset="utf-8">
  <title>Result Details</title>
</head>

 <style>

.leftside {

left: 10px;
font-weight: bold;
position: relative;

}

.escapedResultWidth{

width: 100px;
}

  </style>

 <body>


<div class="leftside">
<p> Result details : </p>
 </div>

<%
  String escapedResult = result_details
      .replace("&", "&")
      .replace("<", "<")
      .replace(">", ">")
      .replace("\"", "\"")
      .replace("'", "'");
%>

<div class="escapedResultWidth" id="resultoutput">

<div >
  <xmp>
    <%= escapedResult %>
  </xmp>
</div>




 </div>
    
</body>

<script> 

// function displayResultData() {

//	console.log("inside function displayresultdata() ");
// console.log("var datareceived :containing result_details data : "+dataReceived);
//var output = document.getElementById("resultoutput").innerHTML;
//console.log("resultoutput div : "+output);
//var resultDetails = document.getElementById("result_data").value;
//console.log("resultDetails:  "+resultDetails);
//document.getElementById("resultoutput").textContent = dataReceived; 
//console.log("new Output data:  "+output);


//} 

</script>

</html>
