Daniel Fagerstrom wrote:
Carsten Ziegeler wrote:
Do we have a solid contract for our flow context object? The FlowContextHelper returns an object, so e.g. in the jxtg we have something like: if (contextObject instanceof Map) { map.putAll((Map)contextObject); } else if ( contextObject != null ) { fillContext(contextObject, map); } to test whether the context is a map or a bean. Wouldn't it be better/easier to require that the flow context is always a map?
sendPage and sendPageAndWait can return any object, so it would introduce back incompability. Even if I agree that it is somewhat clumsy I don't think that it is enough reason for breaking peoples code. So IMO we should keep it as is.
I don't think this should break much code, as that object (which BTW I prefer to name "view data" rather than the ambiguous "flow context" -- we have enough contexts in Cocoon) is supposed to be a JS object. And a JS object can easily be turned into a Map by associating property names to Map keys. We could even have a JSObjectMap that wraps a Scriptable as a Map.
Sylvain
-- Sylvain Wallez Anyware Technologies http://www.apache.org/~sylvain http://www.anyware-tech.com { XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
