diff --git a/org.adempiere.base/src/org/compiere/model/MRfQLine.java b/org.adempiere.base/src/org/compiere/model/MRfQLine.java
index 5a064a4e09..ab39cf0438 100644
--- a/org.adempiere.base/src/org/compiere/model/MRfQLine.java
+++ b/org.adempiere.base/src/org/compiere/model/MRfQLine.java
@@ -85,8 +85,6 @@ public class MRfQLine extends X_C_RfQLine
public MRfQLine (Properties ctx, ResultSet rs, String trxName)
{
super(ctx, rs, trxName);
- if (get_ID() > 0)
- s_cache.put(new Integer(get_ID()), this);
} // MRfQLine
/**
diff --git a/org.adempiere.base/src/org/compiere/model/MRfQLineQty.java b/org.adempiere.base/src/org/compiere/model/MRfQLineQty.java
index 3cd9688fa3..212c536174 100644
--- a/org.adempiere.base/src/org/compiere/model/MRfQLineQty.java
+++ b/org.adempiere.base/src/org/compiere/model/MRfQLineQty.java
@@ -89,8 +89,6 @@ public class MRfQLineQty extends X_C_RfQLineQty
public MRfQLineQty (Properties ctx, ResultSet rs, String trxName)
{
super(ctx, rs, trxName);
- if (get_ID() > 0)
- s_cache.put (new Integer (get_ID()), this);
} // MRfQLineQty
/**
diff --git a/org.adempiere.base/src/org/compiere/wf/MWFNode.java b/org.adempiere.base/src/org/compiere/wf/MWFNode.java
index 961cd2bc76..e3f8398bc3 100644
--- a/org.adempiere.base/src/org/compiere/wf/MWFNode.java
+++ b/org.adempiere.base/src/org/compiere/wf/MWFNode.java
@@ -27,6 +27,7 @@ import java.util.List;
import java.util.Properties;
import java.util.logging.Level;
+import org.adempiere.exceptions.AdempiereException;
import org.adempiere.exceptions.DBException;
import org.compiere.model.MColumn;
import org.compiere.model.Query;
@@ -104,9 +105,10 @@ public class MWFNode extends X_AD_WF_Node
setXPosition (0);
setYPosition (0);
}
- // Save to Cache
- if (get_ID() != 0)
- s_cache.put (new Integer(getAD_WF_Node_ID()), this);
+ if (getAD_WF_Node_ID() > 0) {
+ loadNext();
+ loadTrl();
+ }
} // MWFNode
/**
@@ -137,7 +139,14 @@ public class MWFNode extends X_AD_WF_Node
loadNext();
loadTrl();
// Save to Cache
- s_cache.put (get_ID(), this);
+ Integer key = null;
+ try {
+ key = new Integer (rs.getInt("AD_WF_Node_ID"));
+ } catch (SQLException e) {
+ throw new AdempiereException(e);
+ }
+ if (key != null && trxName == null && !s_cache.containsKey(key))
+ s_cache.put (key, this);
} // MWFNode
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/HelpController.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/HelpController.java
index b66e885b3e..3c2f912b7c 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/HelpController.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/HelpController.java
@@ -216,7 +216,7 @@ public class HelpController
}
else if (ctxType.equals(X_AD_CtxHelp.CTXTYPE_Process))
{
- MProcess process = new MProcess(Env.getCtx(), recordId, null);
+ MProcess process = MProcess.get(Env.getCtx(), recordId);
if (!Env.isBaseLanguage(Env.getCtx(), "AD_Process")) {
nameMsg = process.get_Translation("Name");
@@ -323,41 +323,24 @@ public class HelpController
}
}
else if (ctxType.equals(X_AD_CtxHelp.CTXTYPE_Workflow)) {
- MWorkflow workflow = new MWorkflow(Env.getCtx(), recordId, null);
+ MWorkflow workflow = MWorkflow.get(Env.getCtx(), recordId);
- if (!Env.getLoginLanguage(Env.getCtx()).isBaseLanguage()) {
+ boolean trl = !Env.getLoginLanguage(Env.getCtx()).isBaseLanguage();
- nameMsg = workflow.get_Translation("Name");
+ nameMsg = workflow.getName(trl);
- if (workflow != null && nameMsg != null
- && nameMsg.length() != 0) {
- sb.append("
\n" + nameMsg + "");
+ if (workflow != null && nameMsg != null
+ && nameMsg.length() != 0) {
+ sb.append("
\n" + nameMsg + "");
- descMsg = workflow.get_Translation("Description");
- if (descMsg != null && descMsg.length() != 0)
- sb.append("
\n" + descMsg + "");
+ descMsg = workflow.getDescription(trl);
+ if (descMsg != null && descMsg.length() != 0)
+ sb.append("
\n" + descMsg + "");
- helpMsg = workflow.get_Translation("Help");
- if (helpMsg != null && helpMsg.length() != 0)
- sb.append("
\n" + helpMsg);
- }
- } else {
-
- if (workflow != null && workflow.getName() != null
- && workflow.getName().length() != 0) {
- sb.append("
\n" + workflow.getName() + "");
-
- if (workflow.getDescription() != null
- && workflow.getDescription().length() != 0)
- sb.append("
\n"
- + workflow.getDescription() + "");
-
- if (workflow.getHelp() != null
- && workflow.getHelp().length() != 0)
- sb.append("
\n" + workflow.getHelp());
- }
-
- }
+ helpMsg = workflow.getHelp(trl);
+ if (helpMsg != null && helpMsg.length() != 0)
+ sb.append("
\n" + helpMsg);
+ }
} else if (ctxType.equals(X_AD_CtxHelp.CTXTYPE_Task)) {
MTask task = new MTask(Env.getCtx(), recordId, null);
@@ -395,40 +378,25 @@ public class HelpController
}
}
} else if (ctxType.equals(X_AD_CtxHelp.CTXTYPE_Node)) {
- MWFNode node = new MWFNode(Env.getCtx(), recordId, null);
+ MWFNode node = MWFNode.get(Env.getCtx(), recordId);
- if (!Env.getLoginLanguage(Env.getCtx()).isBaseLanguage()) {
-
- nameMsg = node.get_Translation("Name");
+ boolean trl = !Env.getLoginLanguage(Env.getCtx()).isBaseLanguage();
- if (node != null && nameMsg != null
- && nameMsg.length() != 0) {
- sb.append("
\n" + nameMsg + "");
+ nameMsg = node.getName(trl);
- descMsg = node.get_Translation("Description");
- if (descMsg != null && descMsg.length() != 0)
- sb.append("
\n" + descMsg + "");
+ if (node != null && nameMsg != null
+ && nameMsg.length() != 0) {
+ sb.append("
\n" + nameMsg + "");
- helpMsg = node.get_Translation("Help");
- if (helpMsg != null && helpMsg.length() != 0)
- sb.append("
\n" + helpMsg);
- }
+ descMsg = node.getDescription(trl);
+ if (descMsg != null && descMsg.length() != 0)
+ sb.append("
\n" + descMsg + "");
- } else {
- if (node != null && node.getName() != null
- && node.getName().length() != 0) {
- sb.append("
\n" + node.getName() + "");
-
- if (node.getDescription() != null
- && node.getDescription().length() != 0)
- sb.append("
\n" + node.getDescription()
- + "");
-
- if (node.getHelp() != null
- && node.getHelp().length() != 0)
- sb.append("
\n" + node.getHelp());
- }
+ helpMsg = node.getHelp(trl);
+ if (helpMsg != null && helpMsg.length() != 0)
+ sb.append("
\n" + helpMsg);
}
+
}
}