hg merge 7ff0a307b3ea

This commit is contained in:
Carlos Ruiz 2012-10-11 12:39:16 -05:00
commit 462cd17efc
5 changed files with 448 additions and 382 deletions

View File

@ -83,6 +83,16 @@ public final class ValueNamePair extends NamePair
return false; return false;
} // equals } // equals
/**
* Get the Object representation of the value
* @return value
*/
public Object getValueObject()
{
return m_value;
}
/** /**
* Return Hashcode of value * Return Hashcode of value
* @return hascode * @return hascode

View File

@ -308,4 +308,11 @@
version="0.0.0" version="0.0.0"
unpack="false"/> unpack="false"/>
<plugin
id="org.idempiere.webservices"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
</feature> </feature>

File diff suppressed because one or more lines are too long

View File

@ -42,6 +42,7 @@ import org.compiere.util.Env;
import org.compiere.util.Msg; import org.compiere.util.Msg;
import org.zkoss.zhtml.Table; import org.zkoss.zhtml.Table;
import org.zkoss.zhtml.Td; import org.zkoss.zhtml.Td;
import org.zkoss.zhtml.Text;
import org.zkoss.zhtml.Tr; import org.zkoss.zhtml.Tr;
import org.zkoss.zk.au.out.AuEcho; import org.zkoss.zk.au.out.AuEcho;
import org.zkoss.zk.ui.Component; import org.zkoss.zk.ui.Component;
@ -469,9 +470,10 @@ public class ProcessDialog extends Window implements EventListener<Event>, IProc
private void appendRecordLogInfo(ProcessInfoLog[] m_logs) { private void appendRecordLogInfo(ProcessInfoLog[] m_logs) {
if (m_logs == null) if (m_logs == null)
return ; return;
SimpleDateFormat dateFormat = DisplayType.getDateFormat(DisplayType.Date); SimpleDateFormat dateFormat = DisplayType
.getDateFormat(DisplayType.Date);
logMessageTable = new Table(); logMessageTable = new Table();
logMessageTable.setId("logrecords"); logMessageTable.setId("logrecords");
@ -480,50 +482,72 @@ public class ProcessDialog extends Window implements EventListener<Event>, IProc
logMessageTable.setDynamicProperty("cellspacing", "0"); logMessageTable.setDynamicProperty("cellspacing", "0");
logMessageTable.setDynamicProperty("width", "100%"); logMessageTable.setDynamicProperty("width", "100%");
this.appendChild(logMessageTable); this.appendChild(logMessageTable);
for (int i = 0; i < m_logs.length; i++) boolean datePresents = false;
{ boolean numberPresents = false;
boolean msgPresents = false;
Tr tr = new Tr(); for (ProcessInfoLog log : m_logs) {
logMessageTable.appendChild(tr); if (log.getP_Date() != null)
datePresents = true;
if (log.getP_Number() != null)
numberPresents = true;
if (log.getP_Msg() != null)
msgPresents = true;
}
ProcessInfoLog log = m_logs[i]; for (int i = 0; i < m_logs.length; i++) {
if (log.getP_Date() != null){ Tr tr = new Tr();
Label label = new Label(dateFormat.format(log.getP_Date())); logMessageTable.appendChild(tr);
//label.setStyle("padding-right:100px");
ProcessInfoLog log = m_logs[i];
if (datePresents) {
Td td = new Td(); Td td = new Td();
td = new Td(); if (log.getP_Date() != null) {
td.appendChild(label); Label label = new Label(dateFormat.format(log.getP_Date()));
tr.appendChild(td); td.appendChild(label);
// label.setStyle("padding-right:100px");
}
if (log.getP_Number() != null){
Label labelPno= new Label(""+log.getP_Number());
Td td = new Td();
td.appendChild(labelPno);
tr.appendChild(td);
}
A recordLink = null;
if (log.getP_Msg() != null){
recordLink = new A();
recordLink.setLabel(log.getP_Msg());
if (log.getAD_Table_ID() > 0 && log.getRecord_ID()> 0) {
recordLink.setAttribute("Record_ID", String.valueOf(log.getRecord_ID()));
recordLink.setAttribute("AD_Table_ID", String.valueOf(log.getAD_Table_ID()));
recordLink.addEventListener(Events.ON_CLICK, this);
} }
tr.appendChild(td);
}
if (numberPresents) {
Td td = new Td(); Td td = new Td();
td.appendChild(recordLink); if (log.getP_Number() != null) {
Label labelPno = new Label("" + log.getP_Number());
td.appendChild(labelPno);
}
tr.appendChild(td);
}
if (msgPresents) {
Td td = new Td();
if (log.getP_Msg() != null) {
if (log.getAD_Table_ID() > 0 && log.getRecord_ID() > 0) {
A recordLink = new A();
recordLink.setLabel(log.getP_Msg());
recordLink.setAttribute("Record_ID",
String.valueOf(log.getRecord_ID()));
recordLink.setAttribute("AD_Table_ID",
String.valueOf(log.getAD_Table_ID()));
recordLink.addEventListener(Events.ON_CLICK, this);
td.appendChild(recordLink);
} else {
Text t = new Text();
t.setEncode(false);
t.setValue(log.getP_Msg());
td.appendChild(t);
}
}
tr.appendChild(td); tr.appendChild(td);
} }
} }
messageDiv.appendChild(logMessageTable); messageDiv.appendChild(logMessageTable);
} }
private void restart() { private void restart() {

View File

@ -58,6 +58,7 @@ import org.compiere.util.Env;
import org.compiere.util.Msg; import org.compiere.util.Msg;
import org.zkoss.zhtml.Table; import org.zkoss.zhtml.Table;
import org.zkoss.zhtml.Td; import org.zkoss.zhtml.Td;
import org.zkoss.zhtml.Text;
import org.zkoss.zhtml.Tr; import org.zkoss.zhtml.Tr;
import org.zkoss.zk.au.out.AuEcho; import org.zkoss.zk.au.out.AuEcho;
import org.zkoss.zk.ui.event.Event; import org.zkoss.zk.ui.event.Event;
@ -486,6 +487,20 @@ public class WGenForm extends ADForm implements EventListener, WTableModelListen
this.appendChild(logMessageTable); this.appendChild(logMessageTable);
boolean datePresents = false;
boolean numberPresents = false;
boolean msgPresents = false;
for (ProcessInfoLog log : m_logs) {
if (log.getP_Date() != null)
datePresents = true;
if (log.getP_Number() != null)
numberPresents = true;
if (log.getP_Msg() != null)
msgPresents = true;
}
for (int i = 0; i < m_logs.length; i++) for (int i = 0; i < m_logs.length; i++)
{ {
@ -494,36 +509,46 @@ public class WGenForm extends ADForm implements EventListener, WTableModelListen
ProcessInfoLog log = m_logs[i]; ProcessInfoLog log = m_logs[i];
if (log.getP_Date() != null){ if (datePresents) {
Label label = new Label(dateFormat.format(log.getP_Date()));
//label.setStyle("padding-right:100px");
Td td = new Td(); Td td = new Td();
td = new Td(); if (log.getP_Date() != null) {
td.appendChild(label); Label label = new Label(dateFormat.format(log.getP_Date()));
tr.appendChild(td); td.appendChild(label);
// label.setStyle("padding-right:100px");
}
if (log.getP_Number() != null){
Label labelPno= new Label(""+log.getP_Number());
Td td = new Td();
td.appendChild(labelPno);
tr.appendChild(td);
}
A recordLink = null;
if (log.getP_Msg() != null){
recordLink = new A();
recordLink.setLabel(log.getP_Msg());
if (log.getAD_Table_ID() > 0 && log.getRecord_ID()> 0) {
recordLink.setAttribute("Record_ID", String.valueOf(log.getRecord_ID()));
recordLink.setAttribute("AD_Table_ID", String.valueOf(log.getAD_Table_ID()));
recordLink.addEventListener(Events.ON_CLICK, this);
} }
tr.appendChild(td);
}
if (numberPresents) {
Td td = new Td(); Td td = new Td();
td.appendChild(recordLink); if (log.getP_Number() != null) {
Label labelPno = new Label("" + log.getP_Number());
td.appendChild(labelPno);
}
tr.appendChild(td);
}
if (msgPresents) {
Td td = new Td();
if (log.getP_Msg() != null) {
if (log.getAD_Table_ID() > 0 && log.getRecord_ID() > 0) {
A recordLink = new A();
recordLink.setLabel(log.getP_Msg());
recordLink.setAttribute("Record_ID",
String.valueOf(log.getRecord_ID()));
recordLink.setAttribute("AD_Table_ID",
String.valueOf(log.getAD_Table_ID()));
recordLink.addEventListener(Events.ON_CLICK, this);
td.appendChild(recordLink);
} else {
Text t = new Text();
t.setEncode(false);
t.setValue(log.getP_Msg());
td.appendChild(t);
}
}
tr.appendChild(td); tr.appendChild(td);
} }
} }