Skip to content

Commit c230c18

Browse files
committed
exposed public getModel accessor (SPR-5686)
1 parent bc9b256 commit c230c18

File tree

1 file changed

+10
-2
lines changed
  • org.springframework.web.servlet/src/main/java/org/springframework/web/servlet/support

1 file changed

+10
-2
lines changed

org.springframework.web.servlet/src/main/java/org/springframework/web/servlet/support/RequestContext.java

+10-2
Original file line numberDiff line numberDiff line change
@@ -304,15 +304,23 @@ public final MessageSource getMessageSource() {
304304
}
305305

306306
/**
307-
* Return the current locale.
307+
* Return the model Map that this RequestContext encapsulates, if any.
308+
* @return the populated model Map, or <code>null</code> if none available
309+
*/
310+
public final Map<String, Object> getModel() {
311+
return this.model;
312+
}
313+
314+
/**
315+
* Return the current Locale (never <code>null</code>).
308316
*/
309317
public final Locale getLocale() {
310318
return this.locale;
311319
}
312320

313321
/**
314322
* Return the current theme (never <code>null</code>).
315-
* Resolved lazily for more efficiency when theme support is not used.
323+
* <p>Resolved lazily for more efficiency when theme support is not being used.
316324
*/
317325
public final Theme getTheme() {
318326
if (this.theme == null) {

0 commit comments

Comments
 (0)