Fix a bug reported by Blas Rodriguez Somoza at https://issues.apache.org/jira/browse/OFBIZ-3673 "Error screen in Content Manager->CMS->Create new (Ofbiz Demo)" - OFBIZ-3673
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@933258 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -6,9 +6,9 @@
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
@@ -38,10 +38,10 @@ if (contentAssocPK.isPrimaryKey()) {
|
||||
}
|
||||
|
||||
if (contentAssoc) {
|
||||
SimpleMapProcessor.runSimpleMapProcessor("org/ofbiz/content/ContentManagementMapProcessors.xml", "contentAssocOut", contentAssoc, contentAssocDataResourceViewFrom, new ArrayList(), Locale.getDefault());
|
||||
SimpleMapProcessor.runSimpleMapProcessor("component://content/script/org/ofbiz/content/ContentManagementMapProcessors.xml", "contentAssocOut", contentAssoc, contentAssocDataResourceViewFrom, new ArrayList(), Locale.getDefault());
|
||||
} else {
|
||||
contentAssocPK.setAllFields(context, false, "ca", null); //set all field, pk and non
|
||||
SimpleMapProcessor.runSimpleMapProcessor("org/ofbiz/content/ContentManagementMapProcessors.xml", "contentAssocOut", contentAssocPK, contentAssocDataResourceViewFrom, new ArrayList(), Locale.getDefault());
|
||||
SimpleMapProcessor.runSimpleMapProcessor("component://content/script/org/ofbiz/content/ContentManagementMapProcessors.xml", "contentAssocOut", contentAssocPK, contentAssocDataResourceViewFrom, new ArrayList(), Locale.getDefault());
|
||||
}
|
||||
Debug.logInfo("in cmseditaddprep, contentAssocDataResourceViewFrom:" + contentAssocDataResourceViewFrom,"");
|
||||
|
||||
@@ -68,11 +68,11 @@ if (!dataResourceId) {
|
||||
}
|
||||
if (dataResourceId) {
|
||||
dataResource = delegator.findOne("DataResource", [dataResourceId : dataResourceId], true);
|
||||
SimpleMapProcessor.runSimpleMapProcessor("org/ofbiz/content/ContentManagementMapProcessors.xml", "dataResourceOut", dataResource, contentAssocDataResourceViewFrom, new ArrayList(), Locale.getDefault());
|
||||
SimpleMapProcessor.runSimpleMapProcessor("component://content/script/org/ofbiz/content/ContentManagementMapProcessors.xml", "dataResourceOut", dataResource, contentAssocDataResourceViewFrom, new ArrayList(), Locale.getDefault());
|
||||
templateRoot = [:];
|
||||
FreeMarkerViewHandler.prepOfbizRoot(templateRoot, request, response);
|
||||
txt = DataResourceWorker.getDataResourceText(dataResource, "text/html", Locale.getDefault(), templateRoot, delegator, true);
|
||||
|
||||
txt = DataResourceWorker.getDataResourceTextCache(dataResource, "text/html", Locale.getDefault(), templateRoot, delegator);
|
||||
|
||||
if (txt) {
|
||||
textData = UtilFormatOut.encodeXmlValue(txt);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user