Class Fragment
java.lang.Object
org.springframework.web.reactive.result.view.Fragment
Container for a model and a view pair. For use with 
FragmentsRendering.- Since:
- 6.2
- Author:
- Rossen Stoyanchev
- See Also:
- 
Method SummaryModifier and TypeMethodDescriptionstatic FragmentCreate a Fragment with a view name only, inheriting model attributes from the top-level model for the request.static FragmentCreate a Fragment with a view name and a model, also inheriting model attributes from the top-level model for the request.static FragmentVariant ofcreate(String, Map)with a resolvedView.booleanWhether this Fragment contains a resolvedViewinstance.voidmergeAttributes(Model model) Merge attributes from the request model if not already present.model()Return the model for this Fragment, or an empty map.toString()view()Return the resolvedViewinstance.viewName()Return the view name of the Fragment, ornullif not set.
- 
Method Details- 
isResolvedpublic boolean isResolved()Whether this Fragment contains a resolvedViewinstance.
- 
viewNameReturn the view name of the Fragment, ornullif not set.
- 
viewReturn the resolvedViewinstance. This should be called only after anisResolved()check.
- 
modelReturn the model for this Fragment, or an empty map.
- 
mergeAttributesMerge attributes from the request model if not already present.
- 
toString
- 
createCreate a Fragment with a view name and a model, also inheriting model attributes from the top-level model for the request.
- 
createCreate a Fragment with a view name only, inheriting model attributes from the top-level model for the request.
- 
createVariant ofcreate(String, Map)with a resolvedView.
 
-