Author: jonesde
Date: Fri Feb 23 06:46:04 2007
New Revision: 510962
URL: http://svn.apache.org/viewvc?view=rev&rev=510962
Log:
Fixed an odd bugg in some decorator (screen and template) code where the
screens object was pointing to the wrong context, making certain variables that
should have been available not available, especially in cases where the
ScreenRenderer screens object is used, like the FTL files with screens.render;
this fixes a couple of issues, but the main test case was the productCategoryId
variable in the ProductCategoryLink.ftl file
Modified:
ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/HtmlWidget.java
ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java
ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenWidget.java
Modified:
ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/HtmlWidget.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/HtmlWidget.java?view=diff&rev=510962&r1=510961&r2=510962
==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/HtmlWidget.java
(original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/HtmlWidget.java
Fri Feb 23 06:46:04 2007
@@ -137,7 +137,7 @@
// create a standAloneStack, basically a "save point" for this
SectionsRenderer, and make a new "screens" object just for it so it is isolated
and doesn't follow the stack down
MapStack standAloneStack = contextMs.standAloneChildStack();
- standAloneStack.put("screens", new ScreenRenderer(writer,
contextMs, screenStringRenderer));
+ standAloneStack.put("screens", new ScreenRenderer(writer,
standAloneStack, screenStringRenderer));
SectionsRenderer sections = new SectionsRenderer(this.sectionMap,
standAloneStack, writer, screenStringRenderer);
// put the sectionMap in the context, make sure it is in the
sub-scope, ie after calling push on the MapStack
Modified:
ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java?view=diff&rev=510962&r1=510961&r2=510962
==============================================================================
---
ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java
(original)
+++
ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java
Fri Feb 23 06:46:04 2007
@@ -90,14 +90,14 @@
public void renderWidgetString(Writer writer, Map context,
ScreenStringRenderer screenStringRenderer) throws GeneralException {
boolean isEntrySet = false;
- if (!(context instanceof MapStack)) {
- context = MapStack.create(context);
- }
-
- MapStack contextMs = (MapStack) context;
- contextMs.push();
+ if (!(context instanceof MapStack)) {
+ context = MapStack.create(context);
+ }
+
+ MapStack contextMs = (MapStack) context;
+ contextMs.push();
- // create a standAloneStack, basically a "save point" for this
SectionsRenderer, and make a new "screens" object just for it so it is isolated
and doesn't follow the stack down
+ // create a standAloneStack, basically a "save point" for this
SectionsRenderer, and make a new "screens" object just for it so it is isolated
and doesn't follow the stack down
String entryName = this.entryNameExdr.expandString(context);
String keyName = this.keyNameExdr.expandString(context);
Object obj = listNameExdr.get(context);
Modified:
ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenWidget.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenWidget.java?view=diff&rev=510962&r1=510961&r2=510962
==============================================================================
---
ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenWidget.java
(original)
+++
ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenWidget.java
Fri Feb 23 06:46:04 2007
@@ -447,7 +447,7 @@
// create a standAloneStack, basically a "save point" for this
SectionsRenderer, and make a new "screens" object just for it so it is isolated
and doesn't follow the stack down
MapStack standAloneStack = contextMs.standAloneChildStack();
- standAloneStack.put("screens", new ScreenRenderer(writer,
contextMs, screenStringRenderer));
+ standAloneStack.put("screens", new ScreenRenderer(writer,
standAloneStack, screenStringRenderer));
SectionsRenderer sections = new SectionsRenderer(this.sectionMap,
standAloneStack, writer, screenStringRenderer);
// put the sectionMap in the context, make sure it is in the
sub-scope, ie after calling push on the MapStack