class InitBinderBindingContext extends BindingContext
BindingContext
with @InitBinder
method initialization.Modifier and Type | Field and Description |
---|---|
private BindingContext |
binderMethodContext |
private java.util.List<SyncInvocableHandlerMethod> |
binderMethods |
private java.lang.Runnable |
saveModelOperation |
private SessionStatus |
sessionStatus |
Constructor and Description |
---|
InitBinderBindingContext(WebBindingInitializer initializer,
java.util.List<SyncInvocableHandlerMethod> binderMethods) |
Modifier and Type | Method and Description |
---|---|
SessionStatus |
getSessionStatus()
Return the
SessionStatus instance to use that can be used to
signal that session processing is complete. |
protected WebExchangeDataBinder |
initDataBinder(WebExchangeDataBinder dataBinder,
ServerWebExchange exchange)
Initialize the data binder instance for the given exchange.
|
private void |
invokeBinderMethod(WebExchangeDataBinder dataBinder,
ServerWebExchange exchange,
SyncInvocableHandlerMethod binderMethod) |
void |
saveModel()
Save model attributes in the session based on a type-level declarations
in an
@SessionAttributes annotation. |
void |
setSessionContext(SessionAttributesHandler attributesHandler,
WebSession session)
Provide the context required to apply
saveModel() after the
controller method has been invoked. |
createDataBinder, createDataBinder, getModel
private final java.util.List<SyncInvocableHandlerMethod> binderMethods
private final BindingContext binderMethodContext
private final SessionStatus sessionStatus
@Nullable private java.lang.Runnable saveModelOperation
InitBinderBindingContext(@Nullable WebBindingInitializer initializer, java.util.List<SyncInvocableHandlerMethod> binderMethods)
public SessionStatus getSessionStatus()
SessionStatus
instance to use that can be used to
signal that session processing is complete.protected WebExchangeDataBinder initDataBinder(WebExchangeDataBinder dataBinder, ServerWebExchange exchange)
BindingContext
initDataBinder
in class BindingContext
private void invokeBinderMethod(WebExchangeDataBinder dataBinder, ServerWebExchange exchange, SyncInvocableHandlerMethod binderMethod)
public void setSessionContext(SessionAttributesHandler attributesHandler, WebSession session)
saveModel()
after the
controller method has been invoked.public void saveModel()
@SessionAttributes
annotation.