On 05/21/2012 07:41 AM, Adrian Crum wrote:
That is an ugly workaround that I would like to see go away. Removing it could potentially break a lot of things.
Do you mean that putting "null" into the context is an ugly work-around, and that it should not be done, as I suggest? And are you also saying that removing it would cause breakage on pages that depend on "null" resolving to NullField?
-Adrian On 5/21/2012 6:48 AM, Adam Heath wrote:Why do SimpleMethod.java and ModelScreen.java both do context.put("null", GenericEntity.NULL_FIELD)? That changes *all* null values in freemarker into that static instance, even when the target type of the variable is *not* going to be part of some entity-like map. If I remove both of those calls(actually, remove one, change the other to place it as "nullField"), then the broken ordermgr link given earlier starts to finally work. And, I think that even the nullField constant should not be removed, as NullField should only be used internally by the entity engine.
