Search in sources :

Example 36 with WebDoc

use of org.compiere.util.WebDoc in project adempiere by adempiere.

the class WWorkflow method doGet.

//  init
/**
	 *  Process the HTTP Get request - Initial Call.
	 *  <br>
	 *  http://localhost/adempiere/WWorkflow?AD_Menu_ID=123
	 *  <br>
	 *
	 *  Find the AD_Workflow_ID
	 *  Load workflow and initial session atribute
	 *  Create output
	 *
	 *  @param request
	 *  @param response
	 *  @throws ServletException
	 *  @throws IOException
	 */
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    //Log.trace(Log.l1_User, "WWorkflow.doGet");
    //WUtil.debug(new String("In do get"),"");
    //  Get Session attributes
    HttpSession sess = request.getSession();
    WebSessionCtx wsc = WebSessionCtx.get(request);
    ctx = wsc.ctx;
    //String loginInfo = (String)sess.getAttribute(WebEnv.SA_LOGININFO);
    if (ctx == null) {
        WebUtil.createTimeoutPage(request, response, this, null);
        return;
    }
    //  Get Parameter: Menu_ID
    int AD_Menu_ID = WebUtil.getParameterAsInt(request, "AD_Menu_ID");
    //  Get Parameter: Menu_ID
    int AD_Window_ID = WebUtil.getParameterAsInt(request, "AD_Window_ID");
    //set language
    AD_Language = Env.getAD_Language(ctx);
    //load AD_Workflow_ID
    int AD_Workflow_ID = getAD_Workflow_ID(AD_Menu_ID);
    //load workflow
    loadWorkflow(ctx, AD_Workflow_ID, sess);
    //get session attributes
    MWorkflow wf = (MWorkflow) sess.getAttribute(WORKFLOW);
    MWFNode[] nodes = (MWFNode[]) sess.getAttribute(NODES);
    ArrayList nodes_ID = (ArrayList) sess.getAttribute(NODES_ID);
    int[][] imageMap = (int[][]) sess.getAttribute(IMAGE_MAP);
    int activeNode = ((Integer) sess.getAttribute(ACTIVE_NODE)).intValue();
    //create output
    WebDoc doc = preparePage("loginInfo");
    doc = createLayout(doc, wf, activeNode, nodes, nodes_ID, imageMap);
    WebUtil.createResponse(request, response, this, null, doc, false);
}
Also used : HttpSession(javax.servlet.http.HttpSession) WebDoc(org.compiere.util.WebDoc) MWorkflow(org.compiere.wf.MWorkflow) ArrayList(java.util.ArrayList) MWFNode(org.compiere.wf.MWFNode) WebSessionCtx(org.compiere.util.WebSessionCtx)

Example 37 with WebDoc

use of org.compiere.util.WebDoc in project adempiere by adempiere.

the class WTask method doGet.

public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    WebDoc doc = WebDoc.create("WTask - Get - Not Implemented Yet");
    WebUtil.createResponse(request, response, this, null, doc, false);
}
Also used : WebDoc(org.compiere.util.WebDoc)

Example 38 with WebDoc

use of org.compiere.util.WebDoc in project adempiere by adempiere.

the class WTask method doPost.

public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    WebDoc doc = WebDoc.create("WTask - Post - Not Implemented Yet");
    WebUtil.createResponse(request, response, this, null, doc, false);
}
Also used : WebDoc(org.compiere.util.WebDoc)

Example 39 with WebDoc

use of org.compiere.util.WebDoc in project adempiere by adempiere.

the class WTest method doPost.

//  doGet
/**
	 *  Process the HTTP Post request
	 */
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    WebDoc doc = WebDoc.createPopup("Test - Post - Not Implemented");
    WebUtil.createResponse(request, response, this, null, doc, false);
}
Also used : WebDoc(org.compiere.util.WebDoc)

Example 40 with WebDoc

use of org.compiere.util.WebDoc in project adempiere by adempiere.

the class WValuePreference method doPost.

//  doGet
/**
	 *  Process the HTTP Post request.
	 *  Get Parameters and Process
	 *	@param request 
	 *	@param response 
	 *	@throws ServletException 
	 *	@throws IOException 
	 */
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    WebDoc doc = null;
    //  Get Session attributes
    WebSessionCtx wsc = WebSessionCtx.get(request);
    WWindowStatus ws = WWindowStatus.get(request);
    String m_UpdateResult = "";
    if (wsc == null) {
        WebUtil.createTimeoutPage(request, response, this, null);
        return;
    }
    log.info("This is #1");
    m_Client = WebUtil.getParameterAsBoolean(request, "Client");
    m_User = WebUtil.getParameterAsBoolean(request, "User");
    m_Window = WebUtil.getParameterAsBoolean(request, "Window");
    m_Org = WebUtil.getParameterAsBoolean(request, "Org");
    log.info("This is #2");
    String m_Action = WebUtil.getParameter(request, "PostAction");
    setExplanation();
    log.info("This is the m_Action" + m_Action);
    if (m_Action.equals("Delete"))
        m_UpdateResult = delete(m_Client, m_User, m_Window, m_Org);
    else if (m_Action.equals("Add"))
        m_UpdateResult = insert(m_Client, m_User, m_Window, m_Org);
    log.info("This is the call");
    doc = createParameterPage(ws, wsc, request, m_UpdateResult);
    WebUtil.createResponse(request, response, this, null, doc, false);
    return;
//Modified by Rob Klein 6/01/07
//WebDoc doc = createProcessPage(request, AD_Process_ID, AD_Window_ID);
//createProcessPage(request, response, AD_Process_ID, AD_Window_ID);
//
}
Also used : WebDoc(org.compiere.util.WebDoc) WebSessionCtx(org.compiere.util.WebSessionCtx)

Aggregations

WebDoc (org.compiere.util.WebDoc)58 WebSessionCtx (org.compiere.util.WebSessionCtx)21 HttpSession (javax.servlet.http.HttpSession)13 org.apache.ecs.xhtml.td (org.apache.ecs.xhtml.td)13 org.apache.ecs.xhtml.p (org.apache.ecs.xhtml.p)12 org.apache.ecs.xhtml.tr (org.apache.ecs.xhtml.tr)12 org.apache.ecs.xhtml.table (org.apache.ecs.xhtml.table)11 org.apache.ecs.xhtml.body (org.apache.ecs.xhtml.body)9 org.apache.ecs.xhtml.input (org.apache.ecs.xhtml.input)9 org.apache.ecs.xhtml.form (org.apache.ecs.xhtml.form)8 org.apache.ecs.xhtml.script (org.apache.ecs.xhtml.script)7 Timestamp (java.sql.Timestamp)6 org.apache.ecs.xhtml.a (org.apache.ecs.xhtml.a)6 GridField (org.compiere.model.GridField)5 SQLException (java.sql.SQLException)4 org.apache.ecs.xhtml.i (org.apache.ecs.xhtml.i)4 File (java.io.File)3 IOException (java.io.IOException)3 Properties (java.util.Properties)3 ServletException (javax.servlet.ServletException)3