IDEMPIERE-2389:Print format and Report type selection on process dialog
message when finish process is don't change
This commit is contained in:
parent
58254de9a4
commit
d959dbff8f
|
@ -121,7 +121,6 @@ public abstract class AbstractProcessDialog extends Window implements IProcessUI
|
|||
private BusyDialog progressWindow;
|
||||
|
||||
private String m_Name = null;
|
||||
private StringBuffer m_messageText = new StringBuffer();
|
||||
private String m_ShowHelp = null; // Determine if a Help Process Window is shown
|
||||
private String initialMessage;
|
||||
|
||||
|
@ -178,23 +177,26 @@ public abstract class AbstractProcessDialog extends Window implements IProcessUI
|
|||
if (trl)
|
||||
pstmt.setString(2, Env.getAD_Language(m_ctx));
|
||||
rs = pstmt.executeQuery();
|
||||
StringBuilder buildMsg = new StringBuilder();
|
||||
if (rs.next())
|
||||
{
|
||||
m_Name = rs.getString(1);
|
||||
m_ShowHelp = rs.getString(5);
|
||||
//
|
||||
m_messageText.append("<b>");
|
||||
buildMsg.append("<b>");
|
||||
String s = rs.getString(2); // Description
|
||||
if (rs.wasNull())
|
||||
m_messageText.append(Msg.getMsg(m_ctx, "StartProcess?"));
|
||||
buildMsg.append(Msg.getMsg(m_ctx, "StartProcess?"));
|
||||
else
|
||||
m_messageText.append(s);
|
||||
m_messageText.append("</b>");
|
||||
buildMsg.append(s);
|
||||
buildMsg.append("</b>");
|
||||
|
||||
s = rs.getString(3); // Help
|
||||
if (!rs.wasNull())
|
||||
m_messageText.append("<p>").append(s).append("</p>");
|
||||
buildMsg.append("<p>").append(s).append("</p>");
|
||||
}
|
||||
|
||||
initialMessage = buildMsg.toString();
|
||||
}
|
||||
catch (SQLException e)
|
||||
{
|
||||
|
@ -210,7 +212,6 @@ public abstract class AbstractProcessDialog extends Window implements IProcessUI
|
|||
return false;
|
||||
//
|
||||
this.setTitle(m_Name);
|
||||
initialMessage = m_messageText.toString();
|
||||
|
||||
// Move from APanel.actionButton
|
||||
if (m_pi == null)
|
||||
|
@ -282,7 +283,7 @@ public abstract class AbstractProcessDialog extends Window implements IProcessUI
|
|||
|
||||
protected void topLayout(HtmlBasedComponent topParameterLayout) {
|
||||
// message
|
||||
setHeadMessage (topParameterLayout, getMessageText().toString());
|
||||
setHeadMessage (topParameterLayout, initialMessage);
|
||||
|
||||
// input component
|
||||
HtmlBasedComponent inputParameterLayout = new Div();
|
||||
|
@ -301,12 +302,15 @@ public abstract class AbstractProcessDialog extends Window implements IProcessUI
|
|||
|
||||
// header content
|
||||
HtmlBasedComponent messageDiv = new Div();
|
||||
Html content = new Html(contentMsg);
|
||||
Html content = new Html();
|
||||
if (contentMsg != null){
|
||||
content.setContent(contentMsg);
|
||||
}
|
||||
messageDiv.appendChild(content);
|
||||
messageDiv.setSclass("message-paramenter");
|
||||
messageParameterLayout.appendChild(messageDiv);
|
||||
|
||||
return messageParameterLayout;
|
||||
return content;
|
||||
}
|
||||
|
||||
protected void inputParameterLayout (HtmlBasedComponent parent) {
|
||||
|
@ -1003,16 +1007,6 @@ public abstract class AbstractProcessDialog extends Window implements IProcessUI
|
|||
return m_Name;
|
||||
}
|
||||
|
||||
public StringBuffer getMessageText()
|
||||
{
|
||||
return m_messageText;
|
||||
}
|
||||
|
||||
public void setMessageText(StringBuffer messageText)
|
||||
{
|
||||
this.m_messageText = messageText;
|
||||
}
|
||||
|
||||
public String getShowHelp()
|
||||
{
|
||||
return m_ShowHelp;
|
||||
|
|
|
@ -256,13 +256,18 @@ public class ProcessDialog extends AbstractProcessDialog implements EventListene
|
|||
protected void swithToFinishScreen() {
|
||||
ProcessInfo pi = getProcessInfo();
|
||||
ProcessInfoUtil.setLogFromDB(pi);
|
||||
getMessageText().append("<p><font color=\"").append(pi.isError() ? "#FF0000" : "#0000FF").append("\">** ")
|
||||
.append(pi.getSummary())
|
||||
.append("</font></p>");
|
||||
|
||||
layoutResultPanel (topParameterLayout);
|
||||
|
||||
StringBuilder buildMsg = new StringBuilder(getInitialMessage());
|
||||
buildMsg.append("<p><font color=\"").append(pi.isError() ? "#FF0000" : "#0000FF").append("\">** ")
|
||||
.append(pi.getSummary())
|
||||
.append("</font></p>");
|
||||
|
||||
((Html)messageResultContent).setContent (buildMsg.toString());
|
||||
|
||||
// Add Log info with zoom on record id
|
||||
infoResultContent.getChildren().removeAll(infoResultContent.getChildren());
|
||||
appendRecordLogInfo(pi.getLogs(), infoResultContent);
|
||||
|
||||
bOK.setLabel(Msg.getMsg(Env.getCtx(), "Parameter"));
|
||||
|
@ -287,7 +292,7 @@ public class ProcessDialog extends AbstractProcessDialog implements EventListene
|
|||
resultPanelLayout.setSclass("result-parameter-layout");
|
||||
resultPanelLayout.setVflex("true");
|
||||
// reference for update late
|
||||
messageResultContent = setHeadMessage(resultPanelLayout, getMessageText().toString());
|
||||
messageResultContent = setHeadMessage(resultPanelLayout, null);
|
||||
|
||||
infoResultContent = new Div();
|
||||
resultPanelLayout.appendChild(infoResultContent);
|
||||
|
@ -448,8 +453,9 @@ public class ProcessDialog extends AbstractProcessDialog implements EventListene
|
|||
@Override
|
||||
public void onCallback(Boolean result) {
|
||||
if (result) {
|
||||
getMessageText().append("<p>").append(Msg.getMsg(Env.getCtx(), "PrintShipments")).append("</p>");
|
||||
((Html)messageResultContent).setContent(getMessageText().toString());
|
||||
StringBuilder buildMsg = new StringBuilder(((Html)messageResultContent).getContent());
|
||||
buildMsg.append("<p>").append(Msg.getMsg(Env.getCtx(), "PrintShipments")).append("</p>");
|
||||
((Html)messageResultContent).setContent(buildMsg.toString());
|
||||
showBusyDialog();
|
||||
Clients.response(new AuEcho(ProcessDialog.this, "onPrintShipments", null));
|
||||
}
|
||||
|
@ -532,8 +538,9 @@ public class ProcessDialog extends AbstractProcessDialog implements EventListene
|
|||
{
|
||||
if (result)
|
||||
{
|
||||
getMessageText().append("<p>").append(Msg.getMsg(Env.getCtx(), "PrintInvoices")).append("</p>");
|
||||
((Html)messageResultContent).setContent(getMessageText().toString());
|
||||
StringBuilder buildMsg = new StringBuilder(((Html)messageResultContent).getContent());
|
||||
buildMsg.append("<p>").append(Msg.getMsg(Env.getCtx(), "PrintInvoices")).append("</p>");
|
||||
((Html)messageResultContent).setContent(buildMsg.toString());
|
||||
showBusyDialog();
|
||||
Clients.response(new AuEcho(ProcessDialog.this, "onPrintInvoices", null));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue