Class AdminWebLayoutTemplate
java.lang.Object
com.foreach.across.modules.web.template.LayoutTemplateProcessorAdapterBean
com.foreach.across.modules.adminweb.ui.AdminWebLayoutTemplate
- All Implemented Interfaces:
com.foreach.across.modules.web.template.NamedWebTemplateProcessor
,com.foreach.across.modules.web.template.WebTemplateProcessor
@ConditionalOnBean(org.thymeleaf.spring6.SpringTemplateEngine.class)
@Component
public class AdminWebLayoutTemplate
extends com.foreach.across.modules.web.template.LayoutTemplateProcessorAdapterBean
Represents the admin web layout with top and left navigation.
Will also register static paths and admin web root path as javascript data values.
- Since:
- 2.1.0
- Author:
- Arne Vandamme
-
Field Summary
-
Constructor Summary
ConstructorDescriptionCreate a default template.AdminWebLayoutTemplate
(String name, String layoutTemplate) Create a newAdminWebLayoutTemplate
implementation with a specific name and layout template. -
Method Summary
Modifier and TypeMethodDescriptionvoid
applyTemplate
(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Object handler, org.springframework.web.servlet.ModelAndView modelAndView) protected void
buildMenus
(com.foreach.across.modules.web.menu.MenuFactory menuFactory) boolean
Should theMenu.getPath()
value be included as data attribute on nav components.protected void
registerWebResources
(com.foreach.across.modules.web.resource.WebResourceRegistry registry) void
setIncludeNavPathAsDataAttribute
(boolean includeNavPathAsDataAttribute) Should theMenu.getPath()
value be included as data attribute on nav components.Methods inherited from class com.foreach.across.modules.web.template.LayoutTemplateProcessorAdapterBean
getName, prepareForTemplate
-
Field Details
-
NAVBAR
Nav positions used in this layout.- See Also:
-
NAVBAR_RIGHT
- See Also:
-
SIDEBAR
- See Also:
-
MODEL_ATTR_NAVBAR
Model attributes for different navigational components.- See Also:
-
MODEL_ATTR_NAVBAR_RIGHT
- See Also:
-
MODEL_ATTR_SIDEBAR
- See Also:
-
MODEL_ATTR_BREADCRUMB
- See Also:
-
-
Constructor Details
-
AdminWebLayoutTemplate
public AdminWebLayoutTemplate()Create a default template. -
AdminWebLayoutTemplate
Create a newAdminWebLayoutTemplate
implementation with a specific name and layout template.- Parameters:
name
- of this layoutlayoutTemplate
- view template to use
-
-
Method Details
-
registerWebResources
protected void registerWebResources(com.foreach.across.modules.web.resource.WebResourceRegistry registry) - Overrides:
registerWebResources
in classcom.foreach.across.modules.web.template.LayoutTemplateProcessorAdapterBean
-
applyTemplate
public void applyTemplate(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Object handler, org.springframework.web.servlet.ModelAndView modelAndView) - Specified by:
applyTemplate
in interfacecom.foreach.across.modules.web.template.WebTemplateProcessor
- Overrides:
applyTemplate
in classcom.foreach.across.modules.web.template.LayoutTemplateProcessorAdapterBean
-