that is a very nice approach. Here is a question for you.
Would it make sense to create a private scope for the request collection?? And create some exit handler api:
event.getPrivateCollection()
So this is sort of funny. I have already created a “private” collection in my Request Collection Decorator localContext instead of privateContext.
Here are the methods I’m using:
function Configure() {
instance.localContext = StructNew();
instance.localContext.xeh = StructNew();
}
function getLocalCollection() {
return instance.localContext;
}
function getLocalValue(name) {
return Evaluate(“instance.localContext.#arguments.name#”);
}
function setLocalValue(name, value) {
“instance.localContext.#arguments.name#” = arguments.value;
}
function localValueExists(name) {
return isDefined(“instance.localContext.#arguments.name#”);
}
function paramLocalValue(name, value) {
if ( not localValueExists(arguments.name) ) {
setLocalValue(arguments.name, arguments.value);
}
}
event.addxeh()
event.getxeh()
event.getxehCollection()
I just added the above methods (to my Request Context Decorator), but used setXeh() to be consistent
function setXeh(name, value) {
“instance.localContext.xeh.#arguments.name#” = arguments.value;
}
function getXeh(name) {
return Evaluate(“instance.localContext.xeh.#arguments.name#”);
}
function getXehCollection() {
return getLocalCollection().xeh;
}
you can do
var xeh = getXehCollection()
xeh.next = ‘handler.action’;
event.setXeh(‘next’, ‘handler’);
event.getXeh(‘next’);
Just ideas?
I think the real value would be if you make ‘xeh’ available to the view, just like ‘rc’.
So we could do
event.buildLink(xeh.next)
instead of
event.buildLink(event.getXeh(‘next’))
or
-Dutch