Author: hansbak
Date: Sat Jan 10 06:11:39 2009
New Revision: 733275
URL:
http://svn.apache.org/viewvc?rev=733275&view=revLog:
screen widget not working in content management system cmssite, however fixed now
Modified:
ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java
Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java?rev=733275&r1=733274&r2=733275&view=diff==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java Sat Jan 10 06:11:39 2009
@@ -656,24 +656,23 @@
try {
MapStack context = MapStack.create(templateContext);
context.put("locale", locale);
-
// prepare the map for preRenderedContent
- Map prc = FastMap.newInstance();
String textData = (String) context.get("textData");
- String mapKey = (String) context.get("mapKey");
- if (mapKey != null) {
- prc.put(mapKey, textData);
+ if (UtilValidate.isNotEmpty(textData)) {
+ Map prc = FastMap.newInstance();
+ String mapKey = (String) context.get("mapKey");
+ if (mapKey != null) {
+ prc.put(mapKey, mapKey);
+ }
+ prc.put("body", textData); // used for default screen defs
+ context.put("preRenderedContent", prc);
}
- prc.put("body", textData); // used for default screen defs
- context.put("preRenderedContent", prc);
-
// get the screen renderer; or create a new one
ScreenRenderer screens = (ScreenRenderer) context.get("screens");
if (screens == null) {
screens = new ScreenRenderer(out, context, new HtmlScreenRenderer());
screens.getContext().put("screens", screens);
}
-
// render the screen
ScreenStringRenderer renderer = screens.getScreenStringRenderer();
String combinedName = (String) dataResource.get("objectInfo");