use of org.compiere.util.WebDoc in project adempiere by adempiere.
the class WForm method doPost.
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
WebDoc doc = WebDoc.create("WForm - Post - Not Implemented Yet");
WebUtil.createResponse(request, response, this, null, doc, false);
}
use of org.compiere.util.WebDoc in project adempiere by adempiere.
the class WAttachment method doGet.
/**
* Process the HTTP Get request.
* Initial display and streaming
* @param request request
* @param response response
*/
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
log.info("From " + request.getRemoteHost() + " - " + request.getRemoteAddr());
HttpSession session = request.getSession(false);
WWindowStatus ws = WWindowStatus.get(request);
WebDoc doc = null;
if (session == null || ws == null) {
doc = WebDoc.createPopup("No Context");
//Modified by Rob Klein 4/29/07
doc.addPopupClose(ws.ctx);
} else {
m_error = null;
int AD_Attachment_ID = WebUtil.getParameterAsInt(request, P_Attachment_ID);
if (AD_Attachment_ID != 0) {
int attachmentIndex = WebUtil.getParameterAsInt(request, P_ATTACHMENT_INDEX);
if (attachmentIndex != 0) {
m_error = streamAttachment(AD_Attachment_ID, attachmentIndex, response, ws);
if (m_error == null)
return;
}
}
MAttachment attachment = null;
if (AD_Attachment_ID != 0)
attachment = new MAttachment(ws.ctx, ws.curTab.getAD_AttachmentID(), null);
else
attachment = new MAttachment(ws.ctx, ws.curTab.getAD_Table_ID(), ws.curTab.getRecord_ID(), null);
doc = createPage(ws.ctx, attachment, m_error);
}
//
WebUtil.createResponse(request, response, this, null, doc, false);
}
use of org.compiere.util.WebDoc in project adempiere by adempiere.
the class WChat method doPost.
// doGet
/**
* Process the HTTP Post request
*/
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
WebDoc doc = null;
WebSessionCtx wsc = WebSessionCtx.get(request);
WWindowStatus ws = WWindowStatus.get(request);
String data = WebUtil.getParameter(request, "chatinput");
int CM_ChatID = WebUtil.getParameterAsInt(request, "CM_ChatID");
int AD_Table_ID = WebUtil.getParameterAsInt(request, "AD_Table_ID");
int record_ID = WebUtil.getParameterAsInt(request, "record_ID");
String description = WebUtil.getParameter(request, "description");
if (data != null && data.length() > 0) {
if (CM_ChatID == 0) {
m_chat = new MChat(wsc.ctx, AD_Table_ID, record_ID, description, null);
m_chat.saveEx();
}
MChatEntry entry = new MChatEntry(m_chat, data);
entry.saveEx();
}
// data to be saved
doc = CreateChatPage(ws, wsc, doc, m_chat.getCM_Chat_ID());
WebUtil.createResponse(request, response, this, null, doc, false);
}
use of org.compiere.util.WebDoc in project adempiere by adempiere.
the class WFindAdv method doPost.
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
HttpSession sess = request.getSession(false);
WWindowStatus ws = null;
WebSessionCtx wsc = WebSessionCtx.get(request);
if (sess != null)
ws = WWindowStatus.get(request);
if (wsc == null) {
WebUtil.createTimeoutPage(request, response, this, null);
return;
}
String pTab = request.getParameter(P_Tab);
WebDoc doc = preparePage();
body body = doc.getBody();
if (pTab != null && pTab.equals("FindAdv")) {
body.addElement(createPageFindAdv(request, response, ws));
} else {
body.addElement(createPageFind(request, response, ws));
}
WebUtil.createResponse(request, response, this, null, doc, true);
}
use of org.compiere.util.WebDoc in project adempiere by adempiere.
the class Test method doPost.
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
WebDoc doc = WebDoc.create("Post Request Test");
WebUtil.createResponse(request, response, this, null, doc, true);
}
Aggregations