String errMsg = UtilProperties.getMessage(LayoutEvents.err_resource, "layoutEvents.entityname_empty", locale);
request.setAttribute("_ERROR_MESSAGE_", errMsg);
return "error";
}
GenericValue v = delegator.makeValue(entityName);
GenericPK passedPK = v.getPrimaryKey();
Collection<String> keyColl = passedPK.getAllKeys();
for(String attrName : keyColl) {
String attrVal = (String)request.getAttribute(attrName);
if (attrVal == null) {
attrVal = (String)paramMap.get(attrName);
}
Debug.logVerbose("in copyToClip, attrName:" + attrName,"");
Debug.logVerbose("in copyToClip, attrVal:" + attrVal,"");
if (UtilValidate.isNotEmpty(attrVal)) {
passedPK.put(attrName,attrVal);
} else {
String errMsg = UtilProperties.getMessage(LayoutEvents.err_resource, "layoutEvents.empty", locale);
request.setAttribute("_ERROR_MESSAGE_", attrName + " " + errMsg);
return "error";
}