Author: jacopoc
Date: Tue Jun 9 13:37:32 2009 New Revision: 782999 URL: http://svn.apache.org/viewvc?rev=782999&view=rev Log: Misc fixes for the Content template/layout code; still a huge lot to do, but at least now it is possible to create a new "layout". Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/content/UploadContentAndImage.java ofbiz/trunk/applications/content/src/org/ofbiz/content/layout/LayoutEvents.java Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/content/UploadContentAndImage.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/content/UploadContentAndImage.java?rev=782999&r1=782998&r2=782999&view=diff ============================================================================== --- ofbiz/trunk/applications/content/src/org/ofbiz/content/content/UploadContentAndImage.java (original) +++ ofbiz/trunk/applications/content/src/org/ofbiz/content/content/UploadContentAndImage.java Tue Jun 9 13:37:32 2009 @@ -473,16 +473,16 @@ List errorMessages = FastList.newInstance(); Locale loc = Locale.getDefault(); try { - SimpleMapProcessor.runSimpleMapProcessor( "org/ofbiz/content/ContentManagementMapProcessors.xml", "contentIn", ftlContext2, ftlContext3, errorMessages, loc); - SimpleMapProcessor.runSimpleMapProcessor( "org/ofbiz/content/ContentManagementMapProcessors.xml", "contentOut", ftlContext3, ftlContext, errorMessages, loc); + SimpleMapProcessor.runSimpleMapProcessor("component://content/script/org/ofbiz/content/ContentManagementMapProcessors.xml", "contentIn", ftlContext2, ftlContext3, errorMessages, loc); + SimpleMapProcessor.runSimpleMapProcessor("component://content/script/org/ofbiz/content/ContentManagementMapProcessors.xml", "contentOut", ftlContext3, ftlContext, errorMessages, loc); ftlContext3 = FastMap.newInstance(); - SimpleMapProcessor.runSimpleMapProcessor( "org/ofbiz/content/ContentManagementMapProcessors.xml", "dataResourceIn", ftlContext2, ftlContext3, errorMessages, loc); - SimpleMapProcessor.runSimpleMapProcessor( "org/ofbiz/content/ContentManagementMapProcessors.xml", "dataResourceOut", ftlContext3, ftlContext, errorMessages, loc); + SimpleMapProcessor.runSimpleMapProcessor("component://content/script/org/ofbiz/content/ContentManagementMapProcessors.xml", "dataResourceIn", ftlContext2, ftlContext3, errorMessages, loc); + SimpleMapProcessor.runSimpleMapProcessor("component://content/script/org/ofbiz/content/ContentManagementMapProcessors.xml", "dataResourceOut", ftlContext3, ftlContext, errorMessages, loc); ftlContext3 = FastMap.newInstance(); - SimpleMapProcessor.runSimpleMapProcessor( "org/ofbiz/content/ContentManagementMapProcessors.xml", "contentAssocIn", ftlContext2, ftlContext3, errorMessages, loc); - SimpleMapProcessor.runSimpleMapProcessor( "org/ofbiz/content/ContentManagementMapProcessors.xml", "contentAssocOut", ftlContext3, ftlContext, errorMessages, loc); + SimpleMapProcessor.runSimpleMapProcessor("component://content/script/org/ofbiz/content/ContentManagementMapProcessors.xml", "contentAssocIn", ftlContext2, ftlContext3, errorMessages, loc); + SimpleMapProcessor.runSimpleMapProcessor("component://content/script/org/ofbiz/content/ContentManagementMapProcessors.xml", "contentAssocOut", ftlContext3, ftlContext, errorMessages, loc); } catch (MiniLangException e) { throw new GenericServiceException(e.getMessage()); } Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/layout/LayoutEvents.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/layout/LayoutEvents.java?rev=782999&r1=782998&r2=782999&view=diff ============================================================================== --- ofbiz/trunk/applications/content/src/org/ofbiz/content/layout/LayoutEvents.java (original) +++ ofbiz/trunk/applications/content/src/org/ofbiz/content/layout/LayoutEvents.java Tue Jun 9 13:37:32 2009 @@ -91,13 +91,13 @@ try { SimpleMapProcessor.runSimpleMapProcessor( - "org/ofbiz/content/ContentManagementMapProcessors.xml", "contentIn", + "component://content/script/org/ofbiz/content/ContentManagementMapProcessors.xml", "contentIn", formInput, context, errorMessages, locale); SimpleMapProcessor.runSimpleMapProcessor( - "org/ofbiz/content/ContentManagementMapProcessors.xml", "dataResourceIn", + "component://content/script/org/ofbiz/content/ContentManagementMapProcessors.xml", "dataResourceIn", formInput, context, errorMessages, locale); SimpleMapProcessor.runSimpleMapProcessor( - "org/ofbiz/content/ContentManagementMapProcessors.xml", "contentAssocIn", + "component://content/script/org/ofbiz/content/ContentManagementMapProcessors.xml", "contentAssocIn", formInput, context, errorMessages, locale); } catch (MiniLangException e) { request.setAttribute("_ERROR_MESSAGE_", e.getMessage()); @@ -335,7 +335,7 @@ try { content = delegator.findByPrimaryKey("Content", UtilMisc.toMap("contentId", contentId)); - Debug.logVerbose("in cloneLayout, content:" + content, ""); + Debug.logVerbose("in cloneLayout, content:" + content, ""); if (content == null) { String errMsg = UtilProperties.getMessage(LayoutEvents.err_resource, "layoutEvents.content_empty", locale); request.setAttribute("_ERROR_MESSAGE_", errMsg); @@ -414,7 +414,7 @@ } try { SimpleMapProcessor.runSimpleMapProcessor( - "org/ofbiz/content/ContentManagementMapProcessors.xml", "contentAssocIn", + "component://content/script/org/ofbiz/content/ContentManagementMapProcessors.xml", "contentAssocIn", view, serviceIn, errorMessages, locale); } catch (IllegalArgumentException e) { request.setAttribute("_ERROR_MESSAGE_", e.getMessage()); @@ -477,13 +477,13 @@ context.put("rootDir", rootDir); try { SimpleMapProcessor.runSimpleMapProcessor( - "org/ofbiz/content/ContentManagementMapProcessors.xml", "contentIn", + "component://content/script/org/ofbiz/content/ContentManagementMapProcessors.xml", "contentIn", paramMap, context, errorMessages, loc); SimpleMapProcessor.runSimpleMapProcessor( - "org/ofbiz/content/ContentManagementMapProcessors.xml", "dataResourceIn", + "component://content/script/org/ofbiz/content/ContentManagementMapProcessors.xml", "dataResourceIn", paramMap, context, errorMessages, loc); SimpleMapProcessor.runSimpleMapProcessor( - "org/ofbiz/content/ContentManagementMapProcessors.xml", "contentAssocIn", + "component://content/script/org/ofbiz/content/ContentManagementMapProcessors.xml", "contentAssocIn", paramMap, context, errorMessages, loc); } catch (MiniLangException e) { request.setAttribute("_ERROR_MESSAGE_", e.getMessage()); @@ -519,6 +519,7 @@ context2.put("fromDate", result.get("fromDate")); context2.put("contentIdTo", contentIdTo); context2.put("mapKey", mapKey); + context2.put("userLogin", userLogin); //Debug.logVerbose("in replaceSubContent, context2:" + context2, module); Map result2 = dispatcher.runSync("deactivateAssocs", context2); @@ -550,13 +551,13 @@ context.put("rootDir", rootDir); try { SimpleMapProcessor.runSimpleMapProcessor( - "org/ofbiz/content/ContentManagementMapProcessors.xml", "contentIn", + "component://content/script/org/ofbiz/content/ContentManagementMapProcessors.xml", "contentIn", paramMap, context, errorMessages, loc); SimpleMapProcessor.runSimpleMapProcessor( - "org/ofbiz/content/ContentManagementMapProcessors.xml", "dataResourceIn", + "component://content/script/org/ofbiz/content/ContentManagementMapProcessors.xml", "dataResourceIn", paramMap, context, errorMessages, loc); SimpleMapProcessor.runSimpleMapProcessor( - "org/ofbiz/content/ContentManagementMapProcessors.xml", "contentAssocIn", + "component://content/script/org/ofbiz/content/ContentManagementMapProcessors.xml", "contentAssocIn", paramMap, context, errorMessages, loc); } catch (MiniLangException e) { request.setAttribute("_ERROR_MESSAGE_", e.getMessage()); |
Free forum by Nabble | Edit this page |