public class PageContentStructure
extends com.foreach.across.modules.web.ui.elements.AbstractNodeViewElement
PageContentStructure
will be added to the body section when rendering.
If rendered as a tab layout, this will be the active tab pane.
Request-bound bean: PageContentStructure
is declared as an exposed request-bound bean.
This means a controller can write a PageContentStructure
that will be put on the request under the default
attribute name. Any model attribute set directly will replace the bean structure!com.foreach.across.modules.web.ui.elements.HtmlViewElement.Functions
com.foreach.across.modules.web.ui.ViewElement.Wither<T extends com.foreach.across.modules.web.ui.ViewElement>, com.foreach.across.modules.web.ui.ViewElement.WitherGetter<T extends com.foreach.across.modules.web.ui.ViewElement,U>, com.foreach.across.modules.web.ui.ViewElement.WitherRemover<T extends com.foreach.across.modules.web.ui.ViewElement>, com.foreach.across.modules.web.ui.ViewElement.WitherSetter<T extends com.foreach.across.modules.web.ui.ViewElement>
Modifier and Type | Field and Description |
---|---|
static String |
CSS_BODY_SECTION |
static String |
CSS_FEEDBACK_SECTION |
static String |
CSS_FOOTER |
static String |
CSS_HEADER |
static String |
CSS_NAV |
static String |
CSS_PCS |
static String |
ELEMENT_BODY_SECTION |
static String |
ELEMENT_PAGE_TITLE |
static String |
ELEMENT_PAGE_TITLE_SUB_TEXT |
static String |
ELEMENT_PAGE_TITLE_TEXT |
static String |
MODEL_ATTRIBUTE
This should equal the default
ModelAttribute name generated
based on the class name. |
static String |
TEMPLATE |
Constructor and Description |
---|
PageContentStructure() |
Modifier and Type | Method and Description |
---|---|
void |
addToFeedback(com.foreach.across.modules.web.ui.ViewElement element)
Add an element directly to the feedback section.
|
void |
addToFooter(com.foreach.across.modules.web.ui.ViewElement element)
Add an element directly to the footer section.
|
void |
addToHeader(com.foreach.across.modules.web.ui.ViewElement element)
Add an element directly to the header section.
|
void |
addToNav(com.foreach.across.modules.web.ui.ViewElement element)
Add an element directly to the nav section.
|
void |
addToPageTitle(com.foreach.across.modules.web.ui.ViewElement element)
Add an element directly to the page title element.
|
void |
addToPageTitleSubText(com.foreach.across.modules.web.ui.ViewElement element)
Add an element directly to the page title sub text element.
|
List<com.foreach.across.modules.web.ui.ViewElement> |
getChildren() |
List<com.foreach.across.modules.web.ui.ViewElement> |
getContentChildren() |
String |
getPageTitle()
Get the current page title text set.
|
void |
setPageTitle(String pageTitle)
Set the page title text directly.
|
void |
withFeedback(Consumer<com.foreach.across.modules.web.ui.elements.NodeViewElement> consumer)
Perform one or more actions with the feedback section element.
|
void |
withFooter(Consumer<com.foreach.across.modules.web.ui.elements.NodeViewElement> consumer)
Perform one or more actions with the footer element.
|
void |
withHeader(Consumer<com.foreach.across.modules.web.ui.elements.NodeViewElement> consumer)
Perform one or more actions with the header element.
|
void |
withNav(Consumer<com.foreach.across.modules.web.ui.elements.NodeViewElement> consumer)
Perform one or more actions with the nav element.
|
void |
withPageTitle(Consumer<com.foreach.across.modules.web.ui.elements.NodeViewElement> consumer)
Perform one or more actions with the page title element.
|
void |
withPageTitleSubText(Consumer<com.foreach.across.modules.web.ui.elements.NodeViewElement> consumer)
Perform one or more actions with the page title subtext element.
|
addAttributes, addChild, addChildren, addCssClass, addFirstChild, apply, applyUnsafe, clearChildren, get, getAttribute, getAttribute, getAttributes, getHtmlId, getTagName, hasAttribute, hasCssClass, remove, removeAttribute, removeCssClass, returnIfType, set, setAttribute, setAttributes, setCustomTemplate, setElementType, setHtmlId, setName, setTagName
elementStream, find, find, findAll, findAll, findAll, findOrSelf, findOrSelf, flatStream, getCustomTemplate, getElementType, getName, hasChildren, removeAllFromTree, removeChild, removeFromTree, removeFromTree
public static final String MODEL_ATTRIBUTE
ModelAttribute
name generated
based on the class name.public static final String TEMPLATE
public static final String ELEMENT_PAGE_TITLE
public static final String ELEMENT_PAGE_TITLE_TEXT
public static final String ELEMENT_PAGE_TITLE_SUB_TEXT
public static final String ELEMENT_BODY_SECTION
public static final String CSS_PCS
public static final String CSS_HEADER
public static final String CSS_FOOTER
public static final String CSS_NAV
public static final String CSS_FEEDBACK_SECTION
public static final String CSS_BODY_SECTION
public void addToHeader(com.foreach.across.modules.web.ui.ViewElement element)
addToPageTitle(ViewElement)
or
addToPageTitleSubText(ViewElement)
.element
- to addpublic void addToPageTitle(com.foreach.across.modules.web.ui.ViewElement element)
withPageTitle(Consumer)
method.
Calling this method will create the default header if the header section is still empty.element
- to addpublic void addToPageTitleSubText(com.foreach.across.modules.web.ui.ViewElement element)
element
- to addpublic void addToNav(com.foreach.across.modules.web.ui.ViewElement element)
element
- to addpublic void addToFeedback(com.foreach.across.modules.web.ui.ViewElement element)
element
- to addpublic void addToFooter(com.foreach.across.modules.web.ui.ViewElement element)
element
- to addpublic void withHeader(Consumer<com.foreach.across.modules.web.ui.elements.NodeViewElement> consumer)
consumer
- to executepublic void withFooter(Consumer<com.foreach.across.modules.web.ui.elements.NodeViewElement> consumer)
consumer
- to executepublic void withNav(Consumer<com.foreach.across.modules.web.ui.elements.NodeViewElement> consumer)
consumer
- to executepublic void withFeedback(Consumer<com.foreach.across.modules.web.ui.elements.NodeViewElement> consumer)
consumer
- to executepublic String getPageTitle()
ELEMENT_PAGE_TITLE_TEXT
, will return null
if title not set or no page title element.public void setPageTitle(String pageTitle)
ELEMENT_PAGE_TITLE_TEXT
to be present,
else this method will do nothing.
Calling this method will create the default header if the header section if still empty.pageTitle
- text to setpublic void withPageTitle(Consumer<com.foreach.across.modules.web.ui.elements.NodeViewElement> consumer)
ELEMENT_PAGE_TITLE
inside the header section,
it usually contains both the page title text and sub text elements.
Calling this method will create the default header if the header section is still empty.consumer
- to executepublic void withPageTitleSubText(Consumer<com.foreach.across.modules.web.ui.elements.NodeViewElement> consumer)
ELEMENT_PAGE_TITLE_SUB_TEXT
, usually a <small>
element inside of the page title element inside the header section.
Calling this method will create the default header if the header section is still empty.consumer
- to executepublic List<com.foreach.across.modules.web.ui.ViewElement> getContentChildren()
public List<com.foreach.across.modules.web.ui.ViewElement> getChildren()
getChildren
in class com.foreach.across.modules.web.ui.elements.ContainerViewElement
Copyright © 2020. All rights reserved.