From c230c188be4e6b03271617501f7c5fffa4adcf2b Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Sun, 19 Apr 2009 19:51:25 +0000 Subject: [PATCH] exposed public getModel accessor (SPR-5686) --- .../web/servlet/support/RequestContext.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/org.springframework.web.servlet/src/main/java/org/springframework/web/servlet/support/RequestContext.java b/org.springframework.web.servlet/src/main/java/org/springframework/web/servlet/support/RequestContext.java index 7a2d13d77aa..a607751851d 100644 --- a/org.springframework.web.servlet/src/main/java/org/springframework/web/servlet/support/RequestContext.java +++ b/org.springframework.web.servlet/src/main/java/org/springframework/web/servlet/support/RequestContext.java @@ -304,7 +304,15 @@ public class RequestContext { } /** - * Return the current locale. + * Return the model Map that this RequestContext encapsulates, if any. + * @return the populated model Map, or null if none available + */ + public final Map getModel() { + return this.model; + } + + /** + * Return the current Locale (never null). */ public final Locale getLocale() { return this.locale; @@ -312,7 +320,7 @@ public class RequestContext { /** * Return the current theme (never null). - * Resolved lazily for more efficiency when theme support is not used. + *

Resolved lazily for more efficiency when theme support is not being used. */ public final Theme getTheme() { if (this.theme == null) {