<%@ page import="java.io.*" %>
<%@ page import="java.util.HashMap" %>
<%@ page import="java.util.ArrayList" %>
<%@ page import="java.net.*" %>
<%@ page import="ibase.webitm.bean.wiz.*" %>
<%@ page import="ibase.utility.*" %>
<%@ page import="ibase.webitm.servlet.ITMWizardHandlerServlet" %>
<%@page import = "java.lang.*,java.util.*, ibase.webitm.bean.wms.PorderDetailBean"%>

<%
	System.out.println("***********In Porder Page JSP********************");
	String htmlData = "";
	
	try
	{
		ibase.utility.UserInfoBean userInfo = ( ibase.utility.UserInfoBean )session.getAttribute( "USER_INFO" );
		
		
		if( userInfo == null )
		{
			out.println("Your session has been expired. Please re-login.");
		}

		String objName = request.getParameter("OBJ_NAME");
		String PRE_FORM_VAL =  ( request.getParameter( "PRE_FORM_VAL"  ) != null ) ? request.getParameter( "PRE_FORM_VAL"  ) : "";
		String formType = request.getParameter("formType");//Type of form
		String editorId = request.getParameter("EDITOR_ID");
		String directAcc =  ( request.getParameter( "DIRECT_ACC"  ) != null ) ? request.getParameter( "DIRECT_ACC"  ) : "Y";
		
		System.out.println("objName : " + objName);
		ITMWizardBean itmWizardBean;
				
		String transDB = userInfo.getTransDB();
		System.out.println("TransDB E12 name is : " + transDB);
		if(transDB != null && !"null".equalsIgnoreCase(transDB.trim()) && transDB.trim().length() > 0)
		{
			itmWizardBean = new ITMWizardBean( objName, request.getSession(), userInfo );
		}
		else
		{
			itmWizardBean = new ITMWizardBean( objName, request.getSession() );			
		}
		request.getSession().setAttribute( "WIZARD_BEAN_" + objName, itmWizardBean );
		
		PorderDetailBean supp = new PorderDetailBean();
		
        htmlData = supp.nextForm("1", PRE_FORM_VAL);
	}
	
	catch(Exception e)
	{
		e.printStackTrace();
	}

%>

<div id="detailData" style="display: ">
<%=htmlData%>
</div>
