On 12-08-30 12:59 PM, Mick Semb Wever wrote:
> My preference is for the first approach, and particularly standardising
> on using Request.class.getName() as the key in foreign contexts.
>
> But there often isn't a foreign context that is loose enough to put a
> request object into. I would rather have taken the first approach in
> tiles-request-mustache but it doesn't seem possible. Using a ThreadLocal
> should be a frowned upon last-available option to use.
How about:
protected Map<String,Object> buildScope(Request request) {
[...retrieve attributes...]
scope.put(Request.class.getName(), request);
return scope;
}
Wouldn't it fit the bill?
Hope this helps.
Nick