Search in sources :

Example 21 with WebDoc

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

the class WChat method doGet.

//  init
/**
	 * Process the HTTP Get request
	 */
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    log.fine("doGet");
    WebSessionCtx wsc = WebSessionCtx.get(request);
    WWindowStatus ws = WWindowStatus.get(request);
    //
    WebDoc doc = null;
    if (ws == null) {
        doc = WebDoc.createPopup("No Context");
        doc.addPopupClose(wsc.ctx);
    } else {
        doc = CreateChatPage(ws, wsc, doc, 0);
    }
    //
    WebUtil.createResponse(request, response, this, null, doc, false);
}
Also used : WebDoc(org.compiere.util.WebDoc) WebSessionCtx(org.compiere.util.WebSessionCtx)

Example 22 with WebDoc

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

the class Test method doGet.

public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    WebDoc doc = WebDoc.create("Get Request Test");
    WebUtil.createResponse(request, response, this, null, doc, true);
}
Also used : WebDoc(org.compiere.util.WebDoc)

Example 23 with WebDoc

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

the class WAccount method doGet.

public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    log.config("WAccount.doGet");
    WebSessionCtx wsc = WebSessionCtx.get(request);
    WWindowStatus ws = WWindowStatus.get(request);
    if (wsc == null || ws == null) {
        WebUtil.createTimeoutPage(request, response, this, null);
        return;
    }
    String columnName = WebUtil.getParameter(request, "ColumnName");
    GridField mField = ws.curTab.getField(columnName);
    log.config(" ColumnName=" + columnName + ", MField=" + mField.toString());
    if (mField == null || columnName == null || columnName.equals("")) {
        WebUtil.createTimeoutPage(request, response, this, Msg.getMsg(wsc.ctx, "ParameterMissing"));
        return;
    }
    String target = "opener.document.WForm." + columnName;
    WebDoc doc = WebDoc.create(mField.getHeader());
    body body = doc.getBody();
    body.setOnBlur("self.focus();");
    body.addElement(fillTable(ws, mField, target));
    button reset = new button();
    reset.addElement("Reset");
    reset.setOnClick(target + "D.value='';" + target + "F.value='';window.close();");
    button cancel = new button();
    cancel.addElement("Cancel");
    cancel.setOnClick("window.close();");
    body.addElement(new p(AlignType.RIGHT).addElement(reset).addElement("&nbsp").addElement(cancel));
    WebUtil.createResponse(request, response, this, null, doc, true);
}
Also used : org.apache.ecs.xhtml.button(org.apache.ecs.xhtml.button) Lookup(org.compiere.model.Lookup) org.apache.ecs.xhtml.p(org.apache.ecs.xhtml.p) WebDoc(org.compiere.util.WebDoc) GridField(org.compiere.model.GridField) WebSessionCtx(org.compiere.util.WebSessionCtx) org.apache.ecs.xhtml.body(org.apache.ecs.xhtml.body)

Example 24 with WebDoc

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

the class WAttachment method doPost.

//  doGet
/**
	 *  Process the HTTP Post request.
	 *  Update Attachment
	 *  @param request request
	 *  @parem response response
	 */
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    log.info("From " + request.getRemoteHost() + " - " + request.getRemoteAddr());
    HttpSession sess = request.getSession(false);
    WWindowStatus ws = WWindowStatus.get(request);
    //
    WebDoc doc = null;
    if (ws == null)
        doc = WebDoc.create("Help - No Context");
    else {
        MAttachment attachment = processPost(request, response, ws);
        doc = createPage(ws.ctx, attachment, m_error);
    }
    //
    WebUtil.createResponse(request, response, this, null, doc, false);
}
Also used : MAttachment(org.compiere.model.MAttachment) HttpSession(javax.servlet.http.HttpSession) WebDoc(org.compiere.util.WebDoc)

Example 25 with WebDoc

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

the class WFindAdv method preparePage.

private WebDoc preparePage() {
    WebDoc doc = WebDoc.create("Find Advance");
    head header = doc.getHead();
    header.addElement(new script("", WebEnv.getBaseDirectory("js/window.js")));
    header.addElement(new script("", WebEnv.getBaseDirectory("/js/check.js")));
    header.addElement(new link().setRel("stylesheet").setHref(WebEnv.getBaseDirectory("css/window.css")));
    return doc;
}
Also used : org.apache.ecs.xhtml.head(org.apache.ecs.xhtml.head) WebDoc(org.compiere.util.WebDoc) org.apache.ecs.xhtml.link(org.apache.ecs.xhtml.link) org.apache.ecs.xhtml.script(org.apache.ecs.xhtml.script)

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