use of org.compiere.model.MChatEntry in project adempiere by adempiere.
the class AChat method actionPerformed.
// loadChat
/**
* Action Performed
* @param e event
*/
public void actionPerformed(ActionEvent e) {
if (e.getActionCommand().equals(ConfirmPanel.A_OK)) {
String data = newText.getText();
if (data != null && data.length() > 0) {
log.config(data);
if (m_chat.get_ID() == 0)
m_chat.saveEx();
MChatEntry entry = new MChatEntry(m_chat, data);
entry.saveEx();
}
// data to be saved
}
dispose();
}
use of org.compiere.model.MChatEntry 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);
}
Aggregations