@Component @Order(value=2147483645) public class WebCmsArticleModelLoader extends AbstractWebCmsAssetModelLoader<WebCmsArticle>
WebCmsArticle. Registers the WebCmsArticle as an attribute on the model.
The article will actually be registered twice, once as asset attribute name, and once as article attribute.
The WebCmsPublication the article belongs to will be added as publication model attribute.
The layout page (value of WebCmsPublication#getArticleTemplatePage() will be added as page model attribute.
This loader also loads the article WebCmsComponentModelSet as default scope on the WebCmsComponentModelHierarchy.
The scope name is article. The components of the layout page will also be registered as page scope
after the article components.
The layout page will be used to resolve the default template that should be used for the article.
Will not allow a next loader to execute if the asset context contains a WebCmsArticle.| Constructor and Description |
|---|
WebCmsArticleModelLoader() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
loadModel(javax.servlet.http.HttpServletRequest request,
WebCmsArticle article,
org.springframework.ui.Model model) |
protected boolean |
supports(WebCmsAsset<?> asset) |
loadModel, registerAssetComponentsForScope, setComponentModelHierarchy, setComponentModelServiceprotected boolean supports(WebCmsAsset<?> asset)
supports in class AbstractWebCmsAssetModelLoader<WebCmsArticle>protected boolean loadModel(javax.servlet.http.HttpServletRequest request,
WebCmsArticle article,
org.springframework.ui.Model model)
loadModel in class AbstractWebCmsAssetModelLoader<WebCmsArticle>Copyright © 2020. All rights reserved.