hg merge release-2.1 (merge release2.1 into development)
This commit is contained in:
commit
3951017a87
|
@ -359,7 +359,7 @@ public class ModelADServiceImpl extends AbstractService implements ModelADServic
|
||||||
|
|
||||||
Map<String, Object> requestCtx = getRequestCtx();
|
Map<String, Object> requestCtx = getRequestCtx();
|
||||||
if (requestCtx != null && string.charAt(0) == '@') {
|
if (requestCtx != null && string.charAt(0) == '@') {
|
||||||
Object value = parseVatriable(getCompiereService(), requestCtx, parameterName, string);
|
Object value = parseVariable(getCompiereService(), requestCtx, parameterName, string);
|
||||||
if (value != null && value instanceof Number) {
|
if (value != null && value instanceof Number) {
|
||||||
return ((Number)value).intValue();
|
return ((Number)value).intValue();
|
||||||
} else if (value != null ){
|
} else if (value != null ){
|
||||||
|
@ -1122,7 +1122,7 @@ public class ModelADServiceImpl extends AbstractService implements ModelADServic
|
||||||
} else {
|
} else {
|
||||||
Map<String, Object> requestCtx = getRequestCtx();
|
Map<String, Object> requestCtx = getRequestCtx();
|
||||||
if (requestCtx != null && strValue.charAt(0) == '@') {
|
if (requestCtx != null && strValue.charAt(0) == '@') {
|
||||||
value = parseVatriable(getCompiereService(), requestCtx, field.getColumn(), strValue);
|
value = parseVariable(getCompiereService(), requestCtx, field.getColumn(), strValue);
|
||||||
}
|
}
|
||||||
if (value == null) {
|
if (value == null) {
|
||||||
value = convertToObj(strValue, columnClass, field.getColumn());
|
value = convertToObj(strValue, columnClass, field.getColumn());
|
||||||
|
@ -1141,11 +1141,9 @@ public class ModelADServiceImpl extends AbstractService implements ModelADServic
|
||||||
Env.setContext(Env.getCtx(), 0, field.getColumn(), value==null ? null : value.toString());
|
Env.setContext(Env.getCtx(), 0, field.getColumn(), value==null ? null : value.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Object parseVatriable(CompiereService cs, Map<String, Object> requestCtx, String name,
|
public static Object parseVariable(CompiereService cs, Map<String, Object> requestCtx, String name, String strValue) {
|
||||||
String strValue) {
|
|
||||||
String varName = strValue.substring(1);
|
String varName = strValue.substring(1);
|
||||||
if (varName.charAt(0) == '#') {
|
if (varName.charAt(0) == '#') {
|
||||||
varName = varName.substring(1);
|
|
||||||
return cs.getCtx().getProperty(varName);
|
return cs.getCtx().getProperty(varName);
|
||||||
} else {
|
} else {
|
||||||
int indDot = varName.indexOf(".");
|
int indDot = varName.indexOf(".");
|
||||||
|
|
|
@ -241,7 +241,7 @@ public class Process {
|
||||||
Object value = null;
|
Object value = null;
|
||||||
String s = field.getVal();
|
String s = field.getVal();
|
||||||
if (requestCtx != null && !Util.isEmpty(s) && s.charAt(0) == '@') {
|
if (requestCtx != null && !Util.isEmpty(s) && s.charAt(0) == '@') {
|
||||||
value = ModelADServiceImpl.parseVatriable(m_cs, requestCtx, field.getColumn(), s);
|
value = ModelADServiceImpl.parseVariable(m_cs, requestCtx, field.getColumn(), s);
|
||||||
if (value != null) {
|
if (value != null) {
|
||||||
if (value instanceof Number) {
|
if (value instanceof Number) {
|
||||||
m_record_id = ((Number)value).intValue();
|
m_record_id = ((Number)value).intValue();
|
||||||
|
@ -473,7 +473,7 @@ public class Process {
|
||||||
valueString = dataField.getVal();
|
valueString = dataField.getVal();
|
||||||
if (requestCtx != null && valueString.charAt(0) == '@')
|
if (requestCtx != null && valueString.charAt(0) == '@')
|
||||||
{
|
{
|
||||||
Object value = ModelADServiceImpl.parseVatriable(m_cs, requestCtx, iPara.getParameterName(), valueString);
|
Object value = ModelADServiceImpl.parseVariable(m_cs, requestCtx, iPara.getParameterName(), valueString);
|
||||||
valueString = value != null ? value.toString() : null;
|
valueString = value != null ? value.toString() : null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -495,7 +495,7 @@ public class Process {
|
||||||
valueString2 = dataField.toString();
|
valueString2 = dataField.toString();
|
||||||
if (requestCtx != null && valueString2.charAt(0) == '@')
|
if (requestCtx != null && valueString2.charAt(0) == '@')
|
||||||
{
|
{
|
||||||
Object value = ModelADServiceImpl.parseVatriable(m_cs, requestCtx, iPara.getParameterName(), valueString2);
|
Object value = ModelADServiceImpl.parseVariable(m_cs, requestCtx, iPara.getParameterName(), valueString2);
|
||||||
valueString2 = value != null ? value.toString() : null;
|
valueString2 = value != null ? value.toString() : null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue